You are on page 1of 5

2008 Congress on Image and Signal Processing

Face Detection Based on Template Matching and 2DPCA Algorithm


Jizeng Wang Lanzhou University of Technology,China wangjz@lut.cn Hongmei Yang Lanzhou University of Technology,China yhmlyz@sohu.com

Abstract
Human face recognition technology is a popular research topic in the biometrics identification area.Face detection is the most important preprocessing module of a face recognition system,and it plays an important role in applications such as video surveillance,human computer interface.The purpose of the face detection is to search and orient faces in images in complex background. In this paper,we propose a hierarchical face detection method by using the template matching algorithm and 2DPCA algorithm.The method includes two different classifiers. The first one is called rough classifier , which filtrates the most of the non-face .The second one is a core classifier, which uses 2DPCA algorithm to detect the face based on the result from the first classifier.The results of the experiment indicates that we implement hierarchical detection to face images not only improves the accurate rate of the face detection, but also shortens detection time greatly. Keywords---face recognition,face detection,template matching,2DPCA

At present, many face detection methods are proposed,sush as skin-based detection method[3], neural networks method[4],support vector machine (SVM)[5] and so on .In this paper,we put forward a hierarchical face detection method by using the template matching algorithm and 2DPCA algorithm which detect frontal face in images.Fristly the method classifies images roughly by means of using the two-eye template and face template[6], and then assorts the rest images by using 2DPCA [7][8]algorithm, at last merges overlapping detection blocks and confirms face regions. This paper is organized as follows: Section 2 we give detailed description to this face detection algorithm.Experimental results and analysis are shown in section 3, and the conclusion of this paper is given in section 4.

2. Face Detection Algorithm


The framework of the algorithm is as follows: the first step is to preprocess the images including normalize,histogram equalization and luminance compensation,which eliminate influence from illumination,noise to some extent. The second step is to search rectangle regions(for short detection windows) that all possible scale and location can appear in the images with the method mentioned in document[9].The last step is to detect every detection window hierarchically. Concrete approach is as Fig.1:

1. Introduction
In recent years,there is an increasing trend of using biometric technique, which refers the human biological features for personal information security and user verification. Face recognition[1] is one of the most acceptable biometrics because images can be acquired in non-intrusive situation.Generally speaking,face recognition consists of three parts:face detection, feature extraction, feature matching[2].The last decade, the most of researchers studied face recognition on the assumption that faces have been detected. Lately,in lots of situation faces need to be detected rapidly.How to detect faces in complex background has been become research stress of the face recognition.

2.1.Images Pre-processing Detection Windows

and

Searching

In order to obtain a good detection effect, it is essential that images pre-processing should be performed to avoid the difference of face expression,pose and illumination transform.

978-0-7695-3119-9/08 $25.00 2008 IEEE DOI 10.1109/CISP.2008.270

575

Non-face samples database Input Image blocks Non-face Pre-processing Non-face 2DPCA Algorithm Merging Face blocks

two-eye template and face template

template matching Searching detection window

Fig.1 Algorithmic frame

First of all,the size of input images are resized into 400*300 pixel, and histogram equalize the images.We search all possible detection windows for processed images via using the method mentioned in document[9].

2.2.Template Matching Algorithm


Rough classifier is made up of two-eye template and face template. As two eyes take up an important position in face feature.We detect a couple of eyes,then enlarge scope nearby based on the eyes. Finally we construct a face template so as to match faces. The construction method is as follows: We choose 30 standard face images and cut out a pair of eyes regions of the above images. We get a 20*10 pixel two-eye template (Fig.2) via calculating average number to many couples of eyes regions. After scope is enlarged nearby based on the eyes template,consequently we construct 20*25 pixel face template (Fig.3).

coefficient of the windows is beyond fixed value T,we think that the detection windows get across template matching rough sort. The detection windows will come into the next detection. Formula of interrelated coefficient is as follows:

