Giter Club home page Giter Club logo

Comments (4)

mohsenali avatar mohsenali commented on June 19, 2024

recently I was having the same problem. Just set up the LD_LIBRARY_PATH as
environment variable, to the directory containing your opencv libraries (i
put it in the .bashrc). then restart you matlab. It should solve it.

On Mon, Mar 18, 2013 at 1:47 PM, Andreas Kotowicz
[email protected]:

I get an invalid mex-file error but all my libraries are ok:

Example nbr 1:

run:
detector = cv.CascadeClassifier('haarcascade_frontalface_alt.xml');

output:

Invalid MEX-file '/tmp/+cv/private/CascadeClassifier_.mexa64':
/usr/local/lib/libopencv_highgui.so.2.4: undefined symbol:
_ZNK9QCheckBox15minimumSizeHintEv`

Example nbr 2:

run:

cv.imread

output:
Error using cv.imread
Invalid MEX-file '/tmp/+cv/imread.mexa64':
/usr/local/lib/libopencv_highgui.so.2.4: undefined symbol:
_ZNK9QCheckBox15minimumSizeHintEv

Outout from ldd /usr/local/lib/libopencv_highgui.so.2.4:

linux-vdso.so.1 => (0x00007fff2436d000)
libopencv_core.so.2.4 => /usr/local/lib/libopencv_core.so.2.4 (0x00007ff54dd6c000)
libopencv_imgproc.so.2.4 => /usr/local/lib/libopencv_imgproc.so.2.4 (0x00007ff54d88b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff54d633000)
libGL.so.1 => /usr/lib/nvidia-current-updates/libGL.so.1 (0x00007ff54d316000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007ff54d0c6000)
libpng12.so.0 => /share/pkgs/MATLAB/R2012b/bin/glnxa64/libpng12.so.0 (0x00007ff54cea0000)
libtiff.so.4 => /usr/lib/x86_64-linux-gnu/libtiff.so.4 (0x00007ff54cc3d000)
libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007ff54c9e6000)
libIlmImf.so.6 => /usr/lib/libIlmImf.so.6 (0x00007ff54c724000)
libHalf.so.6 => /usr/lib/libHalf.so.6 (0x00007ff54c4e1000)
libgstreamer-0.10.so.0 => /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0 (0x00007ff54c1fa000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007ff54bfaa000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007ff54bcb5000)
libgstapp-0.10.so.0 => /usr/lib/x86_64-linux-gnu/libgstapp-0.10.so.0 (0x00007ff54baa9000)
libgstvideo-0.10.so.0 => /usr/lib/x86_64-linux-gnu/libgstvideo-0.10.so.0 (0x00007ff54b88c000)
libdc1394.so.22 => /usr/lib/x86_64-linux-gnu/libdc1394.so.22 (0x00007ff54b619000)
libv4l1.so.0 => /usr/local/lib/libv4l1.so.0 (0x00007ff54b413000)
libavcodec.so.54 => /usr/local/lib/libavcodec.so.54 (0x00007ff54a56f000)
libavformat.so.54 => /usr/local/lib/libavformat.so.54 (0x00007ff54a24c000)
libavutil.so.51 => /usr/local/lib/libavutil.so.51 (0x00007ff54a026000)
libswscale.so.2 => /usr/local/lib/libswscale.so.2 (0x00007ff549dda000)
libQtOpenGL.so.4 => /share/pkgs/MATLAB/R2012b/bin/glnxa64/libQtOpenGL.so.4 (0x00007ff549af0000)
libQtGui.so.4 => /share/pkgs/MATLAB/R2012b/bin/glnxa64/libQtGui.so.4 (0x00007ff548e12000)
libQtCore.so.4 => /share/pkgs/MATLAB/R2012b/bin/glnxa64/libQtCore.so.4 (0x00007ff548963000)
libQtTest.so.4 => /usr/lib/x86_64-linux-gnu/libQtTest.so.4 (0x00007ff54873d000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff548441000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff548140000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff547f2a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff547b6b000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff547953000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff54774b000)
libtbb.so.2 => /share/pkgs/MATLAB/R2012b/bin/glnxa64/libtbb.so.2 (0x00007ff54760c000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff54e44a000)
libnvidia-tls.so.304.64 => /usr/lib/nvidia-current-updates/tls/libnvidia-tls.so.304.64 (0x00007ff547408000)
libnvidia-glcore.so.304.64 => /usr/lib/nvidia-current-updates/libnvidia-glcore.so.304.64 (0x00007ff54501e000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff544cea000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007ff544ad8000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff5448d4000)
libImath.so.6 => /usr/lib/libImath.so.6 (0x00007ff5446cd000)
libIex.so.6 => /usr/lib/libIex.so.6 (0x00007ff5444ae000)
libIlmThread.so.6 => /usr/lib/libIlmThread.so.6 (0x00007ff5442a7000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007ff5440a3000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007ff543d47000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007ff543b3f000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ff543902000)
libgstbase-0.10.so.0 => /usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0 (0x00007ff5436ae000)
liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007ff543433000)
libraw1394.so.11 => /usr/lib/x86_64-linux-gnu/libraw1394.so.11 (0x00007ff543223000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007ff543014000)
libv4l2.so.0 => /usr/local/lib/libv4l2.so.0 (0x00007ff542e08000)
libxvidcore.so.4 => /usr/lib/x86_64-linux-gnu/libxvidcore.so.4 (0x00007ff542ad0000)
libx264.so.128 => /usr/local/lib/libx264.so.128 (0x00007ff542747000)
libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007ff542278000)
libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007ff54204b000)
libtheoraenc.so.1 => /usr/lib/x86_64-linux-gnu/libtheoraenc.so.1 (0x00007ff541e0e000)
libtheoradec.so.1 => /usr/lib/x86_64-linux-gnu/libtheoradec.so.1 (0x00007ff541bf3000)
libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x00007ff5419d6000)
libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x00007ff54179c000)
libmp3lame.so.0 => /usr/lib/x86_64-linux-gnu/libmp3lame.so.0 (0x00007ff541512000)
libfaac.so.0 => /usr/lib/libfaac.so.0 (0x00007ff5412ff000)
libfreetype.so.6 => /share/pkgs/MATLAB/R2012b/bin/glnxa64/libfreetype.so.6 (0x00007ff541080000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007ff540e75000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007ff540c6c000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007ff540a66000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007ff54082f000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff540611000)
libv4lconvert.so.0 => /usr/local/lib/libv4lconvert.so.0 (0x00007ff54039c000)
libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007ff540195000)
libexpat.so.1 => /share/pkgs/MATLAB/R2012b/bin/glnxa64/libexpat.so.1 (0x00007ff53ff6c000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff53fd69000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff53fb62000)

This is ubuntu 12.04 with opencv 2.4.4a.


Reply to this email directly or view it on GitHubhttps://github.com//issues/64
.

from mexopencv.

kotowicz avatar kotowicz commented on June 19, 2024

hmm, doesn't help.
I found this link but it didn't help since I have all qt libraries installed.

what's the best way to debug this?

from mexopencv.

amroamroamro avatar amroamroamro commented on June 19, 2024

Compare the output of ldd on the MEX-file both run from inside MATLAB and on the system shell (similar to #62).

Take note of the Qt libraries. If there is a mismatch, try using LD_LIBRARY_PATH and/or LD_PRELOAD tricks

from mexopencv.

kotowicz avatar kotowicz commented on June 19, 2024

Problem goes away using the correct preloading:

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libQtCore.so:/usr/lib/x86_64-linux-gnu/libQtGui.so:/usr/lib/x86_64-linux-gnu/libQtOpenGL.so /usr/local/bin/matlab-2012b

from mexopencv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.