opencv_tutorials_installation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
opencv_tutorials_installation [2016/07/13 13:42] – joaomatos | opencv_tutorials_installation [2016/09/05 14:38] (current) – jadintredup | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Tutorial | + | ===== Installing OpenCV 3.1.0 with Visual Studio 2015 ===== |
- | **1) Necessary Software** | + | === Part 1: Download the necessary Files === |
- | + | * Visual Studio 2015 can be downloaded for free at [[https://www.visualstudio.com/ | |
- | [[http://opencv.org/downloads.html|Download the OpenCV main file here (Select version 3.1.0 for your OS)]] | + | |
+ | * OpenCV 3.1.0 is the latest release of OpenCV and most currently supported for Visual Studio 2015. It can be cloned from its git repository at [[https:// | ||
+ | * Cmake is required to build the libraries from the source code provided by the git repository. Cmake can be downloaded from [[https:// | ||
- | [[https:// | ||
+ | ---- | ||
+ | ==== Part 2: Building the Binaries Using CMake ==== | ||
+ | - Open your OpenCV directory and create a new directory called " | ||
+ | - Start CMake and | ||
+ | 2.1) Install the OpenCV 2.4.13 that you downloaded into your PC. Choose an easy to find directory , like C:> | ||
+ | 2.2) Create a new folder called OpenCV-Build into an easy to find directory , like C: | ||
- | ---- | + | 2.3) Open the CMAKE and on the box "Where the source code is " Select the folder OpenCV > Source (Generated by the OpenCV installation) . On the box "Where to build the binaries" |
- | ===== Installation Instructions ===== | + | 2.4) Click one time in Generate (it will ask for you to select your compiler , choose the Visual Studio version that you are using) , and after generating is complete click in Configure. You will get some errors but it is OK because we are only installing the OpenCV without any other 3rd party libraries. |
- | {{youtube> | + | 2.5) Go to the OpenCV-Build folder and open the ALLBUILD visual studio solution. |
+ | 2.6) On the top Taskbar , select Debug and x64(if you have windows 64 bits ) or x86 (if you have windows 32 bits ) . After that right click the install on the right side of the window and select BUILD. | ||
+ | 2.7) Repeat 2.7 using the Release instead of Debug. | ||
+ | 2.8) Close the visual studio and open again . Select new project > Visual C++ and select win32 Console Application. Choose the folder where do you want to save it ( can be anywhere ) and select a name. Click OK , it will pop up a window , select next , check the "empty project" | ||
- | ---- | + | 2.9) Select Debug and x64(if you have windows 64 bits ) or x86 (if you have windows 32 bits). |
+ | |||
+ | 2.10) Right click on the source files folder on the solution explorer (right side of the window). Click in add > new item. Select Visual C++ in the left , click on c++ File (.cpp) and then OK. | ||
+ | |||
+ | 2.11) On the Solution explorer (right side ) , right click into your project name > properties. | ||
+ | |||
+ | 2.12) On the top , Configuration select Debug , and platform select all. | ||
+ | |||
+ | 2.13) On the left , select C/C++ > general. Into the additional include directory , add the directory : OpenCV-Build > install > include. | ||
+ | |||
+ | 2.14) On the left , select Linker> general. Into the additional library directory add the directory: OpenCV-Build > install > x64 (or x86 depending on your Windows bits) > vc14 > lib. | ||
+ | |||
+ | 2.15) On the left , select Linker > input. Into additional dependencies paste the following libraries: | ||
+ | < | ||
+ | opencv_calib3d310d.lib | ||
+ | opencv_flann310d.lib | ||
+ | opencv_core310d.lib | ||
+ | opencv_features2d310d.lib | ||
+ | opencv_highgui310d.lib | ||
+ | opencv_ml310d.lib | ||
+ | opencv_objdetect310d.lib | ||
+ | opencv_imgproc310d.lib | ||
+ | opencv_video310d.lib | ||
+ | opencv_imgcodecs310d.lib | ||
+ | opencv_photo310d.lib | ||
+ | opencv_shape310d.lib | ||
+ | opencv_superres310d.lib | ||
+ | opencv_ts310d.lib | ||
+ | opencv_videoio310d.lib | ||
+ | opencv_videostab310d.lib | ||
+ | </ | ||
+ | |||
+ | 2.16) Repeat 2.12) 2.13) 2.14) using Release configuration. In the step 2.15) you must paste the libraries names without the " | ||
+ | |||
+ | 2.17) Close the Visual Studio. | ||
+ | |||
+ | 2.18) Go to your files explorer , right click into your PC icon > properties. Select advanced system settings > environment variables. Into the system variables box , find the Path variable , click to edit it. Click in new and then select your directory : OpenCV-Build > install > x64 (orx86) > vc14 > bin. | ||
+ | |||
+ | 2.19) Restart your PC. | ||
- | ===== Installing OpenCV | + | 2.20) Open Visual Studio |
+ | 2.21) Copy and paste any example on the Tutorials section and see if it is running OK. | ||
opencv_tutorials_installation.1468442526.txt.gz · Last modified: 2016/07/13 13:42 by joaomatos