Install and configure the OpenCV2.1 for VS2010 under the Win7 system

Source: Internet
Author: User
Tags visual studio 2010

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.