In my project I need to detect rotated and non-rotated faces in real time. I read original articles and try to use common implementation in matlab and openCV. And as I understood Haar features are not rotation invariant. What should I do for successes detection of rotated faces ? I have some ideas about it. Which is more 'real'?

  1. Try to rotate original image with some angle step
  2. Train own classifier on rotated examples
  3. Use any modified Viola Jones Algorithm from research articles
  4. Use another algorithm (like SURF, KLT, Skin based face detection)

You are correct, Haar features, as well as LBP and HOG are not rotation invariant. I have experimented with vision.CascadeObjectDetector in MATLAB's Computer Vision System Toolbox, and found that the face detector model it comes with can tolerate about 15 degrees of in-plane rotation.

So if you want to handle in-plane rotation, the easiest thing is to rotate the image by 15 degree increments and run the detector each time. If you are talking about out-of-plane rotation, then you would need multiple detectors, such as the frontal and profile detectors that come with MATLAB.

There is another possibility. If you need to detect the faces in video, then you can handle rotations and even partial occlusions by tracking them using KLT. See this example.

  • $\begingroup$ Thanks. Yes at the end I should apply it to video, but now I try apply it to single image. Is this example use Viola Jones to detect faces and then use KLT to track it ? Is it possible for this apporach detect rotated faces on single image? $\endgroup$ Nov 5 '15 at 23:29
  • $\begingroup$ Yes, the example detects faces using Viola-Jones, tracks them using KLT, and periodically re-detects them to correct the tracker and replenish the points. This would not work on a single image, because Viola-Jones only detects "upright" faces. The rotation is handled by KLT. And if you only have one image, there is nothing to track. Удачи! $\endgroup$
    – Dima
    Nov 5 '15 at 23:31
  • $\begingroup$ And how about trainining own classier on data set which consist rotated faces? $\endgroup$ Nov 6 '15 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.