Face Detection with OpenCV for non frontal images

Hani picture Hani · Jan 10, 2012 · Viewed 30.8k times · Source

I am trying to use opencv to detect faces. Faces are not frontal, the camera captured the faces from side so only one eye and part of the mouth is viewed. I tried HaarDetectObjects with multiple configurations without getting benefit. I changed the cascade and I tested: haarcascade_frontalface_default.xml, haarcascade_frontalface_alt.xml,haarcascade_profileface.xml with very bad results. Are there any other better cascades? Are there other suggestions?

Thanks

Answer

Jose Gómez picture Jose Gómez · Feb 20, 2013

Now you have in OpenCV the new LBP cascade for profile faces, created by Vadim Pisarevsky:

https://github.com/Itseez/opencv/blob/master/data/lbpcascades/lbpcascade_profileface.xml

Apparently, it only detects right profile faces, so to detect all profile faces one has to run a second step with the image flipped.