I have seen lot of examples in opencv exampes to Exit a window by pressing "ESC" key. I am working in a windows platform where I need to use the close button in the window to close the opencv "Capture" window? How can I do it? Any suggestions and examples will be helpful.
Asked
Active
Viewed 2,212 times
2 Answers
3
I think this type of a code will help. I usually do this for closing window in python.
while():
if (cv2.getWindowProperty('name_of_window', 0) < 0):
cv2.destroyAllWindows()
break

Arun Sooraj
- 737
- 9
- 20