On UNIX, one may use the bootstrap script provided in the source tree to build CMake. In order to build the windows version of CMake you will need a current binary installation of.
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 Ffmpeg Windows
Build with EXTRA MODULES
Install Opencv 4 Windows 10
- In step
2. Build opencv with cmake
, pressconfigure
- Set up
OPENCV_EXTRA_MODULES_PATH
to proper path(<opencv_contrib>/modules
) - Press
configure
again, thengenerate
Opencv Cmake Build
To see more details instructions, see opencv_contrib README