Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 464f71a

Browse files
authored
Update eye_detection.py
1 parent ad74151 commit 464f71a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

real_time_eye_detection/eye_detection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
cv2.imshow("Video", frame)
3434
key = cv2.waitKey(1) & 0xFF
3535

36-
# if the 'q' key is pressed, stop the loop
37-
if key == ord("q"):
36+
# if the 'q' or ESC key is pressed, stop the loop
37+
if key == ord("q") or key == 27:
3838
break
3939

4040
# close all windows
41-
cv2.destroyAllWindows()
41+
cv2.destroyAllWindows()

0 commit comments

Comments
 (0)