How to read video files using python & Opencv

后端 未结 4 1245
甜味超标
甜味超标 2020-12-31 19:50

I am reading an avi file usinh python 2.7 and opencv2.4.I am using windows 10.My sample code is

import numpy as np
import cv2
cap = cv2.VideoCapture(\'videos         


        
4条回答
  •  既然无缘
    2020-12-31 20:36

    When you put cap.isOpened() it check that, the video is read properly, So the while loop is not working there.

    But when you changed to while True it will execute without proper reading that's why it's giving an error.

    Make sure than you are properly reading the video file.

提交回复
热议问题