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,933
  • 16
  • 83
  • 164

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

OpenCV doesn't support this feature. Sorry!

Community
  • 1
  • 1
karlphillip
  • 92,053
  • 36
  • 243
  • 426