andyopayne
andyopayne

Reputation: 1368

Free Face Detection Algorithm for Video

I'm working on an application which needs to detect the location of a face in a video stream, using a web cam placed at desk height (and slightly off to the side of the user).

I've already implemented a version of OpenCV (using their Haar detection) and it works ok... the problem is that it tends to lose the position of the face if the user turns their head to the side (or looks up).

Since the webcam is sitting on the desk, it is tilted up at a 30 degree angle. The OpenCV detection algorithm is trained using fully frontal images, but not up-angle images like the ones I'm using. I know OpenCV also has a profile Haar file that can be used.. but from my research it seems that the results are quite mixed on profile detection. In addition, I don't really have control over the background or lighting of the image... so this sometimes also effects the efficacy of the OpenCV detection algorithm.

So, I guess what I'm asking is... are there other face detection algorithms (that are hopefully free, as this is part of my university research) that are better for detecting faces for this type of setup? It seems like some of the built-in webcams (for Macs and PCs) actually have fairly robust algorithms for detecting faces (and then overlaying cheesy cartoon images over the faces)... but they seem to work well regardless of background or lighting. Do you have any recommendations? Thanks.

Upvotes: 3

Views: 1393

Answers (2)

yogi
yogi

Reputation: 117

Use CLM-framework for accurate realtime face detection and face landmark detection. Example of the system in action: http://youtu.be/V7rV0uy7heQ

You may find it useful.

Upvotes: 0

sansuiso
sansuiso

Reputation: 9379

For research purposes, you can use the Haar cascades in OpenCV, things are different if you want to go commercial (in which case you need to consider LBP cascades instead). Just be sure to quote the Viola-Jones paper in your references.

To improve the results of face detection, you have several paths:

  • individual image detection: you can send rotated images to a frontal cascade to account for some variability without training your own cascade
  • individual image detection but more work) : train your own cascade in operating conditions closer to the ones of your app
  • stability in video streams (as in webcams & co.) : this is achieved by adding a layer of tracking around the face detection. Depending on your knowledge about this topic, you can use your own filter, have fun with OpenCV's particle or Kalman filter, implement a simple first or second order low pass filter on the face position or a PID tracker on the detected face...

Any of these tracking filters will enhance a lot your results when processing video streams.

Upvotes: 1

Related Questions