#include <opencv2\opencv.hpp>
using namespace cv;
using namespace std;
int main()
{
//读取视频或摄像头
VideoCapture capture(0);
//读取视频或摄像头
VideoCapture capture(“1.avi”);
while (true)
{
Mat frame;
capture >> frame;
imshow("读取视频", frame);
waitKey(30); //延时30
}
return 0;
}