opencv 对视频的操作

//VideoCapture类:可以是从文件中读取同样也可以是从摄像头里获得
videoCapture cap("  ");
cap>>frame; //获得视频中的帧
cap.get(int propid);
cap.set(int propid,double value);
propid:  cv::CAP_PROP_POS_MSEC    0  Current position in video file(milliseconds)or video 
                                     capture timestamp
         cv::CAP_PROP_POS_FRAMES  1  Zero-based index of next frame
         
         cv::CAP_PROP_POS_AVI_RATIO  2 Relative position in the video(range is 0 to 1
        
         cv::CAP_PROP_FRAME_WIDTH 3  Width of frames in the video

         cv::CAP_PROP_FRAME_HEIGHT 4 Height of frames in the video

         cv::CAP_PROP_FPS         5   Frame rate at which the video was recorded

         cv::CAP_PROP_FOURCC      6   Four character code indicating codec

         cv::CAP_PROP_FRAME_COUNT 7   Total number of frames in a video file

         cv::CAP_PROP_FORMAT      8   Format if the Mat objects retured(e.g.,CV_8UC3)

         cv::CAP_PROP_MODE        9   Indicates capture mode;values are specific to video
                                      backend being used(e.g.,DC 1394)

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值