You are on page 1of 14

FACE RECOGNITION USING PRINCIPAL COMPONENT ANALYSIS By,

R.Sujith kumar
Dept of Electronics and Communication engineering, Vaishnavi institute of technology, Tirupathi 517 501. Andhra Pradesh E- mail id : sujithkumar460@gmail.com

Introduction

Abstract
Automated Face recognition has become a major field of interest. Face recognition algorithms are used in a wide range of applications, such as security control, crime investigation, and entrance control in buildings, access control for computers in general, like for ATM (Automatic money from Teller bank Machines) in particular, day-to-day affairs withdrawing account, dealing with the post office, passport verification, identifying the faces in a given databases, and many more. This paper includes with research face and experimentation recognition

Machine recognition of faces has come to be an active research area in the last decade. There are numerous applications of face recognition technology, ranging from static matching of controlled format photographs such as passports, driver's licensees, and mug shots, to real-time matching of surveillance video images. Although face recognition is an extremely simple task to the humans, automating the process to a computer requires the use of various image processing techniques. Although there are a number of face recognition techniques which work well in constrained environments, face recognition is still an open and very challenging problem in real applications. There are many techniques for face recognition such as Principle Component Analysis (PCA), a frequently used statistical technique for optimal lossy compression of data.

technique tested with different faces; principally the experimentation involved the use of Eigen faces and PCA (Principal Component Analysis). A recognition rate of 90% was achieved for the above mentioned face recognition technique.

The goal of this paper is to make use of eigen face approach to recognize faces. This paper will show you how to build a face recognition program using Matlab. Through the development of techniques like eigen faces computers can now outperform humans in many face recognition tasks, particularly those in which large databases of faces must be searched. In the first part a brief introduction is given to face recognition, and some basic techniques including principal component analysis, Bayesian are reviewed.

database, verify whether it is from the person it is claimed to be in the database. The main aim of most commercial face recognition is to increase the capability of security and surveillance systems. In theory security systems involving face recognition would be impossible to hack, as the identification process involves unique identification methods, and thus only authorized users will be accepted.

Why

face

recognition:

Face

Recognition systems are used in two types of applications like: Security: Fight terrorism, Find fugitives. Criminal investigation. Passport verification. Personal information access: ATMs, Withdrawing money from bank. Any other application that would want personal identification Uses 1) Spot suspected terrorists in terminals 2) Instant background checks of all passengers before they board their planes 3) Access control for doors to restricted areas 4) Background checks of all new hires

1.1 What is Face Recognition


Face recognition is biometric identification by scanning a persons face and matching it against a library of known faces. Face recognition is defined as the identification of a person from an image of their face. Face Recognition systems can be of two types

Face Identification: Given a face


image that belongs to a person in a database, tell whose image it is.

Face Verification: Given a face


image that might not belong to the

1. 2 Analysis of past research


Currently there are many methods of biometric identification: fingerprint, eye iris, retina, voice, face etc. Each of these methods has certain advantages and disadvantages, which must be considered in biometrical system developing: system reliability, price, flexibility. Selecting the certain biometrical identification method or using the multi-biometrical system can help to support these, often discrepant, requirements. Face identification can be an important alternative for selecting and developing optimal biometrical system. Its advantage is that it does not require physical contact with image capture device (camera). Face identification system does not require any advanced hardware; it can be used with existing image capture devices (web cams, security cameras etc.). Some other techniques that were used previously for face recognition are listed below.

input

face

is

identified

through

comparisons with each image in the database. Many problems arise using this method. Feature-based face Face Recognition: uses Feature-based recognition

methods that locate pre-defined distinctive features of faces, such as eyebrow thickness and their vertical position or nose position and width. The corresponding figures are stored as a feature vector. The vector is compared with those of the known database to find the closest match. Standard feature-based methods require far less memory and detection is completed at much higher speeds compared to template matching.

2. PRINCIPAL COMPONENT ANALYSIS


2.1 Introduction PCA also known as Karhunen covariance Loeve matrix, projection. and projects PCA the calculates the eigen vectors of the original data onto a lower dimensional feature space, which is defined by eigen vectors with large eigen values. PCA has been used in face representation and recognition where the eigen vectors calculated are referred to as eigen faces. In

General Techniques
Nearest-neighbour Template Matching: Nearest-Neighbour Template Matching is the most unaffected method of face recognition. Individuals are represented by a set of complete images of their face. An

gel images, even more than in human faces, the dimensionality of the original data is vast compared to the size of the dataset, suggesting PCA as a useful first step in analysis PCA is a useful statistical technique that has found application in fields such as face recognition and image compression, and is a common technique for finding patterns in data of high dimension. The basic goal is to implement a simple face recognition system, based on wellstudied and well-understood methods. The method will be implementing is the PCA (Principle Component Analysis) method. It is one of the more successful techniques of face recognition and easy to understand and describe using mathematics. This method involves using eigen faces. Eigen faces are described a bit below.

the correlation of X and Y is defined by cor(X, Y) = cov(X,Y) sd (X) sd(Y) Covariance is such a measure. Covariance is always measured between 2 dimensions. If you calculate the covariance between one dimension and itself, you get the variance. The formula for covariance is very similar to the formula for variance. The formula for variance could also be written like this:

Where one can have simply expanded the square term to show both parts. So given that knowledge, here is the formula for covariance:

2.2 Mathematical Analysis


2.2.1 Covariance
Suppose that X and Y are random variables for a random experiment. The covariance of X and Y is defined by cov(X, Y) = E {[X - E(X)][Y - E(Y)]} and (assuming the variances are positive)

2.2.2 The covariance Matrix


Given n sets of variates denoted {x1} . , {xn} the first order covariance matrix Is defined by

The scaling factor is the eigen value. In the plane, a rigid rotation of 90 has no eigen vectors, because all vectors move. Where ui is the mean. Higher order matrices are given by

2.2.4 Eigen values


An Eigen value of an n by n matrix A is a scalar c such that A*x = c*x holds for some nonzero vector x (where x is an ntuple).

An individual matrix element vij = cov (xi, xj) is called the covariance of xi and xj. Recall that covariance is always measured between 2 dimensions. For example, from a 3 dimensional data set (dimensions x, y , z ) you could calculate cov (x, y) , cov (x, z) , and cov (y, z) In fact, for an ndimensional data set, you can calculate n!/ (n-2)!*2 different covariance values.

If A is an upper triangular matrix, then the eigen values must be the numbers occurring on the diagonal. How one can find the eigen values if the matrix is not upper triangular. If A isn't upper triangular, one can start off in the same way, and we'll end up seeing that there is a polynomial called the characteristic polynomial, and its roots are the Eigen values. This polynomial is found using the determinant, which we'll also look at. Eigen values are closely related to eigenvectors, so you can see that eigen vectors and eigen values always come in pairs.

2.2.3 Eigen vectors


An n*n matrix is a matrix with n rows and n columns. An n*n matrix is a linear transformation of ndimensional euclidean space. An Eigen vector of an n*n matrix is a vector that gives a direction in which that transformation is simply a scaling. The amount of scaling is the associated Eigen value. An eigen vector is a vector that is scaled by a linear transformation, but not moved.

2.2.5 Euclidean Distance


The distance, either in physical or abstract (e.g., spectral) space, that is computed based on the equation of a straight line. Distance between objects or

values that is computed as a straight line. Euclidean distance is the shortest distance between two points in a plane. It value is found by resolving Pythagoras' theorem for a right angled triangle formed from two points. The Euclidean distance of two points x = (x1,...,xn) and y = (y1,...,yn) in Euclidean n-space is computed as

Notice that this distance coincides with absolute value when n=1.

2.3 What is Principal Components Analysis


