International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)
Volume 3 Issue 7, July 2014
2303 ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET
Face Recognition Based on PCA Algorithm Using Simulink in Matlab
Dinesh Kumar1, Rajni2.
1Mtech scholar department of ECE DCRUST Murthal Sonipat Haryana,
2Assistant Prof. Department of ECE DCRUST Murthal Sonipat Haryana
Abstract
The purpose of research work is to develop a computer system that can recognize a
person by comparing the individuals. As such we know reliable automatic face
recognition has become a realistic target of biometrics research. In this paper we
introduce a method for face recognition that is (PCA) principal component analysis. It
is easy and not costly as compare to other, like iris scan or finger print scan. In PCA we
only required 2-D frontal image of the person whose face to be recognize. This 2-D
frontal image is converted into 1-D matrix by concatenated of 2-D matrix. Face
recognition is very hot topic from a number of years because of its application.
Key terms: Face recognition, Principal Component Analysis, Eigen value, Eigenvector.
1 Introduction:
Face recognition is very interesting and popular from 50-60 years. In 1960s first semi-
automated system for face recognition is generated. In it some feature of face is extracted
(like ears, nose, eyes and mouth etc.). Then comparison is done between the reference data
and calculated distance and ratio to a common reference point. In 1970s specific marker
based technique was developed by Lesk, Goldstein and Harmon [1]. They used 21 specific
subjective markers for automate the recognition. These specifications were like hair color, lip
thickness, skin color, face shape and nose shape etc. But the problem with both the
techniques was that the measurement and locations were manually computed. Kirby and
Sirovich generate a technique called Principal Component Analysis in 1988. It is a standard
linear algebra technique for the problem of face recognition. Another the Eigen face
techniques were discovered by Turk and Pentland in 1991 [2]. There no further improvement
was done on it because it was environmental effect. In 2001 new technology came out and it
captured very good public’s attention. That approach captured surveillance image and
compared them to the database of digital photos. That was very better for security point of
view. Face recognition technique is increasing day by day and play major role in our life.
Now it is being used to identify missing children’s, passport fraud, identity fraud etc [3].
As we know human face is an extremely complex dynamic structure with characteristics
that can quickly and significantly change with time. The human ability to recognize face is
remarkable. In our lifetime we recognize thousands of faces, but after some time separation
we unable to recognize them. It is only due to the face variability. Face recognition is
playing very important role in our life and hot research area in the field of computer vision
[4]. It is very important research area because of its application. Security point of view face
International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)
Volume 3 Issue 7, July 2014
2304 ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET
recognition is very better technique. It is very useful in field of entertainment, law
enforcement, surveillance, smart cards (national ID, passport) and widely used in many
corporate and educational institutions. There are so many techniques for face recognition one
of them is Principal Component Analysis [5]. A face recognition system for automatically
identifying or verifying a person from a digital still and video image based on computer-
driven application. Generally face recognition works in two steps:
1.1. Face Detection 1. 2. Face Recognition
Face detection- For face detection we use a simple camera to take clear photo of a person.
Then we detect face from that image. After detect many face from image we make database
of it. And it is used for comparison with test image.
Face recognition- Test image face is also detect by using face detection technique. Then that
face is compared with the constricted database. On basis of that comparison we can say face
is known or not.
Image from camera
Figure 1 generally face detection and recognition
2. Mathematics representation of PCA Algorithm
For PCA algorithm we take a 2-D image of a person by using any camera. Then that 2-D
image is converted into 1-D by concatenation of the matrix. Suppose we take M images to
create database of N*N (rows of matrix *columns of image). In it Pj considered as pixel
values. PCA transforms a set of data obtained from possibly correlated variables into a set of
Face
detection &
create
database
Test
image
Recognition
of face
Comparison
International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)
Volume 3 Issue 7, July 2014
2305 ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET
uncorrelated variables called principle components. These may be equal or less than the
number of original variables [6].
Lets us consider a training database consists of N images which are of same size. The images
are normalized by converting each image matrix to equivalent image vector Zi. The training
set matrix Z is the set of images vectors with Training set
Z = [Z1 Z2 …..ZN] (1)
The mean face (µ) is the arithmetic average vector as given by:
µ = 1
𝑁 𝑍𝑘
𝑞𝑘=1 (2)
The deviation vector for each image Ωi is given by:
Ωi = Zi – µ where i = 1,2,…N (3)
Consider a difference matrix B= [Ω1, Ω2… ΩN] which having only the distinguishing
features for face images and removes the common features. To find eigenfaces we have to
calculate the Covariance matrix C of the training image vectors by [7]:
C=B.BT (4)
Due to large dimension of matrix C, we consider matrix N of size (Nt X Nt) which gives the
same effect with reduces dimension.
The eigenvectors of C (Matrix U) can be obtained by using the eigenvectors of N (Matrix V)
as given by:
Ui=BVi (5)
To find the weight of each eigenvector αi to represent the image in the Eigen face space, as
given by [8]:
αi = Ui T (Z -µ ) , i=1,2,……, N (6)
Weight matrix A = [µ1, µ2 …. µN] T
(7)
The Euclidean distance is used to find out the distance between two face keys vectors and it
is given by:
Euclidean distance = (𝑎𝑖 − 𝑏𝑖)2𝐷𝑖=1 (8)
On basis of that distance, we can say face is recognized or not.
3 Results
3.1 Face detection: - we take a 2-D image of any person, after that cropping is done. In cropping we
remove the unwanted part of image. Than that image is put into the Matlab program and by using B-
box we select the region of interest. Finally face is detected from the image.
International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)
Volume 3 Issue 7, July 2014
2306 ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET
Figure 2 detection of face in color and gray color.
International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)
Volume 3 Issue 7, July 2014
2307 ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET
3.2 Face Recognition
3.2.1 Analysis of Color database: For single Image database
For face recognition we use a image of size 512×512.
Figure 3 Colored images of six individual persons.
SR.
No.
Database Test Image Mean Eigen Value Euclidean
Distance
Theta
=C*Max(vector
Rast)
Result
1 Akc1 Ack1 0.4856 -0.2652 6.316274 3.3620 R
International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)
Volume 3 Issue 7, July 2014
2308 ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET
Result for Color Database with individual
3.2.2 Analysis of Color database: For Nine Images in database
For face recognition we use a image of size 512×512.
Figure 4 Database with nine images 3of 3 individual each
2 Akc1 D2 0.4856 -0.2955 1.136893 3.3620 N. R
3 D2 D2 0.5140 -0.4303 5.215788 3.3620 R
4 D2 Par512 0.5140 -0.2037 2.298737 3.3620 N.R
5 Par512 Vk512 0.6652 -0.4693 1.249261 3.3620 N.R
International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)
Volume 3 Issue 7, July 2014
2309 ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET
Figure 5 Test images of size 512×512
Results for database with nine images
SR.
No.
Database Test
Image
Mean Eigen
Value
Euclidean
Distance
Theta
=C*Max(vector
Rast)
Result
1 D3 Ack1 0.5135 -0.6466 6.991376 1.5405 R
2 D3 amit 0.5135 -0.9227 6.3940913 1.5405 R
3 D3 D2 0.5135 -0.6769 1.2268813 1.5405 F
4 D3 Vk512 0.5135 -0.5602 1.2503594 1.5405 N.R
5 D3 par512 0.5135 -0.4503 1.0291825 1.5405 N.R
3.2.3. Analysis of Gray database: For single Image database
For face recognition we use a image of size 512×512.
Figure 6 Gray images of six individual images
International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)
Volume 3 Issue 7, July 2014
2310 ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET
Result for Gray Database of individual Image
SR.
No.
Database Test
Image
Mean Eigen
Value
Euclidean
Distance
Theta
=C*Max(vector
Rast)
Result
1 Ak2 Ak2 0.3484 -0.4631 4.6123056 2.8788 R
2 Dk2 ak2 0.4557 -0.0766 -1.333633 2.8788 N.R
3 Par512b Par512b 0.7197 -0.2708 3.8894222 2.8788 R
4 Dk2 Par512b 0.4557 -0.3889 0.9743281 2.8788 N.R
3.2.4 Analysis of Database with nine Images: Database for four image
For face recognition we use a image of size 512×512.
Figure 7 Database with nine images 3× 3 matrix form
Figure 8 Database with nine images 3× 3 matrix form
International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)
Volume 3 Issue 7, July 2014
2311 ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET
Result for Gray Database of individual Image
SR.
No.
Database Test
Image
Mean Eigen
Value
Euclidean
Distance
Theta
=C*Max(vector
Rast)
Result
1 Db3 Ak2 0.5114 -0.3294 7.667889 3.3620 R
2 Db3 Vk512b 0.5114 -0.6392 4.3078312 3.3620 R
3 Db3 Dk2 0.5114 -0.5499 8.855483 3.3620 R
4 Db3 Dk1 0.5114 -1.1804 5.872846 3.3620 R
5 Db3 par512b 0.5114 -0.1362 6.9711253 3.3620 R
Conclusion This paper presents a computer software system which can recognize a face.
PCA technique which is used for face recognition based on Simulink in Matlab. For face
recognition we use a image of size 512×512. Figure two and three shows the face detection.
Figure 4 shows colored images of six individual persons. These images are compared to each
other and result is shown in the table. In the figure 5, we use a database of nine images and in
the figure 6 test images are shown. Results after applied PCA algorithm are shown in the
table. Similarly gray color image are used and result for that is shown with help of table.
References
[1] Ali Javed, “Face recognition based on principal component analysis”, I.J. Image, Graphics & Signal
Processing, 2013, pp.238-44.
[2] Mamta Dhanda, “Face recognition using eigen vector from PCA”, JMIET, Radaur, Yamuna Nagar,
Haryana, India, March 2012.
[3] Shang-Hung Lin, “An introduction to face recognition technology”, Informing Science Special Issue
on Multimedia Informing Technology-Part-2, Vol. 3 No. 1, 2000.
[4] Andrew W.Senior and Ruud Mnitio. Bole, “Face recognition and its applications”, NY 10598 USA.
[5] A. Gunjan Dashore et.Al. “An Efficient Method For Face Recognition Using PCA”, International
Journal of Advanced Technology & Engineering Research (IJATER), Chennai, Tamilnadu, India,
March, 2012.
[6] Faizan Ahmad et.al, “Image-based face detection & recognition ”, Department of Information
Technology, Education University, Lahore, 54000, Pakistan, 2012.
[7] Manal Abdullah et.al, “Optimizing face recognition using PCA” . International Journal of Artificial
Intelligence & Applications (IJAIA), Vol.3, No.2, March 2012
[8] M.A. Turk and A.P. Pentland, “Face Recognition Using Eigenfaces”, IEEE Conf. on Computer Vision
and Pattern Recognition, pp. 586-591, 1991.
International Journal of Advanced Research in Computer Engineering & Technology (IJARCET)
Volume 3 Issue 7, July 2014
2312 ISSN: 2278 – 1323 All Rights Reserved © 2014 IJARCET
[9] Rehna. V. J and Jeya Kumar, “Hybrid approaches to image coding: a review”. International Journal of
Advanced Computer Science and Applications, Vol. 2, No. 7, 2011
[10] M.N.Shah Zainudin et.al, “Face recognition using principal component analysis(PCA) and linear
discriminate analysis (LDA) ”. International Journal of Electrical & Computer Sciences IJECS-IJENS
Vol:12 No:05, 2007
[11] J. Zhang, X. D and Zhang, S. W. Ha, “A novel approach using PCA and SVM for face detection,” in
Proceedings of 4th International Conference on Natural Computation, vol. 3, pp. 29-33, 2008.
[12] Rabia Jafri and Hamid R. Arabnia, “A survey of face recognition techniques”. Journal of
Information Processing Systems, Vol.5, No.2, June 2009 ISSN 1976-913X
[13] Zhujie, Y.L.Y. “Face recognition with eigen faces”. Proc.IEEE Intl. Conf. Industrial Technol.1994 pp:
434-438