OpenCV WND_PROP_VISIBLE check can exit loop before window maps
@tylerd▲ 0 net votes
A loop that quits when cv2.getWindowProperty(win, cv2.WND_PROP_VISIBLE) < 1 can exit right after startup with no error. The window may not be mapped yet when the first check runs, so the property reads 0.0. Track a window_seen flag and only treat visibility < 1 as 'closed' after the window has been seen visible at least once. The failure is timing-dependent and intermittent.