Download and install Opencv3.1.0
Download Opencv3.1.0, enter the official website, click OpenCV for Windows to download.
Click to run the downloaded file. In fact, the OPENCV installation program is to unzip the file, the individual because only C drive, so directly in the C-drive to build a folder Opencv3.1.0.
Select the path and click Extract.
OpenCV3.1.0 environment variable Configuration
Select the computer (computer), right-click Properties, advanced system settings, environment variables, and system variables, find path-> Add the appropriate path to the variable value, my path is
C:\Opencv3.1.0\opencv\build\x64\vc14\bin,
Note the semicolon is entered in the English input method. This update found that the persistent x86 folder has been deleted, that is, does not support vs2015 x86 compilation, this issue will be emphasized. Also if you are vs2013 please select the Vc12 folder, if you are other older VS version, it is recommended to choose a different version of OpenCV.
Build a WIN32 Console project
1. First Open VS2015
FILE-New Project->visual C + + new WIN32 Console project
2. Click Next, click Next, tick the empty item, then click Done
VS2015 contains directory, library directory configuration
1. Configure the directory now
First create a. cpp source file under the source file
Named Main.cpp
2. Then click View , find Another window under View, find the property manager under Other windows, click Open
3. Then there will be a window of the property manager , the next point to open the project file test, there will be a debug|x64 folder below, open, under the famous Microsoft.Cpp.x64.user The file, right-click property
4. Then select the VC + + directory under Common Properties , the right side will contain directories and library directories , click the include directory , add the following three paths, Actually, these are the directories where the OpenCV related files were extracted.
C:\Opencv3.1.0\opencv\build\include
C:\OPENCV3.1.0\OPENCV\BUILD\INCLUDE\OPENCV
C:\Opencv3.1.0\opencv\build\include\opencv2
These three paths are to be modified according to the path of their own decompression OpenCV3.1
5. Click the Library directory to add the following path
C:\Opencv3.1.0\opencv\build\x64\vc14\lib
6. Or just the Properties page
Click the linker , select input , see Additional Dependencies on the right, add the following file
Opencv_world310d.lib
Note: Here is a small series to add the debug mode, you will see the end of the file has D,
If you want to add release mode, D will be removed.
namely Opencv_world310.lib
Show pictures
1. The configuration has been completed in the above process, let us show a picture, verify that the configuration is successful!
First switch to Solution Explorer, then click on the source file main.cpp, add the following code
#include<opencv2\opencv.hpp>using namespace cv;int main(){ Mat picture = imread("wallpaper.jpg");//图片必须添加到工程目录下 //也就是和test.cpp文件放在一个文件夹下!!! imshow("测试程序", picture); waitKey(20150901);}
Then click on the local Windows debugger, or press F5 to run the program-
Will find an error ...
It should be chosen here.
This will show the picture, the picture is too big ... Just cut a part.
Summarize
The above completed the WIN10 under the vs2015 configuration Opencv3.1.0, found that with the OPENCV version of the change, the configuration process is more and more easy, I hope in the study monk Life and everyone together to learn image-related knowledge, together progress. Next, plan to spend your free time with the "OPENCV3 Programming Primer" of the Great God of the Mao Nebula look at the official tutorials
-
http://blog.csdn.net/u011635764/article/details/50564259
-
Http://www.lai18.com/content/2457207.html
-
http://blog.csdn.net/lanergaming/article/details/48689841
-
http://download.csdn.net/detail/gghyoo/9366488
-
http://blog.csdn.net/zhangsheng19860919/article/details/50519913
WIN10 vs2015 Configuration Opencv3.1.0 process detailed (GO)