How to check if an image contains a face and it is reasonably visible
Asked Answered
T

4

15

I am not sure if this is solveable, but I though I will ask anyway.

In my company we deal with massive enrollment camps where small teams of 5 to 10 people go to a village and enroll people. The enrollment involves entering some data, capturing fingerprints and taking a mug-shot of the end-user using a webcam. Understandably enrollment is done by external vendors to whom we have outsourced the activity.

Since the no of records are overwhelmingly large trying to verify records manually is making the entire process slow. So we have automated as many things as possible except for one thing, which is to check if the photo captured using the webcam is of good quality.

I know, "Good Quality" is a vague term which cannot be translated to a software based solution. However, while trying to define Good Quality to myself, I found this: http://en.wikipedia.org/wiki/Image_quality

Now, finally coming to my question, what parts of these image quality checks can be automated.

Note: The photographs will be printed on a smart-card in stamp-size. They would barely be 100x125 pixels at 300 DPI.

Cheers, Raghu

Tibbs answered 26/11, 2010 at 15:28 Comment(1)
I know that some new cameras have "face recognition features", so obviously someone has put time into this. Good luck!Hartung
U
5

The openCV library has some great code for detecting faces. You could rig something up using the openCV face detection as a threshold for image quality - if it successfully detects a face, it's probably pretty good? http://sourceforge.net/projects/opencvlibrary/

Umbilicus answered 26/11, 2010 at 15:42 Comment(1)
Actually I ended using this technique. I used EmguCV, a .NET wrapper around the OpenCV library and used the HaarCascade based face detection. To eliminate false positives, I also try to look for other facial features such as eyes, nose & mouth. If atleast 2 features are found, I conclude that the photo is of acceptable quality. The system has gone live for a couple of months now and it seems to be working fine, except for a few dimly lit photographs.Tibbs
B
8

The Viola-Jones algorithm is a classic. Here you may find a paper about its implementation, but you'll find many resources out there.

My preferred picture:

alt text

Here you may find a framework for .Net implementing the alg. (it's free)

Ps: Note that some extraterrestrial lifeforms may return false positives.

Bennet answered 26/11, 2010 at 17:15 Comment(1)
Broken link for the .NET implementation I'm afraid - but this might be in the realm... Accord.Vision.Detection.HaarObjectDetector ?Henandchickens
S
6

Mechanical Turk? :)

Stricture answered 26/11, 2010 at 15:32 Comment(1)
Actually this is not too bad of an idea, about 6 months before the Kinnect launch I was doing "find the left and right hands and mark the head", and from what it looked like I could swear it was the input the Kinnect was capturing. I think MS was using it to improve it's face and hand detection algorithms.Guanabana
U
5

The openCV library has some great code for detecting faces. You could rig something up using the openCV face detection as a threshold for image quality - if it successfully detects a face, it's probably pretty good? http://sourceforge.net/projects/opencvlibrary/

Umbilicus answered 26/11, 2010 at 15:42 Comment(1)
Actually I ended using this technique. I used EmguCV, a .NET wrapper around the OpenCV library and used the HaarCascade based face detection. To eliminate false positives, I also try to look for other facial features such as eyes, nose & mouth. If atleast 2 features are found, I conclude that the photo is of acceptable quality. The system has gone live for a couple of months now and it seems to be working fine, except for a few dimly lit photographs.Tibbs
E
2

Face detection is a very active research topic and papers and published all the time in computer vision conferences such as ECCV, ICCV. In this years ECCV2010 there was even a workshop on face detection. So, yes it is solveable to a reasonable degree.

If I were you I'd build something pretty simple but that can cope with the essentials of lighting, skin colour, and framing variance. You won't need something sophisticated like Viola-Jones if you know the pictures are generally going to be mugshots. You should build a mugshot verification system (does this picture look like a mugshot?) rather than a face detection system (where are the faces in this image?).

Firstly, just check the basics in the image - for example using an intensity histogram to ensure the lighting is ok (not too bright; too dark), that the image has contrast (different shades), etc.

Then, you could build a face/mugshot verification system - build a face space like in the classic 'Eigenfaces for Recognition' paper, and then determine if each mugshot is sufficiently like a mugshot in this subspace. (This is fairly simple technique and much code is available on the web to do it).

Eldrida answered 29/11, 2010 at 16:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.