Anda di halaman 1dari 7

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 1, January 2012)

Comparative Analysis of PCA and 2DPCA in Face Recognition


Dhiraj K. Das
HOD, Computer Science and Engineering, Nepal Engineering College Changunarayan, Bhaktapur dhirajkd@nec.edu.np
Abstract- - The growing need for effective biometric identification is widely acknowledged. Human face recognition is an important area in the field of biometrics. It has been an active area of research for several decades, but still remains a challenging problem because of the complexity of the human face. The Principal Component Analysis (PCA), or the eigenfaces method, is a de-facto standard in human face recognition. Numerous algorithms tried to generalize PCA in different aspects. More recently, a technique called Two Dimensional Principal Component Analysis (2DPCA) was proposed to reduce the computational cost of PCA. Unlike PCA treats images as vectors, 2DPCA views an image as a matrix. To analysis the effectiveness of the PCA and 2DPCA, a number of Eigenvalues were obtained and then compared. And then results have been presented in graphical form to show the effectiveness and accuracy. This 2DPCA algorithm can be easily implemented in any programming language on a digital computer. 2DPCA algorithm is found to be very accurate and more effective. Keywords: biometric, human face, Principal Component Analysis, Two Dimensional Principal Component Analysis, Eigenvalues, effectiveness and accuracy

I.

INTRODUCTION

Information and Communication Technologies (ICT) are increasingly entering in all aspects of our life and in all sectors, opening a world of unprecedented scenario where people interact with electronic devices, embedded in environments that are sensitive and responsive to the presence of users. Image analysis is a process of discovering, identifying, and understanding patterns that are relevant to the performance of an image-based task. Face recognition has recently received significant attention. It plays an important role in many application areas, such as human-machine interaction, authentication and surveillance.However, the wide-range variations of human face, due to pose, illumination, and expression, result in a highly complex distribution and deteriorate the recognition performance.

In addition, the problem of machine recognition of human faces continues to attract researchers from disciplines such as image processing, pattern recognition, neural networks, computer vision, computer graphics, and psychology. In identification problems, the input to the system is an unknown face, and the system reports back the determined identity from a database of known individuals, whereas in verification problems, the system needs to confirm or reject the claimed identity of the input face. The solution to the problem involves segmentation of faces (face detection) from cluttered scenes, feature extraction from the face regions, recognition or verification. Robust and reliable face representation is crucial for the effective performance of face recognition system and still a challenging problem. Feature extraction is realized through some linear or nonlinear transform of the data with subsequent feature selection for reducing the dimensionality of facial image so that the extracted feature is as representative as possible. 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. PCA is a powerful tool for analyzing data [7]. A straightforward image projection technique, called two-dimensional principal component analysis (2DPCA), is developed for image feature extraction. As opposed to conventional PCA, 2DPCA is based on 2D matrices rather than 1D vectors. That is, the image matrix does not need to be previously transformed into a vector. Instead, an image covariance matrix can be constructed directly using the original image matrices. In contrast to the covariance matrix of PCA, the size of the image covariance matrix using 2DPCA is much smaller. As a result, 2DPCA has two important advantages over PCA. First, it is easier to evaluate the covariance matrix accurately. Second, less time is required to determine the corresponding eigenvectors.

330

