《Research and Implementation of PCA Face Recognition Algorithm Based on Matlab.docx》由会员分享,可在线阅读,更多相关《Research and Implementation of PCA Face Recognition Algorithm Based on Matlab.docx(7页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、MATEC Web of Conferences 22,01037 (2015) DOI: 10.1051/mateccon2015220103 7 Owned by the authors, published by EDP Sciences, 2015 Research and Implementation of PCA Face Recognition Algorithm Based on Matlab Qi Fu* Shandong Agriculture and Engineering University, Jinan, Shandong, China ABSTRACT: This
2、 paper researches the theory of PCA (Principle Component Analysis) algorithm and the feature extraction elements in the process of face recognition, summarizes application procedures of PCA algorithm in the process face recognition, and realizes the application of PCA algorithm in the process fece r
3、ecognition in the matlab software. The research content and realization results show that: PGA_ algorithm is a kind of algorithm which is very suitable for programming and realization of matlab software; the key factor to realize PCA algorithm is the selection of the number of feature vectors, which
4、 affects the recognition rate and training time of the space sample subset. The higher recognition rate indicates better results in the algorithm implementation; the shorter training time of the space sample subset indicates more excellent algorithm iirplementatioii. In the process of selection of t
5、he number of feature vectors, on one hand, there is a need to protect the recognition rate; on the other hand, there is a need to control training time of the space sample subset, in which the recognition rate is a rigid target. The shortest training time of the subset of samples is selected on the
6、premise of meeting the recognition rate. Keywords. PCA algorithm; face recognition; training time; recognition rate; matlab realization 1 INTRODUCTION The face recognition is widely used in visual surveillance of various departments in China, which is mainly used in the security system, identificati
7、on of criminal field, proof identification and other important situations 1. In the design of face recognition system, the design and implementation of face feature extraction algorithm axe key techniques. This paper researches the face feature extraction based on PCA algorithm, and realization of m
8、atlab by the use of scientific design philosophy of algorithm. Many people make efforts to research the face feature extraction algorithm in the fece recognition system: Yinzhong Tian et al, (2010) discuss the principle and implementation of PCA face recognition algorithm, and indicates that such al
9、gorithm can reflect gray-level correlation of the fece image on the Mole 2; Zhihong Zhao (2014) proposes a kind of dynamic optiraizatioii PCA fece recognition algorithm Tbe e eriment shows that this algorithm can be used to optimize key parameters of traditional PCA algorithm to a certain extent 3,
10、Based on previous studies, this paper designs application programs of PCA algorithm in the fece recognition, and realizes such application in matlab. The research aims at providing theoretical basis for the optimization of face recognition algorithm and development of fece recognition technology. 2
11、OVERVIEW OF FACE RECOGNITION SYSTEM The face recognition (FR) refers to the recognition Corresponding author: or verification Of one or more persons fkces by the use of moving the image process and pattern recognition technology in the background of stationary sate or moving state 4. FR mainly incl
12、udes five links, that is, face detection, face representation, face authentication, facial expression analysis and physical analysis 5. The technical process of a face automatic recognition system is shown in Figure 1. The feature extraction (FE) in Figure 1 is an object of the research. 3 PCA FACIA
13、L IMAGE FEATURE EXTRACTION ALGORITHM The PCA algorithm is a kind of algorithm for the analysis of multivariate statistical data, whose idea is to adopt less linearly independent variables to represent information of most time changes in the multidimensional space, because the linearly independent va
14、riables adopted by the algorithm make the algorithm obtain minimum new component error. After the PCA analysis, the difference between the face image and the original image is little 6, which can be used for the fece recognition. This chapter researches the PCA principle and the application procedur
15、es of PCA algorithm in the fece recognition, so as to provide theoretical basis for the implementation of face recognition algorithm in matlab software. 3.1 PCA PRINCIPLE Assume that x is m dimensional random vector of the environment, and the mean value of vector is 0, tiien 01037-p.l 71994-2016 Ch
16、ina Academic Journal Electronic Publishing House. All rights reserved, http:/ MATEC Web of Conferences Figure 1. Flow chart of FR system there is a relationship shown in Formula (1). Assume that w is m dimensional random vector on tMs basis, the projection of x on w is called as an inner product (y)
17、 of the vector x and the vector w. The Formula y is shown in Formula (2). The establishment of Formula (2) that needs to satisfy constraint conditions 7 is shown in Formula (3). Ex = 0 y- YjWkXk k (1) T W X (2) : 1 (3) |w| = VwTw The main objective of PCA analysis is used to seek for a weigit vector
18、 (w), so as to afieve the maximum mathematical expectation on j2 which is shown in Formula (4), In accordance with the linear algebra Uieory, when tiie Formula (4) is the maximum, there is a need to meet the Formula (5), that is to make the maximum expectation on j2 (w) become a feature vector corre
19、sponding to the maximum feature value of the matrix Ey2)=E (W)2 =WTXXTW = WTCJ w = 1,2, A ,m (5) The core content of PCA algorithm is to calculate the transformation direction to make the variance maximize. There is a first need to build an incidence matrix as Formula (6), and then we calculate an f
20、eature value of, rank these feature values according to size, and calculate the orthorhombic feature vector constitute corresponding to previous m feature values; finally, we project the original data on the feature vector w to obtain main feature data of the original image. In the using process of
21、the practical field, it is difficult to obtain mathematical expectation on the original data. The Formula (7) is approximate to the incidence matrix. XJV in Formula (7) indi cates the vector corresponding to all pixels of each original gray-level image, / indicates the number of original image: C X
22、= E CxRnxn (6) c x N The above analysis shows that the PCA algorithm is used to calculate the feature value and feature vector of the covariance matrix. For the PCA algorithm of the orthogonalization decomposition, this paper adopts the Jacobian method 8. Its calculation process is to first order th
23、at S = Iw (unit matrix), select an element apqvnih the maximum absolute value in the non-diagonal element. If aP9-) according to the size, so the corresponding feature vector is U,-, and then select the maximum nonzero feature vector in the previous number of A: to establish the Formula (11). U = AV
24、A2 (9) 4 ALGORITHM DESIGN AND MATLAB REAL- IZATION 4.1 ALGORITHM DESIGN Assume that the size of 2D face image is a x , and the selected nixmber of samples is M, then the design of face image feature extraction algorithm based on (10) (11) 01037-p.3 71994-2016 China Academic Journal Electronic Publis
25、hing House. All rights reserved, http:/ MATEC Web of Conferences Figure 3. Design of the face image feature extraction algorithm based on PCA Figure 4. Twelve images of face samples 01037-p_4 71994-2016 China Academic Journal Electronic Publishing House. All rights reserved, http:/ ICETA 2015 Table
26、1. Basic situation of file name used by each training subset Training subset A B File name C D Subset 1 A1 A2 B1 B2 Cl C2 D1 D2 Subset 2 A1 A3 B1 B3 Cl C3 D1 D3 Subset 3 A2 A3 B2 B3 C2 C3 D2 D3 Figure 5. Face recognition results of matlab realization All training samples ( z- ) are projected on the
27、space of feature vector (U) to obtain the feature of each sample (pz-). It is shown in Formula (12): P/ = UTx =0, 1, 2,八, M) (12) Finally, the feature face is used for the face image recognition. For all the samples to be recognized ( f ) , the coefficient vector (y) can be calculated through the pr
28、ojection of the vector subspace (U). The calculation method is shown in Formula (13). y is the feature of the samples to be recognized (f). The recognition result can be obtained through comparison with the feature level of training sample (P) and the samples to be recognized (f) according to the sp
29、ecified category partition criteria. If there is a need of face detection, the sample image formula (14) can be re-established. Considering the signal to noise ratio (SN) f the image re-established, if the signal to noise ratio is less than a given threshold value 13, we can determine that f is not
30、the face image. Urf (13) Uy (14) 4.2 MATLAB REALIZATION The process of reading the image matrix can directly read data from the image file. The face recognition can be realized in matlab software by the use of PCA algorithm and the principle of K-L transformation and singular value decomposition. As
31、 shown in Figure 4, each person has three images with three kinds of facial expression, and there are 12 images in total. Each original image has 256 gray levels, and the resolution ratio is 112 x 92. From the aspect of obtaining typical recognition rate, this paper selects two images from three ima
32、ges of each person as training samples, and the rest image is used as a test with a total of three kinds of selection method. There is a need to record the recognition rate for each test set in detail. The final recognition rate is a mean value of three times of test results. As shown in Table 1, it
33、 is the file name of each person selected in each training set. 01037-p.5 71994-2016 China Academic Journal Electronic Publishing House. All rights reserved, http:/ MATEC Web of Conferences Figure 6. Impact of the number of different feature vectors on the recognition rate and training time To respe
34、ctively select A2, B2, G2 and D2 as test images, and respectively select Al, A3, Bl, B3, Cl, C3 and Dl, D3as training sets, the face recognition results can be obtained as shown in Figure 5. Figure 6 shows the impact of tbe number of feature vector () on the recognition rate and training time. As sh
35、own in Figure 6, to select 60 feature vectors, the recognition rate has a slow increase but the training time is still increased with a faster speed. The capacity of 60 feature vectors accounts for about 95% of the whole capacity. The experiment result shows that, when the capacity reaches 99%, the
36、number of feature vector needs to reach about 153, and the recognition rate will reach 99.2%, but the training time reaches 1.42s. In summary, it is optimal to select 60 feature vectors, then the recognition rate is 95.1%, and the training time is 0.93s. 5 CONCLUSION The key technology of the fece r
37、ecognition system is the design of the fkce feature extraction algorithm. Based on the design platform of matlab software, this paper adopts the PCA method to design a programmed algorithm for the face feature extraction, and realize the face feature extraction in matlab. The research results show t
38、hat: 1) The PCA algorithm is a kind of algorithm for the analysis of multivariate statistical data. The key link is to obtain K-L transformation, and face image feature value and feature vector in the process of feature extraction. 2) The targets of application effects on the evaluation of PGA algor
39、ithm in the face recognition are face recognition rate and training time of the space sample subset, the former ranks a high priority, while the latter one ranks a low priority. 3) The face recognition rate and training time of the space sample subset are associated with the number of feature vector
40、s selected. Both values will be increased with the increase of the number of feature vectors selected. 4) The results are realized through the face recognition of four persons with a total of 12 images. Three images on each person show that it is optimal to select 60 feature vectors, then the face r
41、ecognition rate is 95.1%, and the training time of the space subset is 0.93s. REFERENCES 1 Lei Songze. 2006. MATLAB Realization of Face Feature Extraction Based on PCA. Computer Development and Application. 19(11): 20-21. 2 Tian Yinzhong, Dong Zhixue. & Huang Jianwei, 2010. Research and Implemaitati
42、on of Face Recognition Algorithm Based on PGA. Inner Mongolia Science &Technology and Economy. (6): 56-57. 3 Zhao Zhihong, 2014. Implementation of Face Recognition Algorithm Based on Dynamic Optimization PCA. Journal of Nanjing Industry and Technology College.14 (2): 3944, 01037-p.6 71994-2016 China
43、 Academic Journal Electronic Publishing House. All rights reserved, http:/ ICETA 2015 1 Liang Luhong, Ai Haizhou, Xu Guangyou. & Zhang Bo. 2002. Research Summary of Face Detection. Journal of Computers.2S (5): 1-22. 2 Lei Qinll. 20G2. Multivariate Statistical Analysis of Economic Management. Beijing
44、: China Statistics Press. 3 Wang Liangliang, Sim Jixiang, Tan Zhiguo. 2008. Face Tracking System Based on Face Detection and CAMS- GIFT Algorithm. Microcomputer Applications. 29(2): 14-17. 4 Gupta S, Aggarwal J K, Markey M K, et al. 2007:1-7. 3D face recognition founded on the stractural diversity o
45、f human fec. Proceedings of IEEE Computer Society Conference on Computer Visiofl and Pattern Recognition, Minneapois. 5 Peng Hui, Zhang Changshui, Rong Gang. 1997. Automatic Face Recognition Method Based on KrL Transformation Journal of Tsinghua University (Natural Sci ence Edition). (16): 71-86, 6
46、Hu Xinfeng. 2013. Applied Research of Combination of Particle Swann and Genetic Algorithm in PCA Face Recognition Algorithm. Central China Normal University. 7 Iiu Qingrui. 2009. Research and Implementation of Face Recognition Algorithm Based on Partitioning PCA. Northeastern UnivCTsi, 8 Liu Yongjun
47、, Tan Yunfei, Zhu Xiaoyu, Chang Jinyi. 2009. PCA and Dynamic Face Recognition Based on Image Matrix Transformation. Journal of Changshu Institute of Science and Technology (Natural Science Edition). (2): 101-105. 9 Chen Fubing, ChenXiuhong, Zhang Shengliang. 2006. Face Recognition Method Based on Mo
48、dular 2D PCA. Journal of China Image and Grcqhics. (4): 580-585. 10 Zhang Ying. 2009. Research of Face Recognition Algorithm Based on Two-dimensional Principal Component Analysis. Chongqing University. 01037-pJ 71994-2016 China Academic Journal Electronic Publishing House. All rights reserved, http:/