Skip to content

Commit

Permalink
Allow making screenshots
Browse files Browse the repository at this point in the history
* face_thuglife.py: Likewise, click `k' to capture the webcam
  • Loading branch information
TravorLZH committed Sep 3, 2019
1 parent 9eb0596 commit fe20040
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion face_thuglife.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,9 @@ def decor_img(name):
frame=cv2.flip(frame,1)
frame=mark_eye(frame)
cv2.imshow("Thug Life",frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
key=cv2.waitKey(1) & 0xFF
if key==ord('q'):
break
elif key==ord('k'):
cv2.imwrite("sunglass_screenshot.png",frame)
print("Saved")

0 comments on commit fe20040

Please sign in to comment.