1
votes

I've downloadad the SUN benchmark code from MIT:

version 2: http://people.csail.mit.edu/jxiao/SUN/source_code/

Once I download the 15 image dataset and run the function:

 compute_features.m 

I get an Invalid MEX file error:

Invalid MEX-file
'/home/arturo/Documents/Virality/reddit_data/SUN_source_code_v2/code/OpenCVmexWrapper/cvlib_mex.mexa64':
libcv.so.1: cannot open shared object file: No such file or directory

The file /home/arturo/Documents/Virality/reddit_data/SUN_source_code_v2/code/OpenCVmexWrapper/cvlib_mex.mexa64 actually does exist, so I'm thinking the problem hast to do with libcv.so.1, or the .mexa64 file is broken (which is very unlikely)

I read something about adding a path via LD_LIBRARY_PATH when I googled the error, but I'm not sure what path I should exactly add, at least temporarily. I have opencv installed along with its library, so I'm not sure what the problem is. My current system is Ubuntu 12.04 64bit.

There's a similar question here, but the answer says that for their specific case they have the source code of the MEX files posted, which is not the same fortune I have: running old mex file on new matlab releases

1

1 Answers

0
votes

Found the answer. The key is to link explicitly to the folder the file 'libcv.so.1' is in just before running matlab.

so in the matlab folder:

LD_LIBRARY_PATH=/home/arturDocuments/Virality/reddit_data/SUN_source_code_v2/code/scene_sun ./matlab

And in matlab:

matlab>> compute_feature

Compling the source code in the other folders is also necessary.(vlfeat,VOC,libsvm). As well as editing the path in the function im2superpixels @ GeometricContext_dhoiem from :

segcmd = '../segment_pedro/segment 0.8 100 100';

to:

segcmd = '/YOUR_PATH/SUN_source_code_v2/code/segment_pedro/segment/ 0.8 100 100';

*(The folder is one level above.)