How do you check if an opencv window has been closed?
I would like to do:
cvNamedWindow(\"main\", 1); while(!cvWindowIsClosed(\"main\")) { cvSho
You can use the cv::getWindowProperty method.
Do like that:
cv::namedWindow("main", WINDOW_AUTOSIZE); while(1) { cv::imshow("main", myImage); // add this IF. if (cv::getWindowProperty("main", WND_PROP_AUTOSIZE) == -1) break; }
When the windows be closed the getWindowProperty will return -1.