International Journal of Emerging Technology and Advanced Engineering


Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 1, January 2012) The main ideas of the PCA and 2DPCA methods are to 1) Checking for criminal records. find the vectors that best account for the distribution of 2) Enhancement of security by using surveillance target images within the entire image space. In the general cameras in conjunction with face recognition system. PCA /2DPCA method, eigenvectors are calculated from 3) Finding lost children's by using the images received from the cameras fitted at some public places. training images that include all the poses or classes. But for 4) Knowing in advance if some VIP is entering the hotel. classification a large number of hand poses for a large 5) Detection of a criminal at public place. number of users, need large number of training datasets 6) Can be used in different areas of science for comparing from which eigenvectors generation is tedious and may not a entity with a set of entities. be feasible for a personal computer [8]. This research is a step towards developing a face recognition system which can verify static images. In case II. LITERATURE RIVIEW the dynamic images, received from the camera can first be Face recognition is a biometric approach that employs converted in to the static one's and then the same procedure automated methods to verify or recognize the identity of a can be applied on them. Some of the factors can be living person based on his/her physiological characteristics. considered for dynamic images as distance between the In general, a biometric identification system makes use of camera and the person, magnification factor, view [top, either physiological characteristics (such as a fingerprint, side, front] etc. iris pattern, or face) or behaviour patterns (such as handThe databases used in developing face recognition writing, voice, or key-stroke pattern) to identify a person. systems rely on images of human faces captured and Because of human inherent protectiveness of his/her eyes, processed in preparation for implementing the recognition some people are reluctant to use eye identification systems. system. The variety of information in these face images Face recognition has the benefit of being a passive, non makes face detection difficult. For example, some of the intrusive system to verify personal identity in a natural conditions that should be accounted for, when detecting and friendly way [5]. faces are [5][9]: There are numerous possible applications for facial 1) Occlusion: faces may be partially occluded by other image processing algorithms. The most important of them objects concern face recognition. In this regard, one has to 2) Presence or absence of structural components: beards, differentiate between closed worlds and open world mustaches and glasses settings. In a closed world application, the algorithm is 3) Facial expression: face appearance is directly affected dedicated to a limited group of persons, e.g. to recognize by a person's facial expression the members of a family. In an open world context the 4) Pose (Out-of Plane Rotation): frontal, 45 degree, algorithm should be able to deal with images from profile, upside down unknown persons, i.e. persons that have not been 5) Orientation (In Plane Rotation):face appearance presented to the system during its design or training. For directly varies for different rotations about the example, an application indexing large image databases camera's optical axis like Google images or television programs should 6) Imaging conditions: lighting (spectra, source recognize learned persons and respond with unknown if distribution and intensity) and camera characteristics the person is not in the database of registered persons [5] (sensor response, gain control, lenses), resolution [6]. 7) Facial feature extraction (for local face recognition) Concerning face recognition, there further exist two a. To detect the presence and location of features such types of problems: face identification and face verification as eyes, nose, nostrils, eyebrow, mouth, lips, ears, (or authentication). The first problem, face identification, is etc to determine the identity of a person on an image. b. Usually assume that there is only one face in an image 8) Human pose estimation and tracking The second one only deals with the question: Is X the identity of the person shown on the image? or Is the III. SYSTEM ARCHITECTURE person shown on the image the one he claims to be?. The objective of this research is not just to create another These questions only require yes or no as the answer. system that is able to identify a query face image from a Face recognition system can help in many ways: database. Most importantly, the delivered prototype to maintain its robustness on face images of poor quality.

331

International Journal of Emerging Technology and Advanced Engineering


Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 1, January 2012) Although this is a research-based project, we laid out [2] The next things that considered were the image certain physical requirements for our software during the processing tasks. Internally, all pattern recognition systems planning stage: have the following processes. Each operation must 1) It should have a GUI through which the user can complete its task before the next one can begin: Image execute each task; acquisition, Image enhancement, Feature extraction and 2) The interface should be simple, clear, and systematic: classification and, Detection/recognition. one button, one function; Since the output of each operation is the input to the 3) It should allow the user to select the test image; next, the functional parts (i-iv) must execute in sequence. 4) Each subprogram should be straightforward and should The size of every image (input and output) is to be kept not contain functions that overlap; standard so that there is better control and accuracy during 5) It should display recognition results so that we are able matrix computation and parameter training. to evaluate and analyze. Image-1 Image-2 Image-n

Image Acquisition Image preprocessing (Smoothing filter, Gray Image) Mean Image

Input Test Image

Image preprocessing (Smoothing filter, Gray Image)

Scattered Image

Scattered Image Finding Eigenvalue and Eigenvector


Feature Extraction of input image (feature matrix i.e. Principle component value)

Finding Eigenvalue and Eigenvector

Computing feature matrix of test image

Calculating Euclidian Distance

Is Euclidian Distance < Threshold value?

Yes
Test image is Same

No
Test image is not Same
Figure 2: Overall System Block diagram

332

International Journal of Emerging Technology and Advanced Engineering


Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 1, January 2012)

IV.

ALGORITHM FOR PCA

V.

ALGORITHM FOR 2DPCA

a) b) c)

d) e) f) g) h)

i)

a) b) c) d) e)

f)

Algorithm: Training Input: Finger spelling training images Output: Finger spelling image features, eigenvector matrix, feature matrix Method: Apply pre-processing techniques to the training images. Transform the training images into column vector by appending the columns in the image consecutively. Build the data matrix A of image column vectors with a label vector L having the corresponding alphabet names of the image columns in A. Get mean column vector M of the data matrix A. Subtract mean M from each of the columns of A to result in mean centered matrix A. Compute the covariance matrix C of A as C = AAT. Obtain eigenvectors matrix E and eigenvalues vector V of C. Rearrange the eigenvector columns in E as the corresponding eigenvalues in V are sorted in descending order. Project the centered matrix A onto E to get feature matrix P = ETA. Training ends. Following is the algorithm designed for recognition. Algorithm: Recognition Input: Finger spelling image B to be recognized, number of dimensions to be considered m, feature matrix P, eigenvectors matrix E, mean vector M, labels vector L Output: Classification label of input image Method: Apply the respective pre-processing technique on B Transform the processed image B into a column vector J by placing the columns in the image consecutively. Subtract the mean vector M from the image vector J, J = J M. Project the image vector J onto the eigen matrix E to get the feature vector Z= ETJ. Compute the Euclidian distance d between the feature vector Z and all the column vectors in the feature matrix P considering only m elements in the vectors and identify the column having the minimum distance d. Obtain the label from vector L corresponding to the column identified in P having the minimum distance to Z. Recognition ends.

