Opencv installation and configuration vc6.0-[opencv]
Reprinted from
Http://flydreamersu.blogbus.com/logs/38775714.html
After opencv is installed
Compile opencv
Open the _ make folder under the opencv installation directory and start opencv. DSW project (for example, C:/opencv/_ make/opencv. DSW); select build ---- batch build in VC. If no 64-bit build is selected, click build. In this way, some lib and DLL versions, including release and debug, are generated.
The following error may occur during the generation process:
"Fatal error lnk1181: Unable to open the input file" cvauxd. lib"
"Error c2039:" foreground_regions ": Not a member of" cvfgdstatmodel"
Solution: Open the cvaux in the include/external file of the cvaux project in solution manager. h file. Find the foreground_regions member and you will find that the member has been commented out. Change "/" at the end of the last line to "*/" to make the Member visible, start the project again and you can compile it. This problem occurs in opencv beta5 and opencv RC1 versions. This bug will be solved in later versions.
Start another project "opencv_directshow.dsw" under the _ make directory to compile the project;
Methods for adding and storing files:
C:/OpenCV/cv/include
C:/OpenCV/cvaux/include
C:/OpenCV/otherlibs/highgui
C:/OpenCV/cxcore/include
C:/OpenCV/otherlibs/cvcam/include
(The above files are common files. If necessary, you can add other files that contain them.) Add the files to the database:
C:/OpenCV/lib
Configuration item:
Select "project"-> "Settings..." to activate the project configuration dialog box.
Select your project on the left.
Adjustment settings are effective for both release and debug configurations:
Select "settings for:"-> "all deployments"
Select "C/C ++" tab-> "Preprocessor" category-> "Additional include directories :".
Add a comma-separated relative path (for file. DSP) or an absolute path D:/opencv/cxcore/include,
d:/opencv/cv/include,d:/opencv/otherlibs/highgui, d:/opencv/cvaux/include(optionally,)
Select "Link" tab-> "input" category-> "Additional library path :".
Path to add the input Library (cxcore [D]. Lib CV [D]. Lib hihghui [D]. Lib cvaux [D]. Lib) D:/opencv/lib
Adjust the "debug" Configuration:
Select "settings for:"-> "Win32 debug ".
Select "Link" tab-> "general" category-> "Object/library modules ".
Add spaces to separate CVD. Lib, cxcored. Lib highguid. Lib, cvauxd. Lib (optionally)
You can change the name and location of the output file. If you want to place the generated. EXE file in the project directory instead of the debug/subdirectory,
You can type./d.exe in "Link" tab-> "general" category-> "output file name :"
Adjust the "release" configuration
Select "settings for:"-> "Win32 release ".
Select "Link" tab-> "general" category-> "Object/library modules ".
Add space-separated cv. Lib cxcore. Lib highgui. Lib cvaux. Lib (optionally)
Add a property project to Workspace:
Select "project"-> "insert project into workspace ".
Select opencv/cV/make/cv. DSP.
Similarly, for opencv/cvaux/make/cvaux. DSP, opencv/otherlibs/highgui. DSP.
Set From attributes:
Choose "project"-> "dependencies ..."
Select "cxcore" for "CV ",
Select "CV", "cxcore" for "cvaux ",
Select "cxcore" for "highgui ",
For your project, select ALL: "cxcore", "CV", "cvaux", "highgui ".
Attribute configuration ensures that the opencv library is automatically re-compiled when the source code is changed.
Static library settings:
The opencv program requires static library settings. The static library of its release version is under the lib directory of the system,
In its debug version, the static library needs to re-compile all programs.
Dynamic library settings:
Opencv requires support from some dynamic libraries. These dynamic libraries must be stored in the system directory or the current directory.
. Cv097.dll, cvaux097.dll, cvcam097.dll, cxcore097.dll,
highguid097.dll,libguide40.dll