Assume that opencv has been installed in the C:/program files/opencv/folder by default.
Steps:
1. Rename the file. Go to the C:/program files/opencv/bin/directory. You can see several. DLL files with 097 file names. Copy these files and change 097 to 096. (For example, if cv097.dll is changed to cv096.dll, cvaux, cvcam, cxcore, and highgui are also renamed .) (You can run the following command at the command prompt: Copy * 097.dll * 096.dll );
2. Set the system variable path. Add the C:/program files/opencv/bin directory and C:/program files/opencv/otherlibs/highgui paths to the system variable path. The add method is not described in detail. Don't forget to separate the semicolons in English.
3. Set Dev-C ++. Open the dev-C ++ menu [tools]-> [compilation options]. On the "compiler" option page, tick "Add the following command to the connector command line ", enter-lhighgui-LCV-lcxcore-lcvaux-lcvcam in the text box, which tells the connector to connect your program to the opencv library, and then switch to the "directory" option page, on the "library" sub-tab page, add the directory c:/program files/opencv/LIB; then switch to the "C inclusion directory" sub-tab page and add the following five directories: C: /program files/opencv/cxcore/include
C:/program files/opencv/cV/include
C:/program files/opencv/otherlibs/highgui
C:/program files/opencv/cvaux/include
C:/program files/opencv/otherlibs/cvcam/include
Change to the "C ++ files included" subtab page to add the same five directories.
OK. You can compile the following examples of opencv to test it.
Reference: http://qevan.blogspot.com/2006/04/howto-setup-opencv-rfc-cambridge-wiki.html
This article also describes how to set opencv as the vs2005 service and G ++ service on the Linux platform.
Many of the Development of opencv is compiled by the visual C compiler. Are there any other options? Obviously, for example, GCC under the command line can be used with cygwin to compile executable programs under Win32. In addition, mingw-based open-source integrated development environment Dev-C is also a good choice.
I recently saw an article about how to configure opencv in Dev-C ++ on the Internet, but I think it is too complicated. See Dev-C ++ to configure opencv.
Here is a simple setup method. (Assume that you have installed opencv and created your project)
First, open project option-> directories, and add the opencv path and the path of your own project in include directories. In general, the include path of opencv you may use includes % opencv %/cxcore/include, % opencv %/cV/include, % opencv %/cvaux/include and % opencv %/otherlibs/highgui. You can make a trade-off based on your actual usage. If you do not know what you will use, you can add them all, as shown in.
Add % opencv %/lib/cxcore to the linker in project option-> parameters. lib, % opencv %/lib/cv. lib, % opencv %/lib/cvaux. lib and % opencv %/lib/highgui. lib and include directories to the corresponding lib library. If this setting is missing, it is okay when your program is compiled into the target file, but it cannot be connected, so it must be added.
OK. This takes two simple steps to compile your project. Good luck