I am trying to use Berkeley matlab system for detection and localization of objects in images. The system can be found here - http://www.cs.berkeley.edu/~rbg/latent/
My system is iMac, Matlab 2014a and XCode 5.1.1.
I am trying to run the demo.m file, and this is the output I receive:
compiling the code...Building with 'Xcode Clang++'. Warning: Maybe you need to call fv_cache('unlock') first?
In fv_compile at 50 In compile at 48 In demo at 5 Building with 'Xcode Clang++'. MEX completed successfully. Building with 'Xcode Clang++'. MEX completed successfully. Building with 'Xcode Clang++'. /Users/intern/Documents/MATLAB/voc-release5/features/features.cc:28:21: warning: unused function 'max' [-Wunused-function] static inline float max(float x, float y) { return (x <= y ? y : x); } ^ 1 warning generated.
MEX completed successfully. Building with 'Xcode Clang++'. MEX completed successfully. Building with 'Xcode Clang++'. MEX completed successfully. Building with 'Xcode Clang++'. MEX completed successfully. Building with 'Xcode Clang++'. MEX completed successfully. Error using mex Unknown MEX argument '-o'.
Error in compile (line 64) eval([mexcmd ' gdetect/fconvsse.cc -o fconv']);
Error in demo (line 5) compile;
Any help appreciated, Thanks, Oz Radiano.
I must admit that eventually I used Matlab computer vision toolbox, which uses Viola-Jones Haar features to detect faces (they claim that they have other trained detectors, which you can look if this is not enough for you). This toolbox made the job for my needs and therefore I left the original problem unsolved.
Regardless, I made some progress with making this detection work before I moved on, and here it is:
I compiled a new Compiler for matlab that will support OpenMP: Wikipedia defines OpenMP as follows:
OpenMP is an API that supports multi-platform shared memory multiprocessing programming in C, C++, and Fortran, on most processor architectures and operating systems, including Solaris, AIX, HP-UX, Linux, Mac OS X, and Windows platforms
The training code calls several C code files for performance improvements. The problem is that the matlab regular compiler (as for Matlab 2014a) does not support OpenMP, and therefore there's a need to compile a compiler that supports OpenMP and let matlab direct to it. I installed gcc48 from macports, and changed the matlab mexopts.sh file to point to the new compiler.
Hope it helps anyone, just keep in mind I didn't do it end-to-end, but left it and moved to matlab computer vision toolbox.