Advertisement
Guest User

Untitled

a guest
Jul 15th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. import cv2
  2.  
  3. video_capture = cv2.VideoCapture(0)
  4. while True:
  5.     # Capture frame-by-frame
  6.     ret, frame = video_capture.read()
  7.     gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
  8.     cv2.imshow('Video', frame)
  9.  
  10.     if cv2.waitKey(1) & 0xFF == ord('q'):
  11.         break
  12.  
  13. video_capture.release()
  14. cv2.destroyAllWindows()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement