An update on getting Opencv & Matlab working
Compiling mexopencv in OS X 10.9 with Xcode 5 and Matlab R2013b – Stack Overflow.
Optics, Object Tracking and Identification
An update on getting Opencv & Matlab working
Compiling mexopencv in OS X 10.9 with Xcode 5 and Matlab R2013b – Stack Overflow.
Mathworks haven’t issued a patch for 2012b and OS X 10.9 so I ran the 10.9 patch (from http://www.mathworks.com/matlabcentral/answers/94092) and ran
mex -setup
I then modified the mexopts.sh file (mex -setup tells you where this is, on my system its
edit ~/.matlab/R2012b/mexopts.sh
In the section called
#PATCH: MacOSX10.8
remove the version numbers from CC and CXX and correct the SDKROOT. I also changed the deployment target to 10.9
#PATCH: MacOSX10.8
CC='llvm-gcc'
CXX='llvm-g++
SDKROOT='/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/'
MACOSX_DEPLOYMENT_TARGET='10.9'
After a restart, mex worked fine.
Zsolt @ Heriot-Watt University, Edinburgh. A list of datasets
PETS 2007. Video datasets
A useful tracking dataset – PETS 2012
14th IEEE International Workshop on Performance Evaluation of Tracking and Surveillance.
I’m experimenting with using OpenCV and Matlab and have come across a problem. Matlab (at least on my Mac) loads its own versions of libraries preferentially. This isn’t normally a problem but if your mex code links against a different version you might get a library conflict. One that I have come across several times is Matlab uses an old version of libtiff (it’s used in imread, imwrite etc) and OpenCV uses a newer version. So when I run an OpenCV mex file, Matlab attempts to load the old version for my OpenCV and the mex file crashes.
My first attempt to solve this was to update the Matlabs version of libtiff – it partially worked. My libraries were fine but it broke imread so it wasn’t acceptable. The solution I found when trying the mexopencv wrapper is to preload the up to date libraries when starting Matlab. The command was
DYLD_INSERT_LIBRARIES=/opt/local/lib/libtiff.5.dylib /Applications/Matlab/MATLAB_R2012b.app/bin/matlab &