OpenCV Learning Note One OpenCV 2.49 + Eclipse Configuration Tutorial

Source: Internet
Author: User



1. Install OpenCV Library



1.1 Double-click Opencv-2.4.9.exe to install to the specified directory.






1.2 Install VC2010 Run library, Baidu search VC2010 Run library, download and install. If you complete all of the following configuration after running the program prompt also missing files such as DLLs, need to use  repair, enter the manual service, search for the missing DLL files, click Repair.









1.3 Add the paths of the bin, Lib, staticlib three folders under the OPENCV\BUILD\X86\VC11 path to the environment variable.









2. Configuring Eclipse



2.1 Create a new project file--new C + + Project Empty Project









2.2 Add a main.cpp to the project that you just added, and add the following code to it.












2.3 Right-click on the project, properities >c/c++ Build > Settings









2.3.1 Set the Include file, click gcc C + + compileer >includes






Click the Green + button to add the path under the installed OpenCV directory



$\build\include



$\build\include\opencv



$\build\include\opencv2



(ps:$ is the path of the installed OpenCV)






2.3.2 Set the Lib path, click MinGW C + + Linker >libraries



Add libraries



$\build\x86\vc11\lib all the. lib files ending in D, as follows:



opencv_calib3d249d



opencv_contrib249d



opencv_core249d



opencv_features2d249d



opencv_flann249d



opencv_gpu249d



opencv_highgui249d



opencv_imgproc249d



opencv_legacy249d



opencv_ml249d



opencv_nonfree249d



opencv_objdetect249d



opencv_ocl249d



opencv_photo249d



opencv_stitching249d



opencv_superres249d



opencv_ts249d



opencv_video249d



opencv_videostab249d






Extension tip: How to extract the file name (without type) of all files in this directory



1. Go to cmd, enter the disk where the folder is located, for example, C:, and enter the path to the Cd+ folder.



2, input dir/b > Filename.txt.



3. Enter Filename.txt to view all file names.






Add Library Search Path



$\opencv\build\x86\vc11\bin



$\opencv\build\x86\vc11\lib






Complete the above steps to show the results









Click OK, at which time all configuration work is complete, and you can clean project and run, and if the result is as shown, the configuration is successful.









Future projects do not require reconfiguration, only the first configuration of the successful project directory under the. Cproject Overlay to the new project. Cproject and Clean project.



OpenCV Learning Note One OpenCV 2.49 + Eclipse Configuration Tutorial


Related Article

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.