Algorithm: Training Input: Finger spelling training images Output: Finger spelling image features, eigenvector matrix, feature matrix Method: a) Applying pre-processing techniques to the training images. b) Obtain the average image A of all training samples:

A
c) d)

1 M

i 1

Ai

e)

Estimate the image covariance (scatter) matrix G: Compute d orthonormal vectorsX1;X2; : : : ;Xd corresponding to the d largest eigenvalues of G. X1;X2; : : : ;Xd construct a d-dimensional projection subspace. Yang et al. [1] have showed that X1;X2; : : : ;Xd are the d optimal projection axes, such that when projecting the sample images on each axis Xi, the total scatter of the projected images is maximum. Project A1; : : : ;AM on each vector X1; : : : ;Xd to obtain the principal component vectors: Yi j = AjXi; i = 1; : : : ; d; j = 1; : : : ;M

Training ends. Following is the algorithm designed for recognition. Algorithm: Recognition a) b) Apply the respective pre-processing technique on B When a testing image with 2D intensity matrix B arrives, compute the principal component vectors of the new image: YBi = BXi; i = 1; : : : ; d Compute the Euclidean distance between (YB1 ; : : : ; YBd ) and (Yj1 ; : : : ; Yjd ) (j = 1; : : : ;M):

c)

dist ( B, A j ) || Yi B Yi j || 2
i 1

d)

Where || YiB Yij ||2 is the Euclidean distance between YiB and Yij Use dist(B;Aj ) (j = 1; : : : ;M) and a threshold value to decide the label of the testing image.

Recognition ends.

333

International Journal of Emerging Technology and Advanced Engineering


Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 1, January 2012)

VI. SELECTING T HRESHOLD VALUES


360000

This face pattern is classified using the eigenface method, whether it belongs to known person or unknown person. The eigenvectors are calculated from the known persons face images for each face class and k-number of eigenvectors corresponding to the highest eigenvalues are chosen to form principal components for each class. The Euclidean distance is determined between the weight vectors generated from the training images and the weight vectors generated from the detected face by projecting them onto the eigenspaces. If minimum Euclidian distance is lower than the predefined threshold value then corresponding person is identified otherwise result is unknown person. In this experiment, the threshold values are defined from the given equation:

Magnitude of EigenValue

320000 280000 240000 200000 160000 120000 80000 40000 0

9 10 11

Serial Number

Sum of all Eigen value Sum of d l arg est eigenvalue

i 1 d k 1

Figure 3: Magnitude of Positive Eigenvalues

VII. A.

EXPERIMENT & RESULT ANALYSIS Experimental Setup

The unit eigenvectors u1,up of the covariance matrix S are called the principal components of the data. The first principal component is the eigenvector corresponding to the largest Eigenvalues of S, the second principal component is the eigenvector corresponding to the second largest Eigenvalues of S, and so on.

The PCA and 2DPCA methods was used for face recognition and tested on face image database. The database was used to evaluate the performance of PCA and 2DPCA under conditions where the pose, sample size, lightning conditions and illumination are varied. The results were analyzed in comparison to the PCA model and the 2DPCA model.

First principal component

First Largest Eigenvalue Sum of All Eigenvalue 355124 .7294 58 .53 % 606697 .2905 Second Largest Eigenvalue Sum of All Eigenvalue 113779 .252 18 .75 % 606697 .2905

B.

Magnitude of Eigenvalues

Second principal component

[4] The face image database consists of six to seven images of each. First, an experiment was performed using the first two images for feature extraction, and the remaining images for test. The 2DPCA and PCA algorithm was first used for feature extraction. Here, the size of image is 20 X 20, so the size of covariance matrix Gt was 20 X 20 in the case of 2DPCA, so it was very easy to calculate its all Eigenvalues, in this case 20 (out of 20, 11 are positive Eigenvalues) whereas in the case of PCA, the size of covariance matrix Gt was 400 X 400, so it was hard to get all the Eigenvalues and eigenvector in personal computer. The magnitude of Gts Eigenvalues is plotted in decreasing order as shown in figure 2 below.

And so on. Chart representation of magnitude of principal component shown in figure.

334

