how to terminate a program cv2 python

Solutions on MaxInterview for how to terminate a program cv2 python by the best coders in the world

showing results for - "how to terminate a program cv2 python"
Daniele
01 Apr 2016
1# at the end of the code, in the loop
2while True:
3  # ... (code here)
4  k = cv2.waitkey(1)
5  if k == 27:
6    break
7
8# at the end of the code, outside of the while loop
9cv2.destroyAllWindows()
Nico
05 Sep 2016
1# YOU MUST CLICK ON THE WINDOW AND PRESS "ESC" KEY TO EXIT THE WINDOW