可能重复:
ubuntu 11.10 上的 OpenCV
我很难在 Ubuntu 上安装 OpenCV。我相信我已经安装了 OpenCV;但是,我正在尝试使用 Eclipse 编译示例程序 kalman.cpp 之一,但我无法编译它。我相信我的问题是与图书馆链接。
看了很多教程,不明白为什么在我的电脑上安装opencv后,使用命令后得到以下输出pkg-confi opencv --libs
:
manuel@manuel:~$ sudo pkg-config opencv --libs
/usr/local/lib/libopencv_calib3d.so
/usr/local/lib/libopencv_contrib.so /usr/local/lib/libopencv_core.so
/usr/local/lib/libopencv_features2d.so
/usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_gpu.so
/usr/local/lib/libopencv_highgui.so
/usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_legacy.so
/usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_nonfree.so
/usr/local/lib/libopencv_objdetect.so
/usr/local/lib/libopencv_photo.so
/usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_ts.so
/usr/local/lib/libopencv_video.so
/usr/local/lib/libopencv_videostab.so
那里的每个教程库都显示为:
-L/where/you/have/installed/opencv/lib -lcxcore -lcv -lhighgui -lcvaux
这真的很烦人,因为 Eclipse 找不到 libopencv_contrib.so 库。它正在等待 -lopencv_contrib
我真的很感激帮助。请让我知道我做错了什么。