#include "opencv2/opencv.hpp"
using namespace cv;
VideoCapture capture(“d:/test.mp4”);
if (!capture.isOpened())
{
return;
}
// 时长计算
int iVideoTime = capture.get(CV_CAP_PROP_FRAME_COUNT) / capture.get(CV_CAP_PROP_FPS);
#include "opencv2/opencv.hpp"
using namespace cv;
VideoCapture capture(“d:/test.mp4”);
if (!capture.isOpened())
{
return;
}
// 时长计算
int iVideoTime = capture.get(CV_CAP_PROP_FRAME_COUNT) / capture.get(CV_CAP_PROP_FPS);