Windows10~VS2019~OpenCV3.4.6配置

    xiaoxiao2022-07-13  168

    给平板装了windows,安装OpenCV

    一、安装OpenCV

    官网下载很慢

    opencv3.4.6-百度网盘

     

    二、添加OpenCV环境变量

    拜小白教你OpenCV3.2.0+VS2017开发环境配置

    三、打开VS2019,配置OpenCV属性表

    OpenCV属性表配置与添加

    四、测试OpenCV程序——打开摄像头

    我的OpenCV学习笔记(11):启动摄像头

    #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/core/core.hpp> using namespace cv; int main() { VideoCapture cap(0); if(!cap.isOpened()) { return -1; } Mat frame; Mat edges; bool stop = false; while(!stop) { cap>>frame; cvtColor(frame, edges, CV_BGR2GRAY); GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5); Canny(edges, edges, 0, 30, 3); imshow("当前视频",edges); if(waitKey(30) >=0) stop = true; } return 0; }

     

    最新回复(0)