Face Detection Based on Color Adaptation

Jin Duan a b, Xiaoman Wanga, Chunguang Zhoub, Xiaohua Liub, Zhi Liua aCollege of Electronics & Information Engineering of Changchun University of Science and Technology, China 130022, [email protected] bCollege of Computer Science and Technology, Jilin University, Changchun, China 130012

ABSTRACT

A method for the detection and tracking of human face in color images is described in this paper. A skin in r,g,b chrominance space is used for segmenting skin color regions from non-skin color region. The best-fit rectangle of the skin color region is labeled as a candidate face. But the face skin color is sensitive to the change of the environment illumination. An algorithm is proposed to update the skin color model’s parameters in time so that the model is adapted to different lighting conditions. The confidence measure is presented to evaluate the reliability of skin color model. Experiments demonstrate that the self-adaptive color model is more effective than the fixed model. The color adaptation makes that the color model can be better fit to the more complex application environment.

Keywords: Confidence Measure, Skin Color Segment, Color Adaptation, Face Detection

1. INTRODUCTION

Face recognition is based on face detection and localization. The precision of recognition is influenced by the accuracy of them greatly. Now face detection and recognition has been an independence research field that more and more researcher are engaged by. The paper [2] has put forward a solution for real-time color-image human face detection. The algorithm is composed of skin color segmentation and template matching. The algorithm overcomes the influence of complex background upon face detection and obtains higher accuracy of detection. In particular, the time consumed by this algorithm is much less than the traditional template matching method. To an image of 320*240, it can reach 10 frames per second and is suitable for real-time face detection system. Many factors influence the change of color, such as the color of light source, the color of background, the intensity of illumination, the medium of photograph etc. The different person has different distribution in skin color, though rgb space of human skin color is concentric relatively. When a person is moving, the skin color will be changed following the change of the light. Even under the same lighting conditions, the clothing’s color may influence the skin color. The excursion of makes that the human skin color change to warm color, cold color, -leaning, blue-leaning and so on. Human’s eyes fit the change of color very well, but computers haven’t the ability. The chromatic color model in the paper[2] is fixed and can not be changed. The model may not be effective any longer when environmental illumination is changed. So the color model must be adjusted following the changing of environment. Thus is called color adaptation. The color adaptation makes that the color model can be better fit to the more complex application environment.

2. COLOR SEGMENTATION

Now several color spaces have been utilized to find the manifold of skin colors including normalized RGB, HSV, CIE XYZ, CIE LUV [1] and so on. In this paper, we choose the . Because r+ g+ b= 1, generally r and g spaces are used without b space. Compared with RGB, rgb model doesn’t include luminance information and then can eliminate the illumination influence to the system. Literate [4][5] present the typical rgb color model of human skin color. The distribution of skin color is clustered in a small area of the rg color space[4]. In the chromatic color space, the human face colors have the approximate Gaussian distribution [5]. Figure1 is rg color space of human skin color.

Electronic Imaging and Multimedia Technology IV, edited by Chung-Sheng Li, 619 Minerva M. Yeung, Proc. of SPIE Vol. 5637 (SPIE, Bellingham, WA, 2005) 0277-786X/05/$15 · doi: 10.1117/12.569369

Figure 1 rg space of human skin color.

The method of face detection in literature [2] as follow: The color face image in RGB space is first transformed into human face color models under rgb chrominance which can be used to differentiate skin pixels from non-skin pixels. The color image is then divided into grid units which are arranged as a rectangle, and the ratio of skin pixels to all pixels in the grid unit is computed and the grid unit is regarded as a skin unit the ratio of which is greater than a threshold. The adjoining skin units are concatenated. The resulting area is labeled as a candidate face if its shape is quasi-ellipse or quasi-rectangle complying with proper ratios. Otherwise the resulting area should be disregarded. Finally the gray image of face area is matched with the face template to discern the real face. Figure 2 show the process of color segment. (a)is the original image, (b)is the image after color segment, and (c) is skin grid unit.

Figure2 (a) (b) (c)

3. COLOR ADAPTATION

In the chromatic color space, we suppose that a face color distribution can be represented by a Gaussian model. The component r and component g are one dimension Gaussian function separately in rg space. Gaussian model is = Σ2 µ µ Σ Σ N (m, ) . The mean of component r and component g are r and g , while the covariances are r and g [3]. µ µ Suppose that the mean of r is r(N ) and the mean of g is g( N ) in one candidate face region of the frame N in a µ µ video sequences. r(N ) and g( N ) can be presented as: 1 M −1 M −1 µ = µ = 1 ( ) r(N ) ∑ ri , g ( N ) ∑ gi 1 M i=0 M i=0

Set M is the total number of all pixels in the candidate face region, ri is the value r of pixel i, gi is value g of pixel Σ Σ g, and the covariances are r(N ) , g (N ) separately. Then the mean of r and g in the frame j in the front of frame N is :

