IntroductionThe detection of faces is a very important part in many video analysis projects. Unfortunately there was (or I could not find) any MATLAB implementation of the groundbreaking Viola-Jones face detector[1]. On the contrary this algorithm is available in open-source format as part of the openCV library. The latter is written in C and C++. Therefore I decided to implement a MATLAB version (mex function) of that software. In short, this is a face detection library for use in Matlab. The Matlab program 'mex' is used to make the OpenCV face detection functionality in C++ available for Matlab. Platform and LanguageThis C++ library works in Matlab on either Windows or Linux. Example programThe use of this library is demonstrated by the 'test' example program. When run in Matlab it reads images from the images directory in which it detects the face and afterwards the faces are displayed. Install instructions Installation LinuxRequires Matlab and OpenCV to be installed. After unpacking edit file mexopts.sh in MatlabFaceDetect/MatlabFaceDetect to have the C and C++ compiler compatible with your matlab installation in the CC and GXX definitions.
Then edit the Makefile to have the OpenCV include and library directory set to the INCLUDE_DIR and LIB_DIR variables.
Then type 'make' to build the library. After building the file 'MatlabFaceDetect.mexglx' should appear in the MatlabFaceDetect/release directory. Test its face detection functionality in Matlab by running 'test' in matlab from the MatlabFaceDetect/release directory. Installation Windows The library and example program can be run by typing 'test' in Matlab from the 'MatlabFaceDetect/release' directory. The rest of this text is only required when compiling from source. Matlab and OpenCV are required to build the library. After unpacking open the solution file (.sln) in MS Visual Studio 2005. Set the required include paths to the OpenCV and Matlab files in:
Project => Properties=> Configuration properties => C/C++ => General => Additional Include Directories
On my system these are:
* C:\Program Files\OpenCV31\cv\include * C:\Program Files\OpenCV31\cxcore\include * C:\Program Files\OpenCV31\otherlibs\highgui * C:\Program Files\MatlabR2006b\extern\include
Set the required lib paths to the OpenCV and Matlab files in:
Project => Properties => Configuration properties => Linker => General => Additional Library Directories
On my system these are:
* C:\Program Files\OpenCV31\lib * C:\Program Files\MatlabR2006b\extern\lib\win32\microsoft
set the project to 'Release' mode, and build the solution. After building the file 'MatlabFaceDetect.mexglx' should appear in the MatlabFaceDetect/release directory. Test its face detection functionality in Matlab by running 'test' in matlab from the MatlabFaceDetect/release directory. Yes, you are ready to download the software:-)! Use the link: MatlabFaceDetect.zip If you use my software for your paper you can cite : A. K. Noulas, B. J. A. Kröse, EM-detection of Common Origin of Multi-Modal Cues, International Conference Multimodal Interfaces '06, Banff, Canada. [pre-print] [bib] [movie1] [movie2] [movie3] [presentation] Or refer to my website. The algorithm, of course, comes from P. Viola and M. Jones. Robust real-time object detection. Technical Report 2001/01, Compaq CRL, February 2001. 8 http://citeseer.ist.psu.edu/viola01robust.html
|