I would like to know if the user has closed the imshow window using on x
on the right top corner on the window
Simple Code name simplegui.py
import cv2
import numpy as np
freash_image = np.ones((480,640),np.uint8)
cv2.imshow('image',freash_image)
cv2.waitKey(0)
cv2.destroyAllWindows()
On clicking x
of imshow window the python code doesn't stop as seen in the screens shot
I would like to python code to stop as soon as user closes the imshow using x
on the right top corner of the window
Anyone help would be helpful.
Thank you for your time.