620 Proc. of SPIE Vol. 5637 M −1 M −1 µ = 1 µ = 1 r(N − j ) ∑ ri(N − j) , r(N − j) ∑ gi(N − j ) (2) M i=0 M i=0 Σ Σ Also the covariances are r(N − j ) , g( N − j) separately. The color model of the current frame is decided by the parameters of the previous k frame. It is called as a sliding window with the width k. That is to say that the color model of the frame N+1 can be estimated by the frame N+1-k, N+1-k+1, N+1-k+2, …. , N-2, N-1 and frame N. Then µ and Σ are denoted as: N N µ = α µ , µ = α µ r(N +1) ∑ ri r(i) g (N +1) ∑ gi g (i) (3) i= N +1−k i=N +1−k N N Σ = β Σ , Σ = β Σ r(N +1) ∑ ri r(i) g( N +1) ∑ gi g (i) (4) i= N +1−k i=N +1−k α β i and i are weight in the formulae. They reflect the degree of the influence that the past parameters have to the current parameters. According as the past color model of front k frame, the current color model is adjusted and modified. Obviously, the weight of the frame that is near the current frame is more important than the distant frame. The wider the width of the sliding window is, the more expensive the compute cost is, and the longer the compute time is.

4. CONFIDENCE MEASURE

The confidence measure that is used in speech recognition usually is proposed to evaluate the reliability of color model in this paper. Set the mean of the candidate face region of the current frame are xr and x g . Compute the distance d from the testing sample to color space: − µ x − µ xg g d = r r , d = (5) r σ g σ r g = 2 + 2 d d r d g (6) The confidence measure C is defined: 1− d C = k × (7) 1+ d In this formula 0 ≤ C ≤ 1, k is an adjustable parameter. The validity of the candidate face region is decided by the formula(8).  not valid if C < τ Face Region is (8)  valid if C ≥ τ The color model is valid when C is greater than or equal to a threshold τ . Otherwise the color model is not reliable. It is possible that the candidate face region can be detected, so k is decided by function(9). k face region does not exist k =  N (9) k E face region exists ≤ ≤ In general, kE =1, and 0 k N 1. The confidence measure of the color model will drop down quickly when the candidate face region does not exist.

5. EXPERIMENT

It is supposed that one and only one face exists in an image in our experiment. In order to predigest the question, the covariances are ignored while the means are reserved. The mean r and g are used to denote the distribution of the skin

Proc. of SPIE Vol. 5637 621 color. The color model of the next frame is forecasted by the parameters of the current frame and the previous several frame. The color model of the next frame will be equal to the current frame if the confidence measure of the current frame is less than the threshold τ . A video sequences that is photographed by ourselves is used in our experiment. The video records a walking person who steps from the environment of normal illumination, to darkness illumination, then normal illumination, finally blue- leaning illumination. In initialization phases, the face region is labeled manually to gain the means and covariances. Set = kE =1, k N 1. We did the experiment on three different conditions: (1) Experiment 1: Fixed model is used as the paper [2]. (2) Experiment 2: Self-adaptive model A is used. The color model of the current frame is forecasted by the front 1, 2, 3, 4, 5 frame, and α are 0.30, 0.25, 0.20, 0.15, 0.10 separately. (3) Experiment 3: Self-adaptive model B is used. The color model of the current frame is forecasted by the front 1, 2, 4, 7, 10 frame, and α of all frame are 0.20.

The top of figure 3 is the curve of the confidence measure in Experiment 1. The bottom of figure 3 is the curve of the confidence measure in Experiment 2.

Figure 3 The curve of the confidence measure

Table 3 is the experiment result of self-adaptive color model. The numerical value of each unit in the table is the ratio of the frame number that C is greater than τ to total frame number. To compare Experiment 1 with Experiment 2 and Experiment 3, the self-adaptive color model is more effective than the fixed model. Finally, several questions must be pay attention: (1)The video sequence that is used in our experiment is not typical and universal, so the self-adaptive color model may not be effective any longer when environmental is changed.

622 Proc. of SPIE Vol. 5637 (2)The parameters of θ1, θ2 ,τ are adjusted factors. The parameters is selected by experience in our experiment, so the self-adaptive color model may not be avail in some condition. In the future we will research further on the color adaptation.

Table 1 the experiment of self-adaptive color model τ =0.4 τ =0.6 τ =0.7 τ =0.8 Fixed Model 43.6% 34.8% 29.0% 23.1% Adaptive Model A 72.6% 64.3% 61.1% 43.5% Adaptive Model B 79.3% 68.4% 59.3% 47.2%

REFERENCES

[1] M.H. Yang, D.J. Kriegman, N. Ahuja. Detecting Faces in Images: A Survey. IEEE Transactions on Pattern Analysis and Machine Intelligence. Vol.24, No.1: 34-58, 2002.1 [2] Duan Jin, Liu Miao, Liu Xiaohua, Zhang Libiao, Zhou Chunguang. Color Image Face Detection: An Algorithm. 5th International Symposium on Test and Measurement, Vol.3, 2003.10 [3] Jie Yang, Alex Waibel Tracking Human Faces in Real-Time. Technology Report CMU-CS-95-210, 1995.11 [4] Stephen McKenna and Shaogang Gong. Tracking Faces. Proceedings of the Second International Confrerence on Automatic Face and Gesture Recogonition, 1996.10 [5] M. Soriano, B. Martinkauppi, S. Huovinen, M. Laksonen. Using the Skin Locus to Cope with Changing Illumination Conditions in Color-based Face Tracking. Machine Vision and Media Processing, 2000

Proc. of SPIE Vol. 5637 623