C ++ Opencv C ++ installation guide Configuration Tutorial ultra detailed illustration Vs2015 / 2017/2019 (C ++ ) opencv binding VisualStduio
Vs of the configuration opencv opencv configuration Tutorial
安装Open-cv with VisualStudio(c++)
The path to the system comprising OpenCV
1. Turn on this computer
2. Add the system environment variable to open the computer!
Then right after that this computer click Properties to open the Select - Advanced System Settings - environment variables in the system variable path below, click "Edit"
Then click "New" to add a new environment variable. Copy and paste the OpenCV package vc15 \ bin folder path
Copy the following path
After pressing pasted, add OK, and then click OK again to exit the Environment Variables dialog box.
3. Open Visual Studio. The project will create a new empty console application project using Visual C ++. Be empty project and complete.
In source add a new .cpp file within the file . This will open the newly created editor cpp file.
Type the following code in the editor, and then save the source file. You can copy and paste the entire code from below.
#include<opencv2/opencv.hpp>
#include<iostream>
using namespace std;
using namespace cv;
int main()
{
Mat img = imread("lena.jpg");//此处的文件需要与源文件同目录!!
namedWindow("image", WINDOW_NORMAL);
imshow("image", img);
waitKey(0);
return 0;
}