- Download OpenCV and extract it to desired directory, for example
D:\opencv
. - Set up environment variables for Windows:
OPENCV_DIR
=D:\opencv\build
- Add
%OPENDC_DIR%\x86\vc12\bin
toPATH
- Set up properties of MicroSoft Visual Studio project (Only works for OpenCV 3,
need to add more files in step iv for OpenCV 2):
- Right click on project name in
Solution Explorer
and chooseProperties
. - In
Configuration Properties -> C/C++ -> General -> Additional Include Directories
, add$(OPENCV_DIR)/include
to it. This will add OpenCV header files into compiler's search directories. - In
Configuration Properties -> Linker -> General -> Additional Library Directories
, add$(OPENCV_DIR)/x86/vc12/bin
and$(OPENCV_DIR)/x86/vc12/lib
to it. - In
Configuration Properties -> Linker -> Input -> Additional Dependencies
, addopencv_ts300.lib
andopencv_world300.lib
into it (Useopencv_ts300d.lib
andopencv_world300d.lib
for Debug).
- Right click on project name in
Created
December 7, 2015 05:33
-
-
Save mikkkee/f319f6f83355b9159f88 to your computer and use it in GitHub Desktop.
hecklist for setting up MicroSoft Visual Studio to work with OpenCV
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment