Sorry, you need to enable JavaScript to visit this website.

opencv example application

Unsolved
7 posts / 0 new
omkar's picture
omkar
Junior(0)
opencv example application

Hello,
I'm trying to run the example OpenCV application in the SDK on zedboard. But when I'm trying to run it , there is an error.
error: while loading shared libraries: libavformat.so.54: cannot open shared object file: No such file or directory
By following the below link
https://www.xilinx.com/support/documentation/sw_manuals/xilinx14_7/SDK_D...
I use the setenv  LD_LIBRARY_PATH = /usr/lib/opencv and try to run, error is
setenv: not found
Then I've copied the opencv libraries from the sdk's opencv to SD card from SSH terminal, mounted the sd card on to /mnt folder and given the below command in the Run configuration dialog box
export LD_LIBRARY_PATH = /mnt/opencv   then it says
export: : bad variable name
 
Does any one have an idea how to solve this ?
Regards

AlbertaBeef's picture
AlbertaBeef
Moderator(5)
You need opencv libraries on PC, as well on embedded platform

You need the opencv libraries on your development PC, as well as on the embedded Zynq platform.

I would recommend looking at the following Xiinx Base TRD design for more details:

   http://www.wiki.xilinx.com/Zynq+Base+TRD+2015.4

What tool version are you using ?

What hardware are you targetting ?

If you are using ZedBoard, you can also consult the following design, which is a port of the Xilinx Base TRD to ZedBoard.

   ZedBoard + FMC-HDMI-CAM + PYTHON-1300-C Vivado HLS Reference Design, Vivado 2015.4

      http://zedboard.org/sites/default/files/design/FMCHC_PYTHON1300C_HLS_201...

Regards,

Mario.

omkar's picture
omkar
Junior(0)
Trying to compile the OpenCV using PetaLinux

Thanks Alberta for the reply.
I'm using 2015.2 version.
And targeting Zedboard.
From the ug1144 , Pg:62 I tried to add the opencv libraries from SDK folder.
Now I used 'find' to know if the libraries are included in the newly built petalinux. Including the screenshot below

When I run,
error: while loading shared libraries: libavformat.so.54: cannot open shared object file: No such file or directory
Also I edited the makefile accordingly while adding the libraries. 
Also I'm looking into the links you've provided and will revert back if there is any progress
Regards 

omkar's picture
omkar
Junior(0)
Used TRD

I've used the TRD uImage to run the example application and it worked fine. But for my application, it is not working. Error is

OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. 

 

So, I'm again trying to add OpenCV libraries to petalinux. Rather than ug1144 can anyone suggest a more detailed user guide

 

Regards

AlbertaBeef's picture
AlbertaBeef
Moderator(5)
Use ldd to find the shared library dependencies

Try using a utility like "ldd" to find the shared libary dependencies of your application.

Based on your findings, you can install the missing packages.

Regards,

Mario.

zedhed's picture
zedhed
Moderator(25)
RE: opencv example application

Hi omkar,

I was able to run the following command on my PetaLinux build without seeing an error:

export LD_LIBRARY_PATH='/mnt/opencv'

Adding spaces into that command will cause it to have an error.

I think that PetaLinux is using a BusyBox shell environment so it does not have all the full features that a full desktop Linux system has so you may still have trouble with LD seeing the new libraries.

I know that perhaps this is not an elegant solution, but it may get you past this hurdle. By default the LD search path is supposed to look in /lib first. Can you simply copy all of your opencv libraries into there?

Regards,

-Kevin

omkar's picture
omkar
Junior(0)
Build Petalinux error

Hi Kevin & Mario,
[1] while using ldd, a message saying that "it is not a dynamic executable" so I tried using readelf and... all the shared libraries are present in the image created
[2] While building petalinux again, this error is coming. "[ALL  ] /opt/pkg/petalinux-v2015.2.1-final/components/linux-kernel/xlnx-3.19/Makefile:925: recipe for target 'vmlinux' failed
[ERROR] make[4]: *** [vmlinux] Error 1" I've searched and found to disable docsrc in kernel. But it is already disabled. Also i've tried to disable the advanced bootable images storage settings in auto hardware settings from petalinx-config. But no use. Can you please say me how to solve this ?