International Journal of Emerging Technology and Advanced Engineering


Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 1, January 2012)
70 60 50 40 30 20 10 0 1 2 3 4 5 6 7 8 9 10 11 Principal Component
Figure 4: Magnitude of Principal Component (%)

Magnitude (%)

a)

Type 2: Based on number of largest Eigenvalues and four training image Method PCA 2DPCA PCA 2DPCA PCA 2DPCA No. of Eigenvalues 2 3 4 Accuracy % 5/8(50%) 5/8(50%) 5/8(50%) 6/8(62.5%) 6/8(75%) 7/8(87.5%)

A. Comparison of PCA and 2DPCA In this section, PCA and 2DPCA were compared performed two type of test. a) Type 1: Based on number of training image and largest Eigenvalues b) Type 2: Based on number of largest Eigenvalues four training image c) Type 1: Based on number of training image and largest Eigenvalues and one and one

Table 2: Recognition Accuracy based on Number of Largest Eigenvalues

100

Accuracy

80 60 40 20 0 2 3 4 Number of Largest EigenValue PCA 2DPCA

Method
PCA 2DPCA PCA 2DPCA PCA 2DPCA

No. of training Accuracy % image


2 3 4 8/15(53%) 11/15 (73%) 8/15(53%) 11/15 (73%) 9/15(60%) 13/15(80%)

Figure 6: Recognition Accuracy based on Number of Largest Eigenvalues

Table 1: Recognition Accuracy based on Number of training sample

100
Accuracy

80 60 40 20 0 2 3 Number of Picture
Figure 5: Recognition Accuracy based on Number of training sample

PCA 2DPCA

The performance of the PCA and 2DPCA is compared on the face database and two different tests are constructed. 1) By taking first largest eigenvalue and changing the number of training images. It is found that accuracy rate is high in the case of 2DPCA. 2) In second set of experiment, keeping the number of training images fixed and changing the number of eigenvalue. It is found that if the difference between the eigenvalue is large, then the performance is same in all the cases but if the difference is small then recognition rate increases. Size of Covariance Matrix and Time of feature extractions

The disadvantage of PCA method is computation time. It takes 2 hours to find the feature of image where in 2DPCA requires nearly 3-4 second to complete the same number of test images. But the above result is also dependent on the CPU speed and available memory.

335

International Journal of Emerging Technology and Advanced Engineering


Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 1, January 2012) Method Training Image Covariance matrix size Time required for feature extraction 2 hrs 3 sec

References
[1] G.M.Beumer, Q. Tao, A.M. Bazen and R.N.J. Veldhuis, A landmark paper in face recognition, 2006 [2] Rafel C. Gonzalez, Richard E. Woods, Digital Image Processing, Pearson Education, Six Indian Reprint, 2001 [3] Hui Kong, Xuchun Li, Lei Wang, Eam Khwang Teoh, Jian-Gang Wang, Ronda Venkateswarlu Generalized 2D Principal Component Analysis, IEEE International Joint Conference on Neural Network (IJCNN), Montreal, Canada, 2005. [4] Serge Lang, Linear Algebra, Addison-Wesley, Second Edition,1985. [5] S. Z. Li and A. K. Jain, Eds., Handbook of Face Recognition. Springer, 2005. [6] Liwei Wang, Xiao Wang, Ming Chang, and Jufu Feng , "Is Two-Dimensional PCA a New Technique?" Acta Automatica, vol. 31, no. 5, pp.782-787, 2005. [7] Matthew A. Turk and Alex P. Pentland, Face recognition Using Eigenfaces, 1991. [8] J. Yang, D. Zhang, A. F. Frangi, and J. Yang, Two-dimensional PCA: A new approach to appearance-based face representation and recognition, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 26, no. 1, pp. 131137, Jan 2004. [9] WenYi Zhao, Rama Chellappa Image based Face Recognition Issues and Methods

PCA 2DPCA

4 4

400 X 400 20 X 20

PCA is the high computational complexity. Suppose that the image are of size M X N, and the number of training images is greater than M X N, performing PCA needs O((M X N)3) computations. This is quite expensive even for medium size images.

VIII. CONCLUSION
In this research, two face recognition systems, PCA and 2DPCA algorithms are examined. The feature projection vectors obtained through the PCA and 2DPCA methods and these vectors are applied to test image. PCA and 2DPCA face recognition systems that use Euclidean Distance based classifier. Additionally, the recognition performance of 2DPCA is higher than the PCA. Eigenvalues is also a very important aspect of the face and the result shows that first largest Eigenvalues keeps the large amount of principal component information; second largest keeps the second largest principal component information. Experiment shows that by combination of largest Eigenvalues gives higher accuracy in face detection.

336

Anda mungkin juga menyukai