Face Recognition Machine Vision System Using Eigenfaces
Face Recognition Machine Vision System Using Eigenfaces
Abstract—Face Recognition is a common problem in community. In this paper, the N-PCA statistical tech-
arXiv:1705.02782v1 [cs.CV] 8 May 2017
Machine Learning. This technology has already been nique is presented for the face recognition. The exper-
widely used in our lives. For example, Facebook can imental results compare with the popular linear PCA
automatically tag people’s faces in images, and also some statistical technique. The classification step chooses to
mobile devices use face recognition to protect private
be the simplest Euclidean distance classifier. The rest of
security. Face images comes with different background,
variant illumination, different facial expression and oc-
this paper is outlined as follows: section II illustrates
clusion. There are a large number of approaches for the the face recognition system. Section III explains some
face recognition. Different approaches for face recognition useful mathematical modeling. Section IV explains the
have been experimented with specific databases which Principal component analysis and the Normalized-PCA.
consist of single type, format and composition of image. Section V introduces the ORL and Indian face databases.
Doing so, these approaches don’t suit with different face The experimental analysis and results are discussed in
databases. One of the basic face recognition techniques Section VI. Finally, conclusion of the paper is given in
is eigenface which is quite simple, efficient, and yields Section VII.
generally good results in controlled circumstances. So, this
paper presents an experimental performance comparison
of face recognition using Principal Component Analysis
II. FACE RECOGNITION SYSTEM
(PCA) and Normalized Principal Component Analysis (N- A pattern recognition task performed exclusively on
PCA). The experiments are carried out on the ORL (ATT) faces is termed as face recognition. It can be described
and Indian face database (IFD) which contain variability as classifying a face either known or unknown, after
in expression, pose, and facial details. The results obtained matching it with stored known individuals as a database.
for the two methods have been compared by varying It is also advantageous to have a system that has the
the number of training images. MATLAB is used for
capability of learning to identify unknown faces. The
implementing algorithms also.
outline of typical face recognition system implemented
Index Terms—Face Recognition, Principal specifically for N-PCA is given in Figure 1. There are
Component Analysis (PCA), Normalized five main functional blocks, whose responsibilities are
Principal Component Analysis (N-PCA)
as below.
I. I NTRODUCTION
A ce is a complex multidimensional structure and
F needs a good computing techniques for recogni-
tion. Our approach treats face recognition as a two-
dimensional recognition problem. Face recognition sys-
tems generally divided into two categories: identification
or verification. In an identification set-up the similarity
between a given face image and all the face images in
a large database is computed, the top match is returned
as the recognized identity of the subject. Different re-
searchers for the face recognition system have proposed
many linear and nonlinear statistical techniques. The Fig. 1: Block Diagram of Face Recognition System
PCA or Eigenfaces method is one of the most widely
used linear statistical techniques reported by research
2
1 1 2 1
Fig. 2: Summary of Overall Face Recognition Process −2 3 1 2
1 Γ2 = −1 Γ3 = −2 ...ΓM = 2
Γ1 =
−3 2 3 1
3
C. Mean Centered Images Eigen vectors corresponding to AAT can now be eas-
Average face image is calculated by ily calculated with reduced dimensionality where AXi
is the Eigen vector and λi is the Eigen value.
M
1 X
ψ= Γi (4)
M E. Eigen Face Space
i=1
The Eigen vectors of the covariance matrix AAT are
1 1 2 1 −1
−2 3 1 2 −1 AX i which is denoted by U i . U i resembles facial images
+ + + ... + → which look ghostly and are called Eigen faces. Eigen
1 −1 −2 2 2
vectors correspond to each Eigen face in the face space
−3 2 3 1 −3
and discard the faces for which Eigen values are zero
(Γ1 + Γ2 + Γ3 + ... + ΓM ) thus reducing the Eigen face space to an extent. The
ψ= (5)
M Eigen faces are ranked according to their usefulness in
Each face differs from the average by Φi = Γi − ψ characterizing the variation among the images. A face
which is called mean centered image. image can be projected into this face space by
2 2 3 2
−1 4 2 3 Ωk = U T (Γk − ψ), k = 1,..,M (10)
Φ1 =
−1 Φ2 = −3 Φ3 = −4 ...ΦM = 0
where: (Γk ψ) is the mean centered image. Hence
0 5 6 4 projection of each image can be obtained as Ω1 for
projection of image1 and Ω2 for projection of image2
D. Covariance Matrix and hence forth.
A covariance matrix is constructed as C = AAT
F. Recognition Step
where A = [Φ1 , Φ2 , Φ3 , .., ΦM ] of size N 2 xN 2
The test image, Γ, is projected into the face space to
(6)
obtain a vector, Ω as Ω = U T (Γ − ψ). The distance of
Ω to each face is called Euclidean distance and defined
2 3 by 2k = ||Ω − Ωk ||2 , k = 1,..,M where Ωk is a vector
−1 −2 T 2 −1 −1 0
A= describing the k t h face class. A face is classified as
−1 1 A = 3 −2 1 2
belonging to class k when the minimum k is below some
0 2 chosen threshold θc , otherwise the face is classified as
Size of covariance matrix will be N 2 xN 2 (4 x 4 in unknown. θc is half the largest distance between any two
this case). Eigen vectors corresponding to this covariance face images:
matrix is needed to be calculated, but that will be a
tedious task therefore. For simplicity we calculate AT A 1
which would be a 2 x 2 matrix in this case. θc = ( )maxj,k ||Ωj − Ωk || j,k = 1,..,M (11)
2
T 6 7 We have to find the distance between the original
A A= test image Γ and its reconstructed image from the Eigen
7 18
face Γf .
Consider the eigenvectors νi of AT A such that
IV. FACE R ECOGNITION A LGORITHM same eigenspace as defined during the training phase.
The face recognition system consists of two important This projected image is now compared with projected
steps, the feature extraction and the classification. Face training image in eigenspace. Images are compared
recognition has a challenge to perform in real time. Raw with similarity measures. The training image that is the
face image may consume a long time to recognize since closest to the test image will be matched and used to
it suffers from a huge amount of pixels. One needs to identify. Calculate relative Euclidean distance between
reduce the amounts of pixels. This is called dimension- the testing image and the reconstructed image of ith
ality reduction or feature extraction, to save time for the person, the minimum distance gives the best match.
decision step. Feature extraction refers to transforming
face space into a feature space. In the feature space, B. Normalized Principal Component Analysis (N-PCA)
the face database is represented by a reduced number of
features that retain most of the important information of In contrast to linear PCA, N-PCA has been devel-
the original faces. The most popular method to achieve oped to give better results in terms of efficiency. N-
this target is through applying the Eigenfaces algorithm. PCA is an extension over linear PCA in which firstly
The Eigenfaces algorithm is a classical statistical method normalization of images is done in order to remove the
using the linear Karhumen-Loeve transformation (KLT) lightning variations and background effects and singular
also known as Principal component analysis. The PCA value decomposition (SVD) is used instead of eigen
calculates the eigenvectors of the covariance matrix of value decomposition (EVD), followed by the feature
the input face space. These eigenvectors define a new extraction steps of linear PCA and lastly in classification
face space where the images are represented. In contrast steps weights are calculated for matching purpose. The
to linear PCA, N-PCA has been developed. Normalized PCA is developed by taking into account the
architecture described below:
A. Principal Component Analysis 1 Collection of Images to make the Database. All the
databases are collected and stored in a folder each
Principal component analysis (PCA) containing images of 40 persons, having 10 images
[1,2,3,4,5,6,10,11,13,14,15] is a statistical in different poses of each individual, making a total
dimensionality reduction method, which produces of 400 images in a folder for ORL Database.
the optimal linear least-square decomposition of a 2 Checking whether Image is colored or gray: Initially
training set. In applications such as image compression the face image is taken and is checked whether it
and face recognition a helpful statistical technique is colored or gray image by using the command
called PCA is utilized and is a widespread technique for size. If the face image taken is colored then it is
determining patterns in data of large dimension. PCA converted to gray image to make it two dimensional
commonly referred to as the use of Eigen faces. The (m x n). After this the class type of gray image is
PCA approach is then applied to reduce the dimension checked to make sure the image type is doubled or
of the data by means of data compression, and reveals not. If it is not doubled than convert the image to
the most effective low dimensional structure of facial double.
patterns. The advantage of this reduction in dimensions 3 Mean and Standard Deviation of Images is Cal-
is that it removes information that is not useful and culated: After this the image is converted into a
specifically decomposes the structure of face into column vector of dimension mxn, so that a typical
components which are uncorrelated and are known as image of size 112x92 for example becomes a vector
Eigen faces. Each image of face may be stored in a of dimension 10304, denoted as T. Now the mean
1D array which is the representation of the weighted of the image is calculated by using equation (4) and
sum (feature vector) of the Eigen faces. In case of this standard deviation (S) is calculated using equation
approach a complete front view of face is needed, or (13).
else the output of recognition will not be accurate. The
major benefit of this method is that it can trim down v
u
u1 XM
the data required to recognize the entity to 1/1000th of
S= t Γ2i (13)
the data existing. After feature extraction step next is M
i=1
the classification step which makes use of Euclidean
Distance for comparing/matching of the test and trained Also the standard deviation (ustd) and mean (um)
images. In the testing phase each test image should is set practically approximately close to mean and
be mean centred, now project the test image into the standard deviation calculated above.
5
VI. R ESULTS
The experiments have been performed on ORL
database with different number of training and testing Fig. 7: Correct Face Recognition Result for IFD
images. Eigen faces are calculated by using PCA al- Database
gorithm. The algorithm is developed in MATLAB. In
the experimental set-up, the numbers of training images
are varied from 80 percent to 40 percent that is initially
80% of total images is used in training and remaining
20% for testing and then the ratio was varied as 60/40
followed by 40/60. The experimental result shows that
Fig. 8: Incorrect Face Recognition Result for IFD
as the number of training images increases, efficiency of
Database
the system increases.
R EFERENCES
[1] Hiremath, Vinay, and Ashwini Mayakar. ”Face recognition using
Eigenface approach.” IDT workshop on interesting results in
computer science and engineering, Sweden. 2009.
[2] Imran, M. A., et al. ”Face Recognition using Eigenfaces.” Inter-
national Journal of Computer Applications 118.5 (2015).
[3] Vila, L. Torres L. Lorente Josep. ”Automatic Face Recognition
Of Video Sequences Using Self-Eigenfaces.” Department of Signal
Theory and Communications Polytechnic University of Catalonia
Barcelona, Spain.
[4] Tin, Hlaing Htake Khaung. ”Age Dependent Face Recognition
Fig. 10: Accuracy v/s Dataset for 60/40 Ratio using Eigenface.” International Journal of Modern Education and
Computer Science 5.9 (2013): 38.
[5] Saha, Rajib, and Debotosh Bhattacharjee. ”Face Recognition
Using Eigenfaces.” International Journal of Emerging Technology
and Advanced Engineering 3.5 (2013): 90-93.
[6] Pissarenko, Dimitri. ”Eigenface-based facial recognition.” De-
cember 1st (2002).
[7] The ORL database of faces, AT&T Laboratories Cambridge,
http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html
[8] Senthilkumar, R., & Gnanamurthy, R. K. Face Databases for 2D
and 3D Facial Recognition: A Survey.
[9] Vidit Jain, Amitabha Mukherjee. The Indian Face Database.
www.cs.umass.edu/ vidit/IndianFaceDatabas,2002.
[10] Smith, Lindsay I. ”A tutorial on principal components analysis.”
Cornell University, USA 51.52 (2002): 65.
[11] [Online] Available: http : //www.univ −
usto.dz/thesese nl igne/docn um.php?explnumi d = 1165
Fig. 11: Accuracy v/s Dataset for 40/60 Ratio [12] Turk, Matthew, and Alex Pentland. ”Eigenfaces for recogni-
tion.” Journal of cognitive neuroscience 3.1 (1991): 71-86.
[13] Oh, S. K., Yoo, S. H., & Pedrycz, W. (2013). Design of
face recognition algorithm using PCA-LDA combined for hybrid
VII. C ONCLUSION data pre-processing and polynomial-based RBF neural networks:
Design and its application. Expert Systems with Applications,
The Eigenface approach for Face Recognition process 40(5), 1451-1466.
is fast and simple which works well under constrained [14] Kim, Kyungnam. ”Face recognition using principle component
environment. It is one of the best practical solutions for analysis.” International Conference on Computer Vision and Pat-
tern Recognition. 1996.
the problem of face recognition. Instead of searching
[15] [Online] Available: http://www.ijcea.com/wp-
large database of faces, it is better to give small set content/uploads/2016/08/Face-Recognition-Using-Eigenface-
of likely matches. By using Eigenface approach, this Approach-for-FEI-and-ORL-Database.pdf
small set of likely matches for given images can be
easily obtained. The face recognition system consists
of two important steps, the feature extraction and the
classification. This paper investigates the N-PCA func-
tion improvement over the principal component analysis
(PCA) for feature extraction. The experiments carried out
to investigate the performance of N-PCA by comparing
it with the performance of the PCA. The analysis is done
with ORL and IFD dataset, the recognition performance
for both algorithms are evaluated and the experimental
results shows that N-PCA gives a better recognition
rate. It is clear that the comparison shows that accuracy
for PCA is 92.50% and 74.17% , while for N-PCA is
93.75% and 76.67% on ORL and IFD for 80/20 Ratio.
The promising results indicate that N-PCA can emerge as
an effective solution to face recognition problems in the
future. This can give us much better results if combined