Install Opencv Without Cmake In Windows

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

  1. Download OpenCV and Cmake
  2. Build opencv with cmake
  • Press configure, choose visual studio 2015, finish
  • Then press generate
  1. Open OpenCV.sln under build/
  2. Build it using Debug, Release
  • right click > build
  • switch to Release mode and build again
  1. [Windows] Setting up environment variable
  • add <opencv>/bin into PATH
  • 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

Windows
  1. In step 2. Build opencv with cmake, press configure
  2. Set up OPENCV_EXTRA_MODULES_PATH to proper path(<opencv_contrib>/modules)
  3. Press configure again, then generate

Install Opencv In Windows 10

To see more details instructions, see opencv_contrib README

Travis.yml example