I can detect the human faces with OpenCV. I would like to detect the accurate locations of facial feature points like eyes and corners of the mouth. Is that possible with OpenCV or other free/open source libraries?
answered 2012-07-13 10:48:41 -0500Kirill Kornyakov
Haar cascades can be found here: http://code.opencv.org/projects/opencv/repository/show/trunk/opencv/data/haarcascades. Also check this tutorial: http://docs.opencv.org/doc/tutorials/objdetect/cascadeclassifier/cascadeclassifier.html#cascade-classifier. But if you're going to train your own, you should prefer LBP features, check this guide.
But you should understand that detector returns you only a rectangle, not exact positions of eye/mouth corners. For this you should use something like ASM or AAM. Here is a couple of implementations:
answered 2012-10-03 01:41:21 -0500lightalchemist
The Flandmark Facial point detector (with code) can be found here: http://cmp.felk.cvut.cz/~uricamic/flandmark/
It will return you the four corner points of the eyes, corner of mouth, center of nose, and center of face. It does however require you to give it a bounding box of the face so you will probably have to use the Viola Jones face detector in OpenCV (or any other method) to locate the face first, which you are already doing.
I've compiled the code on Ubuntu and it works very well, provided the bounding box you give it is "just right". If it is too tightly cropped it might miss the feature points near the border of the image. For such cases, you can try to extend the border and specify the bounding box as the "inner" image (excluding border) and sometimes it works. On the other hand when the bounding box is too large it might converge to some nonsense points. But on the whole it works really well, even on rotated faces, faces with glasses, and those that are close to side profile.
answered 2013-08-21 04:53:47 -0500abhi21
In my opinion you should try Shi and Tomasi corner-detector to detect mouth corners. I think OpenCV has the API for it. HaarCascades won't give you mouth corner points, it would only return you a rectangular region that has mouth. OR as pointed out by Kirill use can also use AAM/ASM to detect face features.
Asked: 2012-07-13 05:12:26 -0500
Seen: 7,451 times
Last updated: Aug 28 '13