I love working with the OpenCV library, but it can be a royal pain in the butt to get it installed and running on your machine. This is especially true for Microsoft Windows. Despite a Google search turning up plenty of results for articles promising 'Installing OpenCV 4 on Windows 10'.
Setting up OpenCV with Cmake GUI
- Download OpenCV and Cmake
- Build opencv with cmake
- Press
configure
, choosevisual studio 2015
, finish - Then press
generate
- Open
OpenCV.sln
underbuild/
- Build it using
Debug
,Release
- right click > build
- switch to
Release
mode and build again
- [Windows] Setting up environment variable
- add
<opencv>/bin
intoPATH
- add new env named
OpenCV_DIR
, value as<opencv>/build
- it may need logout to apply setting, you can check it by
echo %PATH%
,echo %OpenCV_DIR%
Opencv Cmake Build
Build with EXTRA MODULES
- In step
2. Build opencv with cmake
, pressconfigure
- Set up
OPENCV_EXTRA_MODULES_PATH
to proper path(<opencv_contrib>/modules
) - Press
configure
again, thengenerate
Install Opencv In Windows 10
To see more details instructions, see opencv_contrib README