Search code examples
matlabopencvimage-processingcomputer-visionviola-jones

Viola jones face detection...how to use tilted features from open-cv haar cascades


I am trying to understand the VIOLA JONES algorithm and I came across an implementation in MATLAB which uses the open-cv haarcascade.

It worked well for face detection (using haarcascade_frontalface_alt.xml), but when used with other classifiers (e.g haarcascade_mcs_nose.xml) it gives the following warning:

Warning: Tilted features are not supported 
> In GetHaarCasade at 35
  In ObjectDetection at 37

Is there a way to also include the tilted features in the open-cv haarcascade.

Thanks in advance for your time!!


Solution

  • The original Viola-Jones algorithm doesn't support rotated faces because the Haar wavelets / matrices, which the algorithm is based upon, are not rotation invariant.

    MATLAB has implemented a rotation invariant face detector using the KLT feature point detection algorithm instead. If you have the Computer Vision toolbox, then check this link out: http://www.mathworks.com/help/vision/examples/face-detection-and-tracking-using-the-klt-algorithm.html