How to process images of a video, frame by frame, in video streaming using OpenCV and Python

后端 未结 6 908
鱼传尺愫
鱼传尺愫 2020-12-04 10:13

I am a beginner in OpenCV. I want to do some image processing on the frames of a video which is being uploaded to my server. I just want to read the available frames and wri

6条回答
  •  孤城傲影
    2020-12-04 10:40

    According to the latest updates for OpenCV 3.0 and higher, you need to change the Property Identifiers as follows in the code by Mehran:

    cv2.cv.CV_CAP_PROP_POS_FRAMES
    

    to

    cv2.CAP_PROP_POS_FRAMES
    

    and same applies to cv2.CAP_PROP_POS_FRAME_COUNT.

    Hope it helps.

提交回复
热议问题