Operating system: WIN10 Pro 64
Software version: vs2015+opencv3.0.0
1. Download and install
http://opencv.org/
https://www.visualstudio.com/zh-cn/products/visual-studio-community-vs.aspx2. Configuring CV Environment variables
Opens This computer, right-click Properties, advanced system settings, environment variables, new, such as
Add the path of the OpenCV executable file in path, as
PS: It is best not to add a semicolon at the end ";"
3. vs2015 Create a new C + + Win32 Console Project
4. Modify the relevant configuration of the project.
Specifically: Project--Properties--Configuration Properties--vc++ Directory
--include path (contains directory):
%opencv%\include
%opencv%\include\opencv
%opencv%\include\opencv2
--lib Path (library directory):
%opencv%\x86\vc12\lib
%opencv%\x86\vc12\staticlib
--linker--input--Additional dependencies:
Additional Dependencies (Debug):
%opencv%\x86\vc12\lib\opencv_ts300d.lib%opencv%\x86\vc12\lib\opencv_world300d.lib
Additional Dependencies (Release):
%opencv%\x86\vc12\lib\opencv_ts300.lib%opencv%\x86\vc12\lib\opencv_world300.lib
5. Verification Program
#include "stdafx.h" #include <opencv2/opencv.hpp> #include <iostream> #include <string> using namespace cv;using namespace Std; int main () {Mat image = Imread ("c:\\users\\qing\\desktop\\test-imgs\\1.jpg"); if (Image.empty ()) {cout << "error" << Endl; return-1; } imshow ("image", image); Waitkey (); return 0;}
(Remember to copy the picture to the project, otherwise you will not see the picture)
OPENCV3.0.0+WIN10 64-bit +vs2015 environment download, installation, configuration