Integrate OpenCV with Eclipse in Ubuntu

Source: Internet
Author: User
Preparations: Install Eclipse and CDT in Ubuntu. For more information, see http://www.linuxidc.com/linux/2011-01/31367.htm. The following describes how to integrate OpenCV1: Install OpenCV at http://www.linuxidc.com/linux/2012-12/75641.htm.pdf.

Preparations: Install Eclipse and CDT in Ubuntu. Not here, refer to the http://www.linuxidc.com/Linux/2011-01/31367.htm.

The following describes how to integrate OpenCV.

1: Install OpenCV can see OpenCv installation http://www.linuxidc.com/Linux/2012-12/75641.htm default installation directory is/usr/local/include

2: Create a C ++ project. Right-click the new project and choose C ++ Build-> Settings in the project properties. You need to set the compiler parameters here. Add/usr/local/include/opencv; and/usr/local/include/opencv2 in include paths of gcc c ++ Compiler-> Directories.

3: terminal Input

Pkg-config -- libs opencv

My display is as follows:

/Usr/local/lib/libopencv_calib3d.so/usr/local/lib/libopencv_contrib.so/usr/local/lib/libopencv_core.so/usr/local/lib/users/usr/local/lib/Libraries /usr/local/lib/libopencv_gpu.so/usr/local/lib/libopencv_highgui.so/usr/local/lib/libraries/usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_nonfree.so/usr/local/lib/users/usr/local/lib/libopencv_photo.so/usr/local/lib/users/usr/local/lib/libopencv_ts.so /usr/local/lib/libopencv_video.so/usr/local/lib/libopencv_videostab.so

This means:

Find gcc c ++ Linker and add these libraries to the First in Library search path (-L) on the right.

Note:

When you add a library in eclipse, usr/local/lib contains libopencv _ ***, and opencv _ *** in eclipse, Which is case sensitive.

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.