How do you check if an opencv window has been closed?
I would like to do:
cvNamedWindow(\"main\", 1);
while(!cvWindowIsClosed(\"main\"))
{
cvSho
Suppose you have only one image window open, then clicking the 'x' button at its corner causes the waitkey() function to return a -1 value. Then check if the cvGetWindowHandle("name_of_the_window") function returns 0 or not. If it does return 0, then the window is actually closed. I have tested it in OpenCV3. But I am still not very clear on the reason why the waitkey() return -. I will much appreciate if anyone explains why this happens. [I don't know if my answer to this question will be relevant or not after such a long time. But hopefully if anyone else gets stuck with the same issue (like me), this answer might help them out.] Thanks.