Detailed process of opencv3.1.0 configuration in vs2015 under win10


It was found that opencv3.1.0 has been released, and the computer just reconfigured the system. It is found that the configuration process of opencv2 is simpler than that of opencv2, and it has been adapted to vs2015.

Download and install opencv3.1.0

1. Download opencv3.1.0, enter the official website, and click opencv for windows to download.


Click Run to download the good file. In fact, the installation program of OpenCV is to unzip the files. Because there is only Disk C, a folder named opencv3.1.0 is directly created on disk C.

After selecting the path, click extract.

Opencv3.1.0 environment variable configuration

Select this computer (computer), right-click Properties > Advanced System Settings > environment variables > system variables > find path > add the corresponding path to the variable value. My path is C: opencv3.1.0 / opencv / build / x64 / vc14 / bin. Please input semicolon in English. This update found that the existing x86 folder has been deleted, that is to say, it does not support the X86 compilation of vs2015. This problem will be highlighted later. In addition, if you are vs2013, please select the vc12 folder. If you are an older vs version, it is recommended to choose other versions of OpenCV.



Create a WIN32 console project

1. Open vs2015 first

File > New > Project > Visual C + + new Win32 console project

2. Click next, click next, check the blank item, and then click finish

Vs2015 includes directory and Library Directory configuration

1. Now configure the directory

First create a. CPP source file under the source file

Named main.cpp

2. Then click view, find other windows in view, find property manager under other windows, and click open

3. Then there will be a window for the property manager. Next, click test, and there will be a folder called debug| x64 under it. Click open, and the name is Microsoft.Cpp . x64. User, right-click properties

4. Then select the VC + + directory under the general properties, and there will beInclude directoryandLibrary Directory, click the include directory and add the following three paths. In fact, these are the directories where the opencv related decompression files are located




These three paths should be modified according to the path of decompressing opencv3.1

5. Click the library directory to add the following path


6. It is still the property page just now

Click linker, select input, and you will see additional dependencies on the right. Add the following file


Note: here, we add debug mode. You will see d at the end of the file. If you want to add release mode, remove D

OpenCV_ world310.lib

display picture

1. The configuration has been completed in the above process. Let’s show a picture to verify whether the configuration is successful! First switch to Solution Explorer, and then click source main.cpp Add the following code

using namespace cv;
int main()
  Mat picture = imread(" wallpaper.jpg "); // pictures must be added to the project directory
                     //That is, and test.cpp File in a folder!!!
  Imshow (picture);

Then click the local windows debugger or press F5 to run the program –

You’ll find that the report is wrong…

This should be the choice here

So you can display the picture. It’s too big… Just cut a part of it


The above has completed the configuration of opencv3.1.0 in vs2015 under win10. It is found that with the change of OpenCV version, the configuration process is becoming easier and easier. I hope that we can learn image related knowledge and make progress together in the future. Next, I plan to take a look at the official tutorials in my spare time in combination with the “Introduction to opencv3 programming” by the God of maoxingyun

The above is the whole content of this article, I hope to help you in your study, and I hope you can support developeppaer more.