opencv读取本地视频

来源:互联网 发布:网络格斗类的游戏 编辑:程序博客网 时间:2024/06/04 17:45
#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;}

原创粉丝点击