标签:++ return opencv2 waitkey oca frame wait sop key
#include <highgui.hpp>
#include <highgui/highgui_c.h>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
//#include <opencv2/core/core.hpp>
//#include <opencv2/highgui/highgui.hpp>
//#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
String path = "C:\\Users\\fengl\\Desktop\\素材.avi";
int main()
{
VideoCapture cap(path);
if (!cap.isOpened())return -1;
int frames_avi = cap.get(CAP_PROP_FRAME_COUNT);
Mat img;
for (int frame_indes = 2; frame_indes < frames_avi; frame_indes++)
{
img.setTo(Scalar(0, 0, 0));
cap.read(img);
imshow("image", img);
waitKey(30);
}
return 0;
}
标签:++ return opencv2 waitkey oca frame wait sop key
原文地址:https://www.cnblogs.com/zfq572815535/p/10034448.html