Setting up OpenCV 3.1 in Visual Studio 2015

妖精的绣舞 提交于 2019-11-30 07:44:15
globalex
  1. Download opencv 3.1 for windows

  2. Extract to folder like c:/opencv

  3. Set environment variables by setx -m. This depends on your path.

Type this into command line started by cmd.

setx -m OPENCV_DIR C:\opencv\build\x64\vc14
  1. In the path editor, under control_panels/system/advanced/environmental_variables just set

    %OPENCV_DIR%\bin

These are important steps. If you include Opencv project without this Project in visual studio failes because the project can not find DLL library.

  1. Under Project settings in Visual Studio

    • C/C++/General set Additional Include Directories and Additional #using Directories. For example C:\opencv\build\include

    • Under Linker/general set Additional library directories you can use your system path set in installation process or simply include this path for 64 bit version. For example C:\opencv\build\x64\vc14\lib or C:\opencv\build\yourTarget\vc14\lib

    • Under Linker/Input set Additional Dependencies as opencv_world310.lib, opencv_world310d.lib

My tutorial to Visual Sturio 2015 and Opencv 3.1

Use Nuget console to install Opencv in VS

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!