3

I'm trying to use opencv with xubuntu on odroid board.

Download the opencv2.4.8 and executed the following commands

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

followed by opencv linux install

but I got an error when I typed 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

If I missed some libs, please tell me what kind of lib is needed and what I should do.


I solved this problem by downloading these libs.

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

but this error appears.

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
Tejus Prasad
  • 6,322
  • 7
  • 47
  • 75
user3203585
  • 35
  • 1
  • 2
  • 5
  • Yes, you need to get (install by apt-get or compile) several libs. Here is an "official" good script for this https://help.ubuntu.com/community/OpenCV – old-ufo Feb 03 '14 at 08:03
  • I try to install opencv following your web site. but it didn't work. I have some make err. and I can't find what kinds of lib missed yet. – user3203585 Feb 03 '14 at 13:23
  • Please, write which errors you get. – old-ufo Feb 04 '14 at 04:19
  • I have exactly the same error in blackberry 10 with libavcodec of ffmpeg. if you manage to solve this problem please let me know, I will do so if I find the solution first – Filipe Figueiredo Feb 09 '14 at 03:39
  • I solved it using sudo apt-get install libopencv-* It's worked. – user3203585 Feb 14 '14 at 17:08

2 Answers2

2

If anyone still facing the issues with open cv in odroid, they can look into this link http://forum.odroid.com/viewtopic.php?f=77&t=7445

You can download the image which has Ubuntu 14.04 Robotics Edition for ODROID-U3 (ROS+OpenCV+PCL) from that link. Open CV is preinstalled and the USB camera works fine.

If you need OS installation instructions you can find some steps here http://com.odroid.com/sigong/blog/blog_list.php?bid=130

Tejus Prasad
  • 6,322
  • 7
  • 47
  • 75
1

I had the same problem with the U3. I tried three things:

  1. Compiling OpenCV as you do, with the same errors,
  2. Using the Ubuntu 12.11 Robotics Edition with Open CV, ROS and other libraries (the libraries worked, but it has problems detecting wireless networks), and
  3. Installing the libraries like this sudo apt-get install libopencv-xxx. The last method worked with XUbuntu, but I could not use VideoCapture, as it shows V4L error.
Sebastian Simon
  • 18,263
  • 7
  • 55
  • 75
  • I forgot to tell that I tried installing all libraries you listed (-lopenal, lxvidcore and so on) but a new compiling error associated to highgui appears. Odroid forum has some related threads like this: http://forum.odroid.com/viewtopic.php?f=77&t=3375 – user3271086 Feb 05 '14 at 09:04
  • yes, I tried method 3. It works. Do you know how can i use videocapture? – user3203585 Feb 05 '14 at 11:21
  • VideoCapture tries to open the USB device located in /dev/videoN, where N = 0,1,2,.... Usually it opens /dev/video0. I made some test and XUbuntu associates /dev/video10 when connecting the webcam. Check for example the output from guvcview (an app similar to cheese). It seems the big problem is that VideoCapture is not able to handle index 10 (it is too high). In this link they provide a shell script to solve the problem. Be careful. I executed it without internet connection and the kernel was damaged, so the eMMC does not respond any longer: http://forum.odroid.com/viewtopic.php?f=77&t=3375 – user3271086 Feb 05 '14 at 14:35