opencv读取本地视频

xiaoxiao2021-02-28  100

#include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/core/core.hpp> using namespace cv; int main(int argc, char** argv) { VideoCapture cap("E:\\A_Develope\\test_video\\fitness.avi"); if (!cap.isOpened()) { return -1; } Mat frame; while (1) { cap >> frame; if (frame.empty()) break; imshow("当前视频", frame); if (waitKey(30) >= 0) break; } return 0; }
转载请注明原文地址: https://www.6miu.com/read-1000104.html

最新回复(0)