OPENCV 2.4.10 +vs2010 project configuration record

Source: Internet
Author: User

Because the work needs, a little research on OPENCV image processing, the main purpose is to sharpen the image, Gaussian blur and other processing;

Record your own installation of VS2010 and OPENCV configuration process, easy to view the use of the development environment to build:

1. Download the installation OpenCV, go to the official website http://opencv.org/can download the latest version of OpenCV, here is OpenCV 2.4.10

Installation of the Fool-style, the latest version of the installation is equivalent to extract to the installation directory you specified

2. Configure environment variables, my computer?? Property?? Senior?? Environment variables

Edit Ptah:

For 32-bit systems, add:

"; XX Your installation directory Xx\opencv\build\x86\vc10\bin "(with"; ") to separate)

For 64-bit systems, you can add both:

”; XX Your installation directory Xx\opencv\build\x86\vc10\bin "

and "; XX Your installation directory Xx\opencv\build\x64\vc10\bin "

3. Configuration in the VS2010

A. Project include directory configuration

Menu bar Pastry < View >--< Property Manager, in the new Property Manager workspace, click Project->debug| Win32->microsoft.cpp.win32.userdirectories (Right-click Property, or Double-tap) to open the Properties page.

"Common Properties", "VC + + Directory", "Include Directories" added

Xx\opencv\build\include

Xx\opencv\build\include\opencv

Xx\opencv\build\include\opencv2 these three directories.

Note that changes are based on their own paths;

B. Engineering Library catalog configuration

Property Manager workspace, click Project->debug| Win32->microsoft.cpp.win32.userdirectories (anti-key attribute, or double-click) to open the Properties page.

Next step, in the "Common Properties", "VC + + Directory", "Library directory", add

Xx\opencv\build\x86\vc10\lib

C. link library Configuration

Property Manager workspace, click Project->debug| You can open the Properties page by Win32->microsoft.cpp.win32.userdirectories (the inverse key attribute, or double-click). Additional dependencies, input, common properties, linker, add the following content:

Opencv_calib3d2410.lib
Opencv_calib3d2410d.lib
opencv_contrib2410.lib
Opencv_contrib2410d.lib
Opencv_core2410.lib
Opencv_core2410d.lib
opencv_features2d2410.lib
Opencv_features2d2410d.lib
Opencv_flann2410.lib
Opencv_flann2410d.lib
opencv_gpu2410.lib
Opencv_gpu2410d.lib
Opencv_ Highgui2410.lib
Opencv_highgui2410d.lib
opencv_imgproc2410.lib
Opencv_imgproc2410d.lib
Opencv_ Legacy2410.lib
Opencv_legacy2410d.lib
opencv_ml2410.lib
Opencv_ml2410d.lib
Opencv_nonfree2410.lib
Opencv_nonfree2410d.lib
Opencv_objdetect2410.lib
opencv_objdetect2410d.lib
Opencv_ocl2410.lib
Opencv_ocl2410d.lib
Opencv_photo2410.lib
opencv_photo2410d.lib
Opencv_stitching2410.lib
Opencv_ Stitching2410d.lib
Opencv_superres2410.lib
opencv_superres2410d.lib
Opencv_ts2410.lib
Opencv_ Ts2410d.lib
Opencv_video2410.lib
opencv_video2410d.lib
Opencv_videostab2410.lib
Opencv_ Videostab2410d.lib

4. OK, you're done, you can use OPENCV to do what you want to do!

A simple test code

#include <iostream>  #include <opencv2/core/core.hpp>  #include <opencv2/highgui/highgui.hpp >  using namespace CV;    int main ()  {      Mat img=imread ("pic.jpg");//read into a picture    Namedwindow ("Test");      Create a imshow named Test window    ("Test", IMG);   The window shows the image    Waitkey (;            Wait for 5000ms window to close automatically}  

OPENCV 2.4.10 +vs2010 project configuration record

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.