Python+OpenCV播放视频遇到的错误
使用的是Python2.7+OpenCV2.4.10,代码如下:
import numpy as np
import cv2
############# camera ################
cap = cv2.VideoCapture("1.avi")
while True:
ret, frame = cap.read()
if ret == True:
cv2.imshow('frame', frame)
if cv2.waitKey(25) == ord('q'):
break;
else