3

我正在尝试在 odroid 板上将 opencv 与 xubuntu 一起使用。

下载opencv2.4.8并执行以下命令

cmake -D CMAKE_BUILD_TYPE=REALEASE _D CMAKE_INSTALL_PREFIX=/usr/local/opencv make

其次是 opencv linux安装

但是当我输入make.

[  9%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_v4l.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_sunras.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_base.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_bmp.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_pxm.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_imageio.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_jpeg2000.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_png.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_exr.cpp.o
[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_tiff.cpp.o
[ 11%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_jpeg.cpp.o
[ 11%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/bitstrm.cpp.o
Linking CXX shared library ../../lib/libopencv_highgui.so
/usr/bin/ld: cannot find -lopenal
/usr/bin/ld: cannot find -lxvidcore
/usr/bin/ld: cannot find -lx264
/usr/bin/ld: cannot find -lssh
/usr/bin/ld: cannot find -lmodplug
/usr/bin/ld: cannot find -lfaac
/usr/bin/ld: cannot find -lopenal
/usr/bin/ld: cannot find -lxvidcore
/usr/bin/ld: cannot find -lx264
/usr/bin/ld: cannot find -lssh
/usr/bin/ld: cannot find -lmodplug
/usr/bin/ld: cannot find -lfaac
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_highgui.so.2.4.8] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2

如果我错过了一些库,请告诉我需要什么样的库以及我应该做什么。


我通过下载这些库解决了这个问题。

libopenal-dev
libxvidcore-dev
libx264-dev
libssh-dev
libmodplug-dev
libfaac-dev
libopenal-dev
libxvidcore-dev
libx264-dev
libssh-dev
libmodplug-dev
libfaac-dev

但出现此错误。

Linking CXX shared library ../../lib/libopencv_highgui.so
/usr/local/lib/libavcodec.a(videodsp_armv5te.o): In function `ff_prefetch_arm':
/home/odroid/odroid-sources/sources/ffmpeg/libavcodec/arm/videodsp_armv5te.S:29:(.text+0x8): relocation truncated to fit: R_ARM_THM_JUMP19 against symbol `ff_prefetch_arm' defined in .text section in /usr/local/lib/libavcodec.a(videodsp_armv5te.o)
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_highgui.so.2.4.8] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
4

2 回答 2

2

如果有人仍然面临在 odroid 中打开 cv 的问题,他们可以查看此链接 http://forum.odroid.com/viewtopic.php?f=77&t=7445

您可以从该链接下载具有 Ubuntu 14.04 Robotics Edition for ODROID-U3 (ROS+OpenCV+PCL) 的图像。Open CV 已预装,USB 摄像头工作正常。

如果您需要操作系统安装说明,您可以在此处找到一些步骤 http://com.odroid.com/sigong/blog/blog_list.php?bid=130

于 2015-01-09T06:06:22.840 回答
1

U3也有同样的问题。我尝试了三件事:

  1. 像你一样编译 OpenCV,但有同样的错误,
  2. 将 Ubuntu 12.11 Robotics Edition 与 Open CV、ROS 和其他库一起使用(这些库有效,但在检测无线网络时存在问题),以及
  3. 像这样安装库sudo apt-get install libopencv-xxx。最后一种方法适用于 XUbuntu,但我无法使用 VideoCapture,因为它显示 V4L 错误。
于 2014-02-04T14:11:27.157 回答