To re-develop an opportunity OpenCV2.1 program, you need to install and configure OpenCV2.1 for VS2010 under the Win7 system. Online to find a few tutorials are not properly configured, finally found an English installation of the post, simple and clear implementation of the configuration. To make it easier for you to see later and the possible needs of others, now record the configuration process.
Please see the original thread: http://opencv-srf.blogspot.it/2011/09/getting-started-with-opencv_16.html
Installing & Configuring OpenCV2.1 with VS 2010
installation
You can download the latest OpenCV library from its sourceforge.net page. But for Windows 7, Windows Vista or Windows XP SP3 users, it's easy to download Latest OpenCV windows executable (. exe) F Ile and just double click it to install.
Once You has completed installing, you need to change some settings in your IDE so that it knows where to find the Librar Y files and header files of OpenCV. I ' ll demonstrate the configuring process of Microsoft Visual Studio 2010. (The configuration process is same for Microsoft Visual C + + Express Edition (free))
Steps to Configure Microsoft Visual Studio
- Start Microsoft Visual Studio 2010
- Go to File>new>project>visual c++>win32>win32 Console application. Enter a name, say "HelloWorld" for your application and then click OK
|
Creating Visual C + + application |
- In Visual Studio 2008
- Go to ' Tools > Options > Projects and Solutions '
- In Visual Studio 2010
- Go to ' Project > Properties ' or ' Project > Helloworld Properties '
- Don ' t forget to select configurations as ' All configurations ' as illustrated below
- In the left pane, click ' Configuration properties>vc++ directories '
- In Include directories, add ' C:\OPENCV2.1\INCLUDE\OPENCV '
- In Library directories, add ' C:\OpenCV2.1\lib '
- In Source directories, add ' C:\OPENCV2.1\SRC\CV; C:\OpenCV2.1\src\cvaux; C:\OpenCV2.1\src\cxcore; C:\OpenCV2.1\src\highgui; C:\OpenCV2.1\src\ml '
|
Configuring Microsoft Visual Studio for OpenCV |
- In the left pane, Click ' Configuration Properties > Linker > Input '
- In Additional Dependencies, add ' cv210.lib; Cxcore210.lib; Highgui210.lib; Cvaux210.lib; Ml210.lib '
|
Configuring Microsoft Visual Studio for OpenCV |
Now you're ready-to-write your first computer vision program using the ' OpenCV ' library with Visual C + +.
Install and configure the OpenCV2.1 for VS2010 under the Win7 system