Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

yes it will work for updated versions also and you can try like this also. import cv2 import numpy as np

cap = cv2.VideoCapture("challenge.mp4") # if you are giving camera as input then give (0) to videoCapture. while(cap.isOpened()):

    # Take each frame
ret, image =

if ret:
          # do operations on image as per your application

if cv2.waitKey(25) & 0xFF == ord('q'):

cap.release() cv2.destroyAllWindows()

this all things you can get directly from opencv tutorial... try @kirill