laurentkneip / opengv

OpenGV is a collection of computer vision methods for solving geometric vision problems. It is hosted and maintained by the Mobile Perception Lab of ShanghaiTech.
Other
1.02k stars 353 forks source link

Add bash script for automatic MEX compilation in Linux #56

Closed jbriales closed 5 years ago

jbriales commented 6 years ago

At some point in history, Eigen was removed as a thirdparty, so the instructions for compiling Matlab wrappers are now outdated. Now, you need to set the include path for Eigen depending on your particular system, e.g. mex -I../include -I/usr/include/eigen3 -L../build/lib -lopengv opengv.cpp -cxx

I created an executable script make_mex.sh that internally performs all the required steps (at least for Linux). In particular it searches in the Cmake cache to read the path for Eigen. Finally the scripts calls matlab from the command line to compile the MEX files for opengv.cpp and opengv_donotuse.cpp.