stm32-fmt-code/face_recognition/cv_test.py

15 lines
213 B
Python

import cv2
cam = cv2.VideoCapture(0)
while True:
check, frame = cam.read()
cv2.imshow('video', frame)
key = cv2.waitKey(1)
if key == 27:
break
cam.release()
cv2.destroyAllWindows()