r(R, T) =

(R(x, y) R )(T(x, y) T ) (1) w h T R y =0 x =0


h1 w1

where Txy0xw0yhTT; R x y,RR denotes separately a gray matrix , average value and standard deviation of the two-eye template and the detection windows,w and hdenotes separately width and height of the detection windows. Assume a fixed value T, the detection windows can get across two-eye template filter when r (R,T) T, otherwise the detection windows were discarded.Need to point out: to remove the majority of non-face regions,T must be choosen an appropriate value so as to ensure all detection windows concluding face to get across filter.

2.3. 2DPCA Algorithm


Fig.2 two-eye template Fig.3 face template

Detection windows are compared with two-eye template.Most non-face image blocks which interrelated coefficient[10] is less than fixed value T are discarded.However,there still exist some non-face in the detection windows after two-eye template filters.Let the remained detection windows compare with face template again.When interrelated

2DPCA algorithm was put forward by Yany et al in 2004.It is improved arithmetic of the eigenface algorithm[11] which was proposed Turk and Pentland.Though the eigenface algorithm can recognise face well,it must be previously transformed 2D face image matrices into 1D vectors. Fortunately, 2DPCA algorithm solved its inherent deficiency.In other words, the image matrix can be used directly to calculate the covariance matrix and cost less time to

576

determine the eigenvectors which corresponds to eigenvalues of covariance matrix. 2.3.1.The ideas of 2DPCA and optimal projected matrix. Let X denotes an m-dimensional unitary column vector and A denotes an mn image matrix.An ndimensional projected vector Y can be obtained from the following linear transformation: Y=ATX ,Y is also named projected feature vector of A matrix. Considering the face detection namely classify face and non-face.Let 1 2 denote separately face and non-face class.There are ni training samples to every class. A1 A2 AM M=

was named eigenmatrix of A matrix,namely B=AT[X1 , X2, ,Xd]=AT P 2.3.3.Classification Using minimal distance classifer realizes

classification to every image matrix.Let d Bi B = | Bi -B| if d Bi B Where has designated value in advance,then detection windows corresponding to B are taken account of face region. Otherwise, we think the detection windows are nonface region.

n
i =1 T

denote all

2.4. Merging
After two hierarchical detection ,most faces may be detected at multiple nearby positions or scales.The overlapping detected windows should be merged. At last we shall identify all face blocks.

training samples, where Ai is mn matrix.The scatter matrix of samples G is following:

1 G= M
Where A =

( A A)( A A)
i i i =1

(2)

1 M

A
i =1

is whole average matrix of

3. Experiment Results and Analysis


According to face number of input images ,we build two class testing sets:one kind is frontal single face testing sets which include 30 faces from ORL database, 50 normal certificate photos, 20 photos in life;The other kind is frontal multi-face testing sets which 20 images are selected from the Internet randomly, 20 photos in life,10 MIT_CMU images including 983 faces and face number every image ranges from 2 to 20. We adopt respectively 2DPCA algorithm and two hierachical detection method to the above two class testing sets.Testing results was shown in tab1and tab2. The detection rate of the two different method is 92% from tab1.As the most of images non-face were discarded by two hierachical detection,false detection number is obviously less than only 2DPCA algorithm.However,comparing to tab1, the detection rate has decreased in tab2 due to multi-face images.As shown in tab2 the detection rate is 82.60% and false detection number is 212 only by using 2DPCA algorithm, the similar results are 85.96% and 103 by using template marching and 2DPCA algorithm. Obviously,adopting two hierachical method can achieve a high detection rate with less false detection number.

training samples, easily prove G is nonnegative matrix. Defining criterion function JXis as follows: JX= X TG X (3) Calculating maximal value of the expression ,then unitary vector X which corresponds to the maximal value was called optimal projected vector. It is clear that the progection result in the direction of vector X scatter from each other at largest degree. Actually the vector X is namely unitary eigenvector corresponding to maximal eigenvalue of G. Generally speaking,choosing single optimal projected direction isnt enough in complex background for detection images,so we need find a set of optimal projected vector X1 , X2, ,Xd ,which accord with maximal condition of the expression 3. As a rule,d was satisfied the formula:

