As told in my previous article Pattern Recognition,
Pattern recognition is "the act of taking in raw data and taking an action based on the category of the data". It aims to classify data (patterns) based either on a priori knowledge or on statistical information extracted from the patterns. The patterns to be classified are usually groups of measurements or observations, defining points in an appropriate multidimensional space.
Hence various data(patterns) constitute a dataset and every pattern has some features.The number of features to be picked is totally on the user or the programmer who is working on these patterns.
Saying about me,I'm a Bachelor of Technology student in Information Technology and currently in my final year of engineering.So as a part of my degree,I'm currently doing a project on Pattern Recognition Using Neural Networks which consists of 3 parts:-
1.Face Recognition using Eigenface Approach.
2.Iris Recognition using Hamming Distances.
3.Fingerprint Recognition using Directional Filter Bank Technique.
In this article(this is actually the report which I will be submitting next year to my college authorities),I will explain about the first point, that is,Face Recognition using Eigenface Approach in details. And for other two points you have to wait for my next articles.
So I would like to introduce you to some of the principles behind face recognition. Currently there are a several methods to achieve face recognition. Among them we have the neural network approach, the statistical approach - primarily based on histograms, the multiresolutional approach, the information theory approach, and the eigenface approach.
I would be focusing on the Eigenface approach. This method was originally suggested by Alex P. Pentland and Matthew A. Turk from MIT in 1991. This method consist on weighting the difference between a given face image and a mean image, which is obtained by averaging a predefined set of faces. The training set is a group of face images from which the mean face is calculated. Face recognition takes place by linearly projecting the image to a low dimensional image space and weighting the difference with respect to a set of eigenvectors. If the difference (weight) is bellow certain threshold, the image is recognized as a known face; otherwise, the face can be classified as an unknown face, or not a face at all.
Some of the limiting factors of this approach are the background, difference in illumination, imaged head size, and head orientation. To solve some of these problems we could identify the location of the head and zoom until we observe most of the face. We could also set the camera's lighting based on the time of the day.
Details of Eigenface Approach
The set of images is used to create our eigen space for face recognition. The goal of this tutorial is to apply the eigenface approach to recognize someone's face. The overall problem is to be able to accurately recognize a person's identity and take some action based on the outcome of the recognition process. Recognize a person's identity is important mainly for security reason, but it could also be used to obtain quick access to medical, criminal, or any type of records. Solving this problem is important because it could allow personnel to take preventive action action, provide better service - in the case of a doctors appointment, or allow a person access to a secure area. This project will show you how to build a face recognition program using MATLAB.
The rest of the project is presented as follows:
- Parts List and Sources
- Construction
- Programming Concept
- Conclusion
Parts List and Sources
To complete this project, you'll need MATLAB version 6.1 or higher.
You can download it from www.mathworks.com .
Note:- It is not a free software but if you are an engineering student then consult your college. Your college must be having this software.
Construction
This section gives step-by-step instructions along with photos and formulas on how to recognize faces and implemented into MATLAB.
Steps
1. The first step is to obtain a set S with M face images. In our example M = 25 as shown at the beginning of the project. Each image is transformed into a vector of size N and placed into the set.
2. After you have obtained your set, you will obtain the mean image.
3. Then you will find the difference Φ between the input image and the mean image.
4. Next we seek a set of M orthonormal vectors, un, which best describes the distribution of the data.
5. Then we obtain the covariance matrix C.
6. Then we find the eigen vectors.
Recognition Procedure
1. A new face is transformed into its eigenface components. First we compare our input image with our mean image and multiply their difference with each eigenvector of the L matrix. Each value would represent a weight and would be saved on a vector Ω.
2. We now determine which face class provides the best description for the input image. This is done by minimizing the Euclidean distance.
3. The input face is consider to belong to a class if εk is bellow an established threshold θε. Then the face image is considered to be a known face. If the difference is above the given threshold, but bellow a second threshold, the image can be determined as a unknown face. If the input image is above these two thresholds, the image is determined NOT to be a face.
4. If the image is found to be an unknown face, you could decide whether or not you want to add the image to your training set for future recognitions. You would have to repeat steps 1 trough 7 to incorporate this new face image.
Programming Concept
This algorithm works in the following manner: First, it obtains several images from the training set
(figure 1). The code was been tested using png,bmp and jpg images. After loading these images, we find the mean face and perform several calculations. Next, we ask for the name of an image we want to recognize (note: the image must have the same size as the training images). We then project the input image into the eigenspace, and based on the difference from the eigenfaces we make a decision.
Conclusion
This Eigenface algorithm works well. In most of the cases this algorithm has provided 95-100% accuracy. But still it is necessary to normalize the images and use some filtering techniques to obtain better results.
So my dear friends if you are interested in this project and want the full source code, that is, MATLAB code for face recognition using Eigenface algorithm, do post your demands in the comments or email me at:
I will provide the source code for free and if the demand is more, I will post the source code and its results in my next article.
Regards.
Karan Kumar Jaiswal