Weird, I just posted another message which appears to have been deleted. Anyway, I've modified the original code to load the image uint8, rather than double, since this added a bit of overhead. The resulting code exhibits execution times which are faster and more consistent than the original. I've posted the updated code along with a plot comparing the two versions here:
Oh, and to those of you who were running into my problem with the missing dll's, you probably want to try recompiling from the source.
1) Download OpenCV 1.0 (NOT the latest 2.0 version)
2) Get Visual C++ 2008 if you don't have it
3) Run mex -setup, choose VC++2008 as the compiler
4) Compile with the following statement:
mex ./src/FaceDetect.cpp -IC:\OpenCV\otherlibs\highgui -IC:\OpenCV\cxcore\include -IC:\OpenCV\cv\include -LC:\OpenCV\lib -lcv -lcxcore -lhighgui
(changing the directories to point to wherever you have OpenCV Installed)
5) Copy cv100.dll, cxcore.dll, and libguide40.dll from your OpenVC\bin directory as well as haarcascade_frontalface_alt2.xml from OpenVC\data\haarcascades to wherever you want to run the mex file
6) Try running the mex
7) If MATLAB crashes, reload it, input the command:
and try running the mex again
This looks like it could be very useful, but I am unable to get the code to run. I've compiled using Visual C++ 2008 in MATLAB r2009B and moved the .mexw32 file and both included .dlls to a directory on my path. When I try to call the mex file, I get a message saying "the specified module could not be found".
I noticed that there's a note in the readme stating something about "compiler-specific dll's", but this is unclear. Could this be the source of my problem? If so, where can I find the necessary dll's? Thank you for your time.