Invalid MEX-file libopencv_core.so.2.4: cannot open shared object file: No such file or directory
Afficher commentaires plus anciens
Hi,
Sorry my question may be a little bit long because I need to explain the steps to get this error.
So I was trying to run this somewhat old (2014) matlab code here to calibrate the omnicam on a linux computer. You can get the download link from their site "Calibration code for Linux/Windows (including test images): libomnical.zip (50 MB)"
And following its readme, to install, you should first set up paths in init.m and run make.m under the /src folder. There I met several errors, some are the same in this solution, and the other complains not finding <opencv2/opencv.hpp>, so eventually I change the line in the make.m under /src/Mapping/Geometry_Model/Projection/Mex, from
mex('rodriguesMex.cpp',['-L',opts.opencv_lib_dir], '-lopencv_core', '-lopencv_imgproc', '-lopencv_highgui', '-lopencv_features2d', '-lopencv_calib3d')
to
mex('rodriguesMex.cpp',['-L',opts.opencv_lib_dir], ['-I"',opts.opencv_inc_dir,'"'],'-lopencv_core', '-lopencv_imgproc', '-lopencv_highgui', '-lopencv_features2d', '-lopencv_calib3d')
to add include directory.
Now I can successfully run the make.m under /src to install. And I'm going to run the calibration code, which is "omni_calibration.m" under /src/Calibration. However it returns with this error message:
Invalid MEX-file
'/media/kudo/toshiba_4T/omnicam/libomnical/LibOmniCal/src/Mapping/Geometry_Model/Projection/Mex/rodriguesMex.mexa64':
libopencv_core.so.2.4: cannot open shared object file: No such file or directory
and I have no clue why it would happen since I thought properly installed it and this file "libopencv_core.so.2.4" is actually in my lib directory.
opts.opencv_lib_dir = '/home/kudo/anaconda3/pkgs/opencv-2.4.11-nppy27_0/lib';
opts.opencv_inc_dir = '/home/kudo/anaconda3/pkgs/opencv-2.4.11-nppy27_0/include';
and
(base) kudo@alien:~/anaconda3/pkgs/opencv-2.4.11-nppy27_0/lib/opencv2$ locate libopencv_core.so.2.4
/home/kudo/anaconda3/pkgs/opencv-2.4.11-nppy27_0/lib/libopencv_core.so.2.4
/home/kudo/anaconda3/pkgs/opencv-2.4.11-nppy27_0/lib/libopencv_core.so.2.4.11
Please help since this is a reletaively old code and may not be maintained anymore.
Thanks in advance!
1 commentaire
Walter Roberson
le 1 Juil 2021
Could you verify that your two libopencv_core_so.2.4* files are real files? Or at least that if the .2.4 file is a link that it points to someplace that exists or is a hard-link to the .11 file ?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Programming dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!