Files
2022-02-24 15:08:45 +01:00

17 lines
294 B
Python

#!/usr/bin/env python
import cv2
vid = cv2.VideoCapture(0)
while True:
ret, frame = vid.read()
cv2.imshow("frame", frame)
if cv2.waitKey(1) & 0xFF == ord("q"):
break
# After the loop release the cap object
vid.release()
# Destroy all the windows
cv2.destroyAllWindows()