We downloaded opencv. Run unzip. I installed it to D: \ Program.
Files \ opencv. Here, install Program You can open a folder by yourself. That is to say, when selecting the installation path, you only need D: \ Program Files. Step 1, Add reference path to Visual Studio I use vs 2010 (only C ++ is installed ). There are many differences in vs2010 and 2008 configuration paths. . Vs2010 configuration method: View --> property manager --> double-click Microsoft. cpp. win32.user --> VC ++ directory to go to the configuration page. Use % opencv % to indicate your opencv installation path. Add % opencv % \ build \ include to the reference directory.
, % Opencv % \ build \ include \ opencv, and % opencv % \ include. Add the library directory, build \ x86 \ VC10 \ bin, and build \ x86 \ VC10 \ Lib. Step 2, Add dependency Library Double-click Microsoft. cpp. win32.user and find the connector --> enter --> Add dependency. Add the following dependencies: Release Description: (1) 242 indicates version 2.42. If you are using another version, change it to a number. (2) d indicates the test version (debug version ), change to release when the program is released. In this way, your program compilation and link should be okay.
Step 3, Add User Environment Variables CTRL + F5: run the command. The DLL cannot be found. This is because you have not configured opencv
Environment Variable . Add % opencv % \ build \ common \ TBB \ ia32 \ VC10 and % opencv % \ build \ x86 \ VC10 \ bin to your user path.
The order of these three steps can be changed. OK. Now you can show your image o (cost _ cost) O ~~