5
 Face Detection Based on Template Matching and 2DPCA Algorithm Jizeng Wang Hongmei Yang  Lanzhou University of Lanzhou University of Technology,China Technology,China [email protected] [email protected] Abstract  Human face recognit ion technology is a popular research topic in the biometrics identification area.Face detection is the most important pre-  processing 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 classif ier, which uses 2DP CA 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 r ecognition,fac e detection,t emplate matching,2DPCA 1. Introduction In recent years,there is an increasing trend of using  biometric technique, w hich refers the human biologic al 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 st ress of the face recognition. At present, many face detection methods are  proposed,sush as skin-b ased 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 a pproach is as Fig.1: 2.1.Images Pre-processing and Searching Detection Windows 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 illuminatio n transfo rm. 2008 Congress on Image and Signal Processing 978-0-7695-3119-9/08 $25.00 © 2008 IEEE DOI 10.1109/CISP.2 008.270 575 2008 Congress on Image and Signal Processing 978-0-7695-3119-9/08 $25.00 © 2008 IEEE DOI 10.1109/CISP.2 008.270 575

2008 - Face Detection Based on Template Matching and 2DPCA Algorithm

Embed Size (px)

Citation preview

Page 1: 2008 - Face Detection Based on Template Matching and 2DPCA Algorithm

8/13/2019 2008 - Face Detection Based on Template Matching and 2DPCA Algorithm

http://slidepdf.com/reader/full/2008-face-detection-based-on-template-matching-and-2dpca-algorithm 1/5

 Face Detection Based on Template Matching and 2DPCA Algorithm 

Jizeng Wang Hongmei Yang Lanzhou University of Lanzhou University of

Technology,China Technology,[email protected] [email protected]

Abstract

 Human face recognition technology is a popular

research topic in the biometrics identification

area.Face detection is the most important pre- processing 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 differentclassifiers. 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 thatwe 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

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 acquiredin 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 theassumption 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.

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 hierarchicalface 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 detectionalgorithm.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 luminancecompensation,which eliminate influence from

illumination,noise to some extent. The second step is tosearch 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:

2.1.Images Pre-processing and Searching

Detection Windows

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.

2008 Congress on Image and Signal Processing

978-0-7695-3119-9/08 $25.00 © 2008 IEEE

DOI 10.1109/CISP.2008.270

575

2008 Congress on Image and Signal Processing

978-0-7695-3119-9/08 $25.00 © 2008 IEEE

DOI 10.1109/CISP.2008.270

575

Page 2: 2008 - Face Detection Based on Template Matching and 2DPCA Algorithm

8/13/2019 2008 - Face Detection Based on Template Matching and 2DPCA Algorithm

http://slidepdf.com/reader/full/2008-face-detection-based-on-template-matching-and-2dpca-algorithm 2/5

 

Fig.1 Algorithmic frame

First of all,the size of input images are resized into

400*300 pixel, and histogram equalize the images.Wesearch 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 andface template. As two eyes take up an important

 position in face feature.We detect a couple of eyes,thenenlarge 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 a20*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 eyestemplate,consequently we construct 20*25 pixel face

template (Fig.3).

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

Detection windows are compared with two-eyetemplate.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 templatefilters.Let the remained detection windows compare

with face template again.When interrelated

coefficient of the windows is beyond fixed value

T,we think that the detection windows get acrosstemplate matching rough sort. The detection windows

will come into thenext detection. Formula of interrelated coefficient is

as follows:

∑∑−

=

=  ⋅⋅⋅

−−

=

1

0

1

0

)),()(),((),(

h

 y

w

 x  RT 

T  R

hw

 y xT  y x RT  Rr 

σ σ 

 µ  µ   (1)

where T(x,y)(0≤x<w,0≤y<h),µT,σT;  R 

(x,y),µR ,σR   denotes separately a gray matrix ,

average value and standard deviation of the two-eye

template and the detection windows,’w’ and ’h’denotes

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

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 canrecognise 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

Input Image blocks

Pre-processing two-eye template and

face template 

2DPCA 

Algorithm

Merging Face

 blocks

Searching detection window

 Non-face samples

database

 Non-face Non-face

template matching

576576

Page 3: 2008 - Face Detection Based on Template Matching and 2DPCA Algorithm

8/13/2019 2008 - Face Detection Based on Template Matching and 2DPCA Algorithm

http://slidepdf.com/reader/full/2008-face-detection-based-on-template-matching-and-2dpca-algorithm 3/5

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 m×n image matrix.An n-dimensional 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=∑=

2

1i

in ) denote all

training samples, where Ai is m×n matrix.The scatter

matrix of samples G is following:

G ∑=

−−=

 M 

i

ii  A A A A

 M  1

))((1

  (2)

Where ∑=

=

 M 

i

i A M 

 A1

1  is whole average matrix of

training samples, easily prove G is nonnegative matrix.

Defining criterion function J X)is as follows: 

J X)= XTG X (3)

