Face Recognition using OpenCV


A great resource understand more about the theory and applications of Face Recognition is the Face Recognition Homepage. It is a source of journals, papers and resources about face recognition.

There are many algorithms to perform face recognition including:

OpenCV Supports Principal Component Analysis

The simplest and easiest method is to use the PCA support within OpenCV. However it does have its weaknesses. PCA is translation variant - Even if the images are shifted it wont recognize the face. It is Scale variant - Even if the images are scaled it will be difficult to recognize. PCA is background variant- If you want to recognize a face in an image with different background, it will be difficult to recognize. It is rotation variant - If the person tilts their head slightly left or right or up or down or angled, it will have trouble recognizing them. Above all, it is lighting variant- if the light intensity changes, the face wont be recognized that accurately.

But what are the advantages of PCA?

It is fast, and it only needs a small amount of memory. PCA basically performs dimensionality reduction.

So we have to perform various pre-processing steps in order to utilize the PCA method for recognition. Some may be:

What do we basically need for face recognition? A Face Database. It is nothing but a collection of images or to be more precise, faces.

For testing purposes, there are many face databases available, of which some of them are:

Yale Face Database

Yale Face Database B

FERET database

You can find more databases at the Face Recognition Homepage.

First, how do we perform Face Detection?

Visit the wiki page FaceDetection . We are going to modify the facedetect.c to suit our needs.

Illumination normalization can be as simple as histogram equalization, to complex algorithms.

Scaling can be done using cvConvertScale or cvResize functions in OpenCV. Scaling can be done into a 100 by 100 size because it is optimal in recognizing the faces, and also has lesser calculations to perform.

After these pre-processing steps, comes the recognition step, which can be done by using a variety of algorithms.

Principal Component Analysis


OpenCVWiki: FaceRecognition (last edited 2012-01-05 20:53:17 by ShervinEmami)