15 lines
No EOL
213 B
Python
15 lines
No EOL
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() |