Member-only story

[Windows 10] Set up environment for Opencv4.0.1 C++ development

Nhan Cao
3 min readMar 31, 2019

Related post: https://medium.com/@nhancv/macos-mojave-10-14-3-setup-environment-for-opencv4-0-1-c-develop-fcae955d6b33

  1. Install Visual Studio Community 2017 v15.9.9
  2. Download OpenCV for windows pack at https://opencv.org/releases.html, run opencv-4.0.1-vc14_vc15.exe to extract source files, then we get opencv folder. Put it to D:\_Program Files\ (or any directory you like, such as C:\ )

3. Setup PATH => Goto Control Panel\All Control Panel Items\System -> Advanced system settings -> Environment Variables … -> Add “D:\_Program Files\opencv\build\x64\vc15\bin” to System variables Path -> OK

4. Open Visual Studio -> New project -> Visual C++ -> Empty Project -> Ok

5. Config and run

  • In Solution Explorer, right click on Source Files -> Add -> New Item… -> Source files with name try.cpp
  • Download lena.jpg on the internet and put it to project, place it to the…

--

--

No responses yet