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.