#include<opencv2/opencv.hpp>
#include<iostream>
#include <string>
using namespace cv;
int main()
{
//播放视频
//读入视频
VideoCapture capture("1.avi");
while (1)
{
Mat frame;
capture >> frame;//读取当前帧
if (frame.empty())
{
break;
}
imshow("readvideo", frame);//显示当前帧
waitKey(30);//延时30ms
}
return 0;
}
opencv实现播放视频(C++)
最新推荐文章于 2025-02-25 10:12:25 发布