i i
i =1 i =1

85% [12] The optimal vector set X1 , X2, ,Xd should be the eigenvectors of G corresponding to previous the largest eigenvalues.Let P=[ X1 , X2, ,Xd ] ,then P is called optimal projected matrix. 2.3.2.Extracting Features The extracted features of all matrix images which are to be detected can be calculated as follow: Yk=AT Xk (k=12dlet B = [Y1 , Y2, ,Yd],B

577

Detection method 2DPCA Template matching+2DPCA

Detection number 100 100

Tab.1 Frontal single face detection results Flase detection Correct number Missed number number 92 8 11 92 8 5

Detection rate % 92 92

Detection method 2DPCA Template matching+2DPCA

Detection number 983 983

Tab.2 Frontal many face detection results Flase detection Correct number Missed number number 812 171 212 845 138 103

Detection rate % 8260 8596

Fig.4 Single person images of the face detection orientation

578

Fig.5 Multi-person of the face detection orientation

4. Conclusion
The results of experiment show that the method which combines template matching with 2DPCA algorithm play two important roles in face detection.Firstly, it improves detection rate ,reduces false detection number.Secondly, compared with conventional eigenface algorithm,2DPCA algorithm neednt transform matrix into 1D vector, on the contrary ,it calculates eigenvalues and eigenvectors of the covariance matrix directly,so increases the whole detection speed greatly.
International Conference on System,Man,and Cybernetics: 2006(10): 4343-4347. [5] Hyungkeun Jee,Kyunghee Lee,Sungbum Pan.Eye and Face Detection Using SVM[J].IEEE Intelligent Sensors, Sensor Networks and Information Processing Conference, 2004. (10):577 580 [6] Brunelli R, Poggio T. Face recognition:Features versus templates[J]. IEEE Trans.on Pattern Analysis and Machine Intelligence,1993,15(10):1042~1052. [7] Luhong Liang,Haizhou Ai, Kehong He , MultiTemplate-Matching-Based Single Face Detection[J], Journal of Image and Graphic.Oct,1999.Vol 4(A).No.10 [8] Yang Jian,Zhang David,Yang Jing-yu.Two-dimensional P C A:A n e w a p p r oa ch t o a p p e a r a n ce -b a s e d fa ce representation and recognition[J].IEEE Transactions on Pattern Analysis and Machine Intelligence, 2004, 26(1): 131137. [9] Nan Zhao,Face Detection Based on Adaboost Algorithm[D], 20-25 [10] Yan Fan, Xiaojun Wu.Research on hybrid method of face detection[J]. Journal of East China Shipbuilding Institute(Natural Science Edition).Aug.2005.Vol 19.No.4 [11] Turk M,Pentland A.Eigenfaces for recognition.Journal of Congitive Neuroscience,1991,3(1):71-86. [12] Yanfeng Jin.Face Recognition Method Research Base on Phase Congruency and Modular PCA[D].37-38

5. References
[1] Chellappa R,Wilson C L,Sirohey S.Human and machine recognition of faces: A survey[C]. In:Proc of the IEEE,1995,83 (5):705~740. [2] Wei Wang, Yousheng Zhang, Fan Fang.Survey of human face detection and recognition technology[J]. Journal of He Fei University of Technology. Feb. 2006. Vol.29.No.2 [3] Hongxun Yao,Wen Gao,Face detection and location based on skin chrominance and lip chrominance transformation from color images[J].Pattern recognition: 2001(34)1555-1564. [4] C.C. Tsai,W.C.Cheng, J.S. Taur and C.W. Tao.Face Detection Using Eigenface and Neural Network[J].IEEE

579

You might also like