Calculating maximal value of the expression ,thenunitary 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 thevector X is namely unitary eigenvector corresponding

to maximal eigenvalue of  G. Generally speaking,choosing single optimal

 projected direction isn’t 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: ∑∑==

 M 

i

i

ii11

λ λ   > 

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=1,2,…,d),let B =  [Y1 , Y2, … ,Yd],B 

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 windowscorresponding to B  are taken account of face region.

Otherwise, we think the detection windows are non-

face region.

2.4. Merging

After two hierarchical detection ,most faces may bedetected at multiple nearby positions or scales.The

overlapping detected windows should be merged. At

last we shall identify all face blocks.

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 ORLdatabase, 50 normal certificate photos, 20 photos inlife;The other kind is frontal multi-face testing setswhich 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 detectionrate 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 2DPCAalgorithm, 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 detectionnumber.

577577

Page 4: 2008 - Face Detection Based on Template Matching and 2DPCA Algorithm

8/13/2019 2008 - Face Detection Based on Template Matching and 2DPCA Algorithm

http://slidepdf.com/reader/full/2008-face-detection-based-on-template-matching-and-2dpca-algorithm 4/5

 Tab.1 Frontal single face detection results

Detection methodDetectionnumber

Correct number Missed numberFlase detection

number

Detection rate(

%) 

2DPCA 100 92 8 11 92

Templatematching+2DPCA

100 92 8 5 92

Tab.2 Frontal many face detection results

Detection methodDetectionnumber

Correct number Missed numberFlase detection

number

Detection rate(

%) 

2DPCA 983 812 171 212 82.60

Templatematching+2DPCA

983 845 138 103 85.96

Fig.4 Single person images of the face detection orientation

578578

Page 5: 2008 - Face Detection Based on Template Matching and 2DPCA Algorithm

8/13/2019 2008 - Face Detection Based on Template Matching and 2DPCA Algorithm

http://slidepdf.com/reader/full/2008-face-detection-based-on-template-matching-and-2dpca-algorithm 5/5

 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 facedetection.Firstly, it improves detection rate ,reduces

false detection number.Secondly, compared with

conventional eigenface algorithm,2DPCA algorithmneedn’t transform matrix into 1D vector, on the

contrary ,it calculates eigenvalues and eigenvectors of

the covariance matrix directly,so increases the wholedetection speed greatly. 

5. References

[1] Chellappa R,Wilson C L,Sirohey S.Human andmachine recognition of faces: A survey[C]. In:Proc of theIEEE,1995,83 (5):705~740.

[2] Wei Wang, Yousheng Zhang, Fan Fang.Survey of humanface 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 chrominancetransformation from color images[J].Pattern recognition:2001(34)1555-1564.[4] C.C. Tsai,W.C.Cheng, J.S. Taur and C.W. Tao.FaceDetection Using Eigenface and Neural Network[J].IEEE

International Conference on System,Man,and Cybernetics:2006(10): 4343-4347.

[5] Hyungkeun Jee,Kyunghee Lee,Sungbum Pan.Eye andFace 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 versustemplates[J]. IEEE Trans.on Pattern Analysis and MachineIntelligence,1993,15(10):1042~1052.[7] Luhong Liang,Haizhou Ai, Kehong He , Multi-Template-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-dimensionalPCA:A new approach to appearance-based facerepresentation and recognition[J].IEEE Transactionson Pattern Analysis and Machine Intelligence, 2004, 26(1):

131—137.

[9] Nan Zhao,Face Detection Based on AdaboostAlgorithm[D], 20-25[10] Yan Fan, Xiaojun Wu.Research on hybrid method offace detection[J]. Journal of East China ShipbuildingInstitute(Natural Science Edition).Aug.2005.Vol 19.No.4[11] Turk M,Pentland A.Eigenfaces for recognition.Journalof Congitive Neuroscience,1991,3(1):71-86.[12] Yanfeng Jin.Face Recognition Method Research Baseon Phase Congruency and Modular PCA[D].37-38

579579