AttributeError:' cv2.VideoWriter'对象没有属性' release'

时间:2014-05-22 03:03:02

标签: python linux opencv video

   import cv2
   camera = cv2.VideoCapture(0)
   video  = cv2.VideoWriter('video.avi', -1, 25, (640, 480));
   while True:
      f,img = camera.read()
      video.write(img)
      cv2.imshow("webcam",img)
      if (cv2.waitKey(5) != -1):
           break
   video.release()

我正在尝试播放视频并将其保存在video.avi文件中,但我有此错误,我可以找到很多人询问此问题,但没有人回答

0 个答案:

没有答案