Guest User

Untitled

a guest
Oct 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import numpy as np
  2. import cv2
  3.  
  4. cap = cv2.VideoCapture('input.mp4')
  5.  
  6. while(cap.isOpened()):
  7. ret, frame = cap.read()
  8.  
  9. gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
  10.  
  11. cv2.imshow('frame',gray)
  12. if cv2.waitKey(1) & 0xFF == ord('q'):
  13. break
  14.  
  15. cap.release()
  16. cv2.destroyAllWindows()
Add Comment
Please, Sign In to add comment