Principal component analysis (PCA) involves a mathematical procedure that transforms a number of (possibly) correlated variables into a (smaller) number of uncorrelated variables called principal components. Tradionally, principal component analysis is performed on a square symmetric matrix of type SSCP (pure sums of squares and cross products), Covariance (scaled sums of squares and cross products), or Correlation (sums of squares and cross products from standardized data). The result of a principal component analysis on such objects will be a new object of type PCA. Objectives of principal component analysis To discover or to reduce the dimensionality of the data set.

If u=(x1, y1) and v=(x2, y2) are two points on the plane, their Euclidean distance is given by

(1) Geometrically, it's the length of the segment joining u and v, and also the norm of the difference vector (considering as vector space). If a = (x1,...,xn) and b = (y1,...,yn) then formula 1 can be generalized to as by

defining the Euclidean distance from a to b

(2)

To identify new meaningful underlying variables.

Principal component analysis (PCA) is a classical statistical method. This linear transform has been widely used in data analysis and compression. Principal component analysis is based on the statistical representation of a random variable. PCA is a way of identifying patterns in data, and expressing the data in such a way as to highlight their similarities and differences. Since patterns in data can be hard to find in data of high dimension, where the luxury of graphical representation is not available, PCA is a powerful tool for analyzing data. The other main advantage of PCA is that once you have found these patterns in the data, and you compress the data, i.e. by reducing the number of dimensions, without much loss of information. Since the non-diagonal elements in this

3.2 Subtract the mean image data


For PCA to work properly, you have to subtract the mean from each of the data dimensions. The mean subtracted is the average across each dimension. So, all the x values have x (the mean of the x values of all the data points) subtracted, and all the y values have y subtracted from them. This produces a data set whose mean is zero.

3.3 Find the covariance matrix


This is done in exactly the same way as was discussed in section 2.2.2. Since the data is 2 dimensional, the covariance matrix will be 2 * 2 as shown below:

3. METHODOLOGY 3.1 Data Acquisition


A database of different image sets of faces is constructed. Its only got 2 dimensions, and the reason why one can have chosen this is so that one can provide plots of the data to show what the PCA analysis is doing at each step.

covariance matrix are positive, both the x and y variable increase together.

3.4 Find the Eigen vectors and Eigen values of the Covariance Matrix
Since the covariance matrix is square, it can be calculate the eigen

vectors and eigen values for this matrix. These are rather important, as they tell us useful information about our data. In the meantime, here are the eigen vectors and eigen values: Example is It is important to notice that these eigen vectors are both unit eigen vectors i.e. their lengths are both 1. This is very important for PCA, so, by this process of taking the eigen vectors of the covariance matrix, one can have been able to extract lines that characterize the data. The rest of the steps involve transforming the data so that it is expressed in terms of them lines.

This gives the components in order of significance. Now, the components of lesser significance can be ignored. There may be loss of information, but if the Eigen values are small, the loss is not much. If some components are left out, the final data set will have fewer dimensions than the original. To be precise, if originally there were n dimensions in the data, and so that n eigen vectors and eigen values are calculated, and then only the first p eigen vectors are chosen, then the final data set has only p dimensions. What needs to be done now is to form a feature vector, which is just a fancy name

3.5

Choosing

components

and

for a matrix of vectors. This is constructed by taking the Eigen vectors that are to be kept from the list of Eigen vectors, and forming a matrix with these Eigen vectors in the columns. Feature Vector = (eig1 eig2 eig3.eign)

forming a feature vector


Figure 3 shows the notion of data compression and reduced dimensionality. It is observed that the Eigen vectors and Eigen values from the previous section are quite different. In fact, it turns out that the Eigen vector with the highest Eigen value is the principle component of the data set. In general, once Eigen vectors are found from the covariance matrix, the next step is to order them by Eigen value, highest to lowest.

3.6 Deriving the new data set


This final step in Principal Component Analysis, and is also the easiest. Once chosen the components (eigen vectors) that one can wish to keep in our data and formed a feature vector,

one can simply take the transpose of the vector and multiply it on the left of the original data set, transposed. Where Row Feature Vector the matrix with the eigen vectors in the columns transposed so that the eigen vectors are now in the rows, with the most significant eigen vector at the top, and Row Data Adjust is the mean adjusted data transposed, i.e. the data items are in each column, with each row holding a separate dimension, but the equations from here on are easier if one can take the transpose of the feature vector and the data first, rather that having a little T symbol above their names from now on. Final Data is the final data set, with data items in columns, and dimensions along rows.

Final Data = Row Feature Vector * Row Data Adjust

Steps
1. The first step is to obtain a set S with M face images. In our example M = 38 as shown in the figure1. 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.

7. Once eigen vectors v1, u1 were found


3. Then you will find the difference between the input image and the mean image

Recognition Process in Eigen faces Approach


Step 1. Form a face database that consists

4. Next one can seek a set of M orthonormal vectors, un, which best describes the distribution of the data. The kth vector, uk, is chosen such that

of the face images of known individuals. Step 2. Choose a training set that includes a number of images (M) for each person with some variation in pose and different faces.

is

maximum,

subject

to

Step 3. Calculate the M x M matrix L, find its eigen vectors and eigen values, and choose the M' eigen vectors with the highest associated eigen values. Step 4. Combine the normalized training set of images to produce M' eigen faces. Step 5.Store these eigen faces for later use. Step 6. For each member in the face database, compute and store a feature vector. Step 7. Choose a threshold value e that defines the maximum allowable

Note: uk and .k are the eigen vectors and eigen values of the covariance matrix C. 5. Obtain the covariance matrix C in the following manner

6.

distance from any face class. Optionally choose a threshold f

that

defines

the

maximum

characterize the variation between face images. When the eigen vectors are displayed, they look like a ghostly face, and are termed eigen faces. The eigen faces can be linearly combined to reconstruct any image in the training set exactly.

allowable distance from face space. Step 8. For each new face image to be Identified, calculate its feature vector and compare it with the stored feature vectors of the face library members. Step 9. If the comparison satisfies the threshold for at least one member, then classify this face image as "known", otherwise a miss has occurred and classify it as "unknown" and add this member to the face library with its feature vector.

3.8 PCA Properties: Most of which could be used to define it.


1. Consider all projections of the pdimensional space onto 1 dimension. The first principal component (PC1) is the projection with the largest variance. A projection forms a linear combination of the variables with coefficient vector of (geometric) length one. Since variance does not depend on sign, the sign of PC1 is arbitrary. 2. Subsequent PCs are defined as the projected variable which is uncorrelated with the earlier PCs and has maximal variance, again with arbitrary sign. 3. The first k < p principal components from a set of k dimensions in which the variables are uncorrelated (and if zeromean, orthogonal), with the largest variance matrix (in any one of senses).

3.7 Extracting Principal Components.


The general idea for a face recognition system is to extract the relevant information in a face image, encode it as efficiently as possible, and compare one face encoding with a database of similarly encoded images. That is basically the process of face recognition. In the eigen faces technique, one can have a test set of images read, and one can compute the eigen vectors of the covariance matrix of the training set of images. These eigen vectors can be thought of as a set of features that together

4. Consider the projection onto the space spanned by the first k < p principal components. This is the kdiml space which minimizes the sum of squared distances from the cases to the space. 5. The same projection maximizes the sum of squared distances between all pairs of projected points.

PCA can analyze datasets up to 50,000 rows and 200 columns Principal component analysis is a well known method of orthogonalzing data. It converges very fast and the theoretical method is well understood. Since the features are orthogonal, the process is able to train easily. PCA finds feature combinations that model the variance of a data set, but these may not be the same features that separate the classes, i.e. the PCA components that model the largest contributions to the data set variance may work poorly for pattern recognition

3.9 Benefits of PCA


The basic Benefit in PCA is to reduce the dimension of the data. No data redundancy as components is Orthogonal. With help of PCA reducing the complexity of grouping the images. By using PCA many benefits like in the prominent field of criminal investigation. By using PCA many benefits are entrance control in buildings, access control for computers, databases. for ATMs, passport verification, identify the faces in a given

4. RESULTS AND DISCUSSION


The performance of the two methods was accessed by testing. The face images of 12 people with different poses (48 Images) were taken for testing. By using PCA (Principal Component Analysis) the recognition accuracy was 90% on a very small set of faces.

PCA Features
PCA computes means, variances, covariances, and correlations of data sets PCA computes and ranks principal components and their variances Automatically transforms data sets

However the accuracy might decrease with increase in the number of samples. The recognition accuracy of eigen face method can be improved by using a Neural Network for classification

rather than taking the euclidean distance of the features By using Cross-Correlation Technique the recognition accuracy was 85%. On a very small set of faces. However the accuracy might decrease with increase in the number of samples. The recognition accuracy of eigen face method can be improved by using a Wavelet Networks for classification rather than taking the euclidean distance of the features The results of the testing process are documented below. Principle Component Analysis (PCA), a frequently used statistical technique for optimal lossy compression of data under least square sense; provide orthogonal basis vector space to represent original data. This dissertation includes with research face and experimentation recognition

matrix

subtraction,

one

matrix

multiplication and a bit of comparison. On the other hand, training new faces is a comparably complicated calculation, especially if the "face-space" has to be recalculated as soon as new persons are added.

5. RECOMMENDATIONS AND CONCLUSION


The face recognition strategies i.e. PCA (Principal Component Analysis) eigen face method is implemented. This method gave better results for varying poses. The results are pretty good for the test samples that were taken. Face recognition is quickly emerging as a viable authentication method today. With the adoption of standards and community awareness, this technology will become more and more mainstream. Current implementations of this technology are visible in airports, at ATMs machines, border control checkpoints and also security control, crime investigation, access control for computers, passport verification etc . With society today, face recognition will be an important role and a technology that is up and coming in the future. And we can improve the system by integrating

techniques tested with different faces principally; experimentation involved the use of eigen faces and PCA (Principal Component Analysis).

Efficiency of the Algorithm & Suitability for Industry Use:


Recognizing faces could theoretically be very fast, because it consists only of a

with other biometric methods like speaker recognition, finger print, eye iris, retina, voice recognition. It is recommended that further

Beveridge, Recognizing Faces with PCA and ICA, 2002. [5]. J. Ross Beveridge, Kai She and Bruce A. Draper and Geof H. Givens A Nonparametric Statistical

improvement in the recognition accuracy of eigen face method can be improved by using Neural network and Wavelet Networks for classification rather than taking the euclidean distance of the features.

Comparison of Principal Component and Linear Discriminant Subspaces for Face Recognition. [6]. Matthew Turk, Alex Pentland, Eigen faces for Recognition Vision and Modeling Group, the Media Laboratory, Massachusetts Institute of Technology; September 1990. [7]. Imola K. Fodor, A survey of dimension reduction techniques,

6. REFERENCES:
[1]. Jackson, J. E., A Users Guide to Principal Components, John Wiley and Sons, pp. 1-25, 1991. [2]. Kyungnam Kim, Face Recognition using principal component analysis, USA, June 2000. [3]. Geof Givens, J Ross Beveridge, Bruce A. Draper and David Bolme, A Statistical Assessment of Subject Factors in the PCA Recognition of Human Faces, April 2003. [4]. Bruce A. Draper, Kyungim Baek, Marian Stewart Bartlett and J. Ross

June 2002 [8]. W. Yambor, B. Draper and R. Beveridge, Analyzing PCA-based Face Recognition Algorithms: Eigen vector Selection and Distance Measures, July 2000. [9]. Christopher James Cobb, Face Recognition Project, December, 2000

You might also like