I. installation and configuration
Opencv1.0 is suitable for VC ++ 6.0. Http://www.opencv.org.cn/index.php/Download can be downloaded from this
Note: Add environment variables during installation (by default ).
1. Add warehouse receiving files, including files and resource files
Tools-options-Directories
Set IIb: Only one, c: \ Program Files \ opencv \ Lib
Set include: multiple, commonly used add (note that there are otherlibs)
Set SRC: multiple, commonly used add
2. Use opencv in projects
In Project-settings-all deployments (Project-Option-set all), select link and add the static library CVD. lib to the object/Library module.
Highguid. Lib cvauxd. Lib cxcored. Lib cvcam. Lib
(It seems that the default setting is for Win32 debug? In the Project Settings dialog box, see the upper left corner)
Ii. Setting of running opencv program on a computer without opencv installed
1. Add a folder under the Program folder (which can be named cv) that contains all common. H files and. Lib files.
2. Add the required. h and. Lib code to the stdafx. h header file.
// Add the header file. Note the difference between <> and "".
# Include "CV/cv. H"
# Include "CV/cxcore. H"
# Include "CV/highgui. H"
// Add the Lib file. If you do not need to add the DLL file, the system automatically searches for the link.
# Pragma comment (Lib, "CV/cvcam. lib ")
# Pragma comment (Lib, "CV/cxcore. lib ")
# Pragma comment (Lib, "CV/cv. lib ")
# Pragma comment (Lib, "CV/cvaux. lib ")
# Pragma comment (Lib, "CV/highgui. lib ")
The code for adding. Lib above is equivalent to adding the. Lib static library in project settings during the first configuration in this article.
3. Add the. dll dynamic library under the Program folder or the debug folder.
Then, the program can run on any machine without opencv installed.