What is the scope of created Window? For example:
void play_function(){
cv::imshow("display", image data);
}
int main(){
cv::namedWindow("display", 1)
for(int i=0; i<10; i++){
play_function()
}
}
Since the window "display" in play_function() is not in the scope of initialized "display" in main() as normal scope scheme of general variables, I am not sure the Window "display" are the same one as in main()?
The reason I ask this is that I found out that the first time when calling cv::imshow in play_function, it takes tremendous time, so I am wondering if Window "display" did the initialization again in play_function(). Thanks a lot.