Si además quieres enviarnos un Artículo para el Blog y redes sociales, pulsa el siguiente botón:
Es mucho mejor hacerlo en linux, pero si quieres hacerlo en windows cuesta más pero lo logré, pongo aquí los pasos por si es de ayuda:
Instalación OPENCV3.1 muy resumida VS2015
1. Se instala la librería de OpenCV por ejemplo en d:opencv31
2. Se instala (si procede) la librería de contrib https://github.com/itseez/opencv_contrib en c:opencv_contrib (por ejemplo)
3. Abrir CMAKE
4. Apuntar a D:/OpenCV31/opencv/sources
5. También en destino D:/OpenCV31/bin/x64/VC14
6. Press the configure button. you will see all the opencv build parameters in the central interface
7. Uncheck INSTALL_TESTS (to avoid errors)
8. Browse the parameters and look for the form called OPENCV_EXTRA_MODULES_PATH (use the search form to focus rapidly on it)
9. Complete this OPENCV_EXTRA_MODULES_PATH by the proper pathname to the <opencv_contrib>/modules value using its browse button.
10. press the configure button followed by the generate button (the first time, you will be asked which makefile style to use, si VS2015 entonces usar VC14 de 64 bits)
11. Build the opencv core en DEBUG
12. En el Proyecto meter all configurations (release y debug),x64
13. Setup the environment variables: To do so.right click on computer, go to advanced system settings-> environment variables. Now under the user variables section. Edit the variable PATH(should already be existing), if not create a new variable whose name is PATH. In the variable value input box, give the path to the bin folder. Since I am using visual studio 2015 for my development purposes I will add the path like d:/opencv31/build/x64/vc14/bin
Dentro del proyecto en Configuration Properties:
14. C/C++ ->General. Now in the additional include directories add two directories one the include folder inside build, and the other one is opencv folder that is present in include folder which in turn is present inside the build folder:
D:opencvbuildincludeopencv2 D:opencvbuildincludeopencv D:opencvbuildinclude
15. Linker->general-> bibliotecas adicionales: D:OpenCV31libDebug
16. Configuration Properties ->Linker -> Input añadir:
;opencv_core310d.lib;opencv_imgcodecs310d.lib;opencv_highgui310d.lib;opencv_face310d.lib;opencv_imgproc310d.lib;opencv_ml310d.lib;opencv_video310d.lib;opencv_features2d310d.lib;opencv_calib3d310d.lib;opencv_objdetect310d.lib;opencv_flann310d.lib
17. En los ejemplos añadir esta línea antes del highui.hpp:
#include "opencv2/imgcodecs.hpp" //OJO meter esto o no vá