1

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.

2vision2
  • 4,811
  • 15
  • 80
  • 160

2 Answers2

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
  • 707
  • 9
  • 20
1

OpenCV doesn't support this feature. Sorry!

Community
  • 1
  • 1
karlphillip
  • 89,883
  • 35
  • 240
  • 408