videocapture 可以通过cap.get(propid)来获得视频文件的属性,同样也能使用cap.set(propid,value)来修改一些参数。
VideoCapture 的propid属性代表意思:
0-视频文件的当前位置(毫秒))
• CV_CAP_PROP_POS_FRAMES 0-based index of the frame to be decoded/captured next.
(1-下一步要解码/捕获的帧的基于0的索引)
• CV_CAP_PROP_POS_AVI_RATIO Relative position of the video file: 0 - start of the film, 1 - end of the film.
(2-视频文件的相对位置:0-胶片开始,1-胶片结束)
• CV_CAP_PROP_FRAME_WIDTH Width of the frames in the video stream.
(3-视频流中帧的宽度)
• CV_CAP_PROP_FRAME_HEIGHT Height of the frames in the video stream.
(4-视频流中帧的高度)
• CV_CAP_PROP_FPS Frame rate.
(5-帧率)
• CV_CAP_PROP_FOURCC 4-character code of codec.
(6-编解码器的4字符代码)
• CV_CAP_PROP_FRAME_COUNT Number of frames in the video file.
(7-视频文件中的帧数。)
• CV_CAP_PROP_FORMAT Format of the M