Face Detection Based on Color Adaptation [5637-127]
Total Page:16
File Type:pdf, Size:1020Kb
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 color model 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 color space makes that the human skin color change to warm color, cold color, red-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 rgb color model. 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 τ .