Hazte Socio (El Foro siempre Gratis)
Paga con Tarjetas+ Info

Instalar OpenCV3.1 en windows10

Foro donde postear temas generales de programación

Moderator: Junta Directiva

Post Reply
User avatar
Usuario Avanzado
Usuario Avanzado
Posts: 388
Joined: Tue Oct 09, 2007 2:12 pm
Nombre: Javier Lopez Segura
Location: Madrid

Instalar OpenCV3.1 en windows10

Post by fusion » Mon Jan 11, 2016 6:21 pm

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 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:\opencv\build\include\opencv2 D:\opencv\build\include\opencv D:\opencv\build\include
15. Linker->general-> bibliotecas adicionales: D:\OpenCV31\lib\Debug
16. Configuration Properties ->Linker -> Input añadir:
17. En los ejemplos añadir esta línea antes del highui.hpp:
#include "opencv2/imgcodecs.hpp" //OJO meter esto o no vá

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest