Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You are missign waitKey(): import cv2

cap = cv2.VideoCapture("road.avi")
while cap.isOpened():
    ret, frame = cap.read()
    cv2.imshow('frame', frame)
    if cv2.waitKey(1) == ord('q'):
        break
cap.release()
cv2.destroyAllWindows()

You are missign missing waitKey(): import cv2

cap = cv2.VideoCapture("road.avi")
while cap.isOpened():
    ret, frame = cap.read()
    cv2.imshow('frame', frame)
    if cv2.waitKey(1) == ord('q'):
        break
cap.release()
cv2.destroyAllWindows()

You are missing waitKey(): import cv2waitKey():

import cv2
cap = cv2.VideoCapture("road.avi")
while cap.isOpened():
    ret, frame = cap.read()
    cv2.imshow('frame', frame)
    if cv2.waitKey(1) == ord('q'):
        break
cap.release()
cv2.destroyAllWindows()