Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Project: Face Detection

Description: I want to detect and crop a face in an image. The image is captured through webcam and only one face per image.I used OpenCV face detector, but I was not satisfied with the cropping. So, I started using STASM ( face landmark detector to crop the image.STASM uses OpenCV face detector to find face in an image and STASM locates landmarks in faces. In bad light conditions, the cropped image from STASM is not good as it is not exactly detecting the face alone.

1) I want to know any better algorithm for face detection. My main aim is to crop the face from an image.

2) currently I am using STASM for cropping. In bad light conditions or when in an image, if the whole or complete face (forehead to chin) is not captured, STASM cropping is not reliable (The output will be only eye or lips). And in my application, if there is no proper output from the stasm or if the face is not cropped prpoerly then i should reject the images. How to do that? So I am planning to validate the face in an image by finding the Eyes. If I am right in my approach, how to detect the eyes from the cropped image?

share|improve this question

FYI... STASM uses OpenCV's face detector (albeit very slightly modified for better image-boundary detections). If you really want a better face detector then I recommend hunting down detectors from the FDDB dataset challenge (most probably proprietary) or create your own custom detector to fit your needs.

If you still plan on going the route of verification via eyes, then OpenCV has a cascade for that, see

share|improve this answer

Your plan to use eyes (and you could also add mouth) in addition to the face detection seems quite reasonable. I've seen several research papers in face recognition where the faces in the database are first registered so that the triangle eyes + mouth is aligned throughout the whole database.

For your need, you can obviously validate a face detection if there is at least one visible eye. You can also add some logic to reject face detections when the eyes are very close to the face bounding box for example.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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