读取播放视频

 

 

#include<opencv2\opencv.hpp>

using namespace cv;

int main() {
    //读取视频
    VideoCapture capture;
    capture.open("test01.mp4");

    //循环每一帧
    while (1) {
        Mat frame;
        capture >> frame;
        imshow("读取视频", frame);

        waitKey(30);
    }
    return 0;
}

 

posted @ 2018-06-12 22:09  西伯利亚的冷空气  阅读(21)  评论(0编辑  收藏  举报