You are on page 1of 22

ADAPTIVE SKIN-COLOR FILTER

Abstract In this paper, we propose a new method, called adaptive skin color filter, for detecting skin color regions in a color image. The use of skin color provides an efficient way to find candidate regions for faces or hands in color images. However, it is not easy to find skin color regions because the color of skin regions varies from image to image due to a variety of reasons. Since most of the previous methods adopt a fixed threshold scheme, they are useful only in the restricted (i.e., controlled) environment. However, our method is applicable to images in more general situations since it is capable of adaptively adjusting its threshold values and effectively separating skin color regions from similar background color regions. Our method consists of basically two stages. In the first stage, a thresholding box in HSV color space is updated adaptively using a color histogram under the assumption that the area of skin color regions is comparable to that of similar background color ones. In the second stage, color vectors inside the thresholding box are classified into two groups: skin color vectors and background color vectors. Our method and other conventional methods were tested with 379 images obtained from the Internet. Experimental results show that our method is robust to the variations of skin regions' color compared to the conventional methods. Tm tt Trong bi bo ny, chng ti xut mt phng php mi, c gi l adaptive skin-color filter, pht hin vng mu da trong mt nh mu. Vic s dng mu da cung cp mt cch hiu qu tm vng khun mt hoc tay trong hnh nh mu.

Tuy nhin, khng d dng tm thy vng mu da v mu sc ca vng da thay i t nh ny qua nh khc, do nhiu nguyn nhn khc nhau. V hu ht cc phng php trc y thng qua mt biu ngng c nh, n ch c ch trong hon cnh hn ch (v d, kim sot). Tuy nhin, phng php ca chng ti c p dng cho hnh nh trong cc tnh hung chung hn v n c kh nng thch nghi iu chnh gi tr ngng ca n v tch vng mu da t cc vng mu nn tng t 1 cch c hiu qu. Phng php ca chng ti v c bn bao gm hai giai on. Trong giai on u tin, mt hp ngng trong khng gian mu HSV c cp nht thch nghi s dng mt biu mu theo gi nh rng khu vc ca vng mu da l tng ng vi nhng mu nn tng t. Trong giai on th hai, vector mu sc bn trong hp ngng c phn thnh hai nhm: vector mu da v vect mu nn. Phng php ca chng ti v cc phng php thng thng khc c th nghim vi 379 hnh nh thu c t Internet. Kt qu thc nghim cho thy phng php ca chng ti th ti u hn so vi cc phng php khc. I. INTRODUCTION Mt trong nhng ti nghin cu trong phn tch nh mu l tm cc vng mu c th trong mt nh mu cho trc. Mt k thut nh vy l rt hu ch, v d, tm mt khun mt trong mt bc nh con ngi, lane- marker trong mt bc nh con ng, mt t trong mt hnh nh tr chi bng , vv. Trong bi bo ny, chng ti tp trung vo vic pht trin mt phng php cho vic tm kim vng mu da v tnh hu dng ca n ngy cng tng trong vic pht hin v theo di khun mt hoc tay trong nh mu. Vic s dng mu sc tm cc i tng mc tiu trong nh mu c chng minh l thit thc cho cc bin th ca cc i tng trong quy m hoc nh hng, mt phn b che bi cc i tng khc, vv Ni chung, tuy nhin, cng vic trch xut cc vng ca mu xc ring bit t mt nh mu cho trc l khng h d dng, v mu ca mt i tng khc nhau vi nhng thay i trong mu sc rc r, chiu sng hnh hc (v d, gc ti), gc nhn hnh hc (v d, gc phn
2

One of the research topics in color image analysis is to find regions of specific color in a given color image. Such a technique is very useful, for example, to find a face in a human image, lane-markers in a road image, the ground in a soccer game image, etc. In this paper, we focus on developing a method for finding skin color regions because of its increasing usefulness in detecting and tracking faces or hands in color images. The use of color to find target objects in color images has proven to be robust to the variations of objects in scale or orientation, partial occlusion by other objects, etc. In general, however, it is not an easy task to extract regions of specific color from a given color image, since the color of an object varies with changes in illuminant color, illumination geometry (i.e., angle of incidence), viewing geometry (i.e., angle of reflectance), and miscellaneous sensor parameters. The method of extracting specific color regions using fixed threshold values in color

space often fails except for simple cases. Therefore, an x), v cc thng s cm bin khc. Phng php chit xut algorithm which copes with the variations of a target object's cc khu vc mu sc c th s dng cc gi tr ngng c color must be developed. nh trong khng gian mu thng tht bi ngoi tr trng hp n gin. Do , mt thut ton m i ph vi cc bin th ca mu sc mt i tng mc tiu phi c pht trin. There are several published papers related to this problem. Buluswar and Draper [1] proposed a method where a multivariate decision tree (MDT) is used to determine whether the color of each pixel matches with the specified color or not, but this method requires the timeconsuming processes of gathering samples and training the MDT. Sobottka and Pitas [2] transformed color vectors in RGB space into ones in HSV space and used only the hue and saturation components of them to find candidate face regions. However, their method lacks adaptation capability since the upper and lower threshold values for each component are fixed. The method of Fleck et al. [3], which is similar to that of Sobottka and Pitas, also has the same limitation. Yang and Waibel [4] showed that skin color distributions of different people under different lighting conditions have similar Gaussian distributions in normalized RG space. They estimated the parameters of a Gaussian distribution of normal skin color from sample face images and classified each pixel of a test image using the estimated distribution. But they did not consider the variation of the skin color distribution in the test image. Recently, Yang et al. [5] and McKenna et al. [6] proposed adaptive color distribution models for robust object tracking. Unfortunately, their methods are valid only when dealing with image sequences, and not applicable to the case of static images.
3

C mt s bi bo public lin quan n vn ny. Buluswar v Draper [ 1 ] xut mt phng php m mt cy quyt nh a bin ( MDT ) c s dng xc nh xem mu sc ca mi pixel c khp vi mu sc c nh r hay khng, nhng phng php ny i hi phi c cc qu trnh tn nhiu thi gian thu thp mu v hun luyn MDT . Sobottka v Pitas [ 2 ] chuyn i vector mu trong khng gian RGB vo vector khc trong khng gian HSV v ch s dng cc mu sc v cc thnh phn bo ha chng tm vng mt . Tuy nhin , phng php ca h thiu kh nng thch ng v trn cc gi tr ngng trn v di cho mi thnh phn c c nh . Phng php Fleck et al. [ 3 ] tng t nh ca Sobottka v Pitas , cng c nhng hn ch tng t . Yang v Waibel [ 4 ] cho thy s phn b mu da ca nhng ngi khc nhau trong iu kin nh sng khc nhau c phn phi Gaussian tng t trong khng gian RG bnh thng . H c tnh cc thng s ca mt phn phi Gaussian ca mu da bnh thng t nhng hnh nh khun mt mu v phn loi mi im nh ca nh mu da trn s phn phi c tnh. Nhng h khng xem xt s bin i ca s phn b mu da trong hnh nh th nghim . Gn y, Yang [ 5 ] v McKenna [ 6 ] xut m hnh phn phi mu khng c nh tm ra vt ca cc i tng tt hn. Tht khng may, phng php ca h ch c gi tr khi x l vi cc chui hnh nh , v khng p dng cho trng

In this paper, we propose a new skin color filter that is capable of adaptively adjusting its threshold values and effectively separating skin color regions from seemingly similar, but different color regions. A brief description on our method is given as follows. We first choose rough upper and lower threshold values for each color component (hue, saturation, and value) by observing the skin color distributions of several sample images. These threshold values define a 3D box, called the thresholding box, in HSV color space. The color vectors inside the thresholding box play the role of standard color vectors representing normal skin color. When a new image is tested, in order to get robustness against illumination changes, the threshold values of the S and V components are updated adaptively (whereas those of the H component are fixed because we assume that the user-defined threshold values for hue constitute absolute boundaries of a skin color region in color space) based on a color histogram built in SV space. Then, a new thresholding box is formed with the updated threshold values. The assumption behind this adaptation procedure is that the area of skin color regions is comparable to (or larger than) that of the background regions whose color is similar to skin color. In other words, we assume that skin color vectors constitute a dominant cluster in HSV space within the range predefined by the upper and lower thresholds of a hue component. This assumption is valid in most applications. The adjustment of threshold values is, in fact, to search for the dominant cluster. In most cases, color vectors of the pixels belonging to skin
4

hp ca nh tnh. Trong bi bo ny , chng ti xut mt b lc mu da mi c kh nng thch nghi iu chnh gi tr ngng ca n v tch vng mu da t cc vng mu sc dng nh tng t, nhng khc nhau mt cch hiu qu . M t ngn gn v phng php ca chng ti c a ra nh sau . Trc tin chng ta chn gi tr ngng trn v di th cho mi thnh phn mu (mu sc , bo ha , v gi tr cng sng) bng cch quan st s phn b mu da ca mt s hnh nh mu . Cc gi tr ngng xc nh mt hp 3D , c gi l hp ngng , trong khng gian mu HSV . Cc vector mu sc bn trong hp ngng ng vai tr ca vector mu chun i din cho mu da bnh thng . Khi mt hnh nh mi c th nghim, chng li s thay i nh sng tt hn, cc gi tr ngng ca S v V c cp nht cho ph hp (H c c nh bi v chng ti gi nh rng ngi dng xc nh gi tr ngng cho mu sc to thnh ranh gii tuyt i ca mt vng mu da trong khng gian mu ) da trn mt biu mu sc c xy dng trong khng gian SV . Sau , mt hp ngng mi c hnh thnh vi cc gi tr ngng va c thay i . Gi nh ng sau th tc thch ng ny l din tch vng mu da c th so snh c vi ( hoc ln hn ) ca cc khu vc nn c mu sc tng t nh mu da . Ni cch khc, chng ti gi nh rng cc vector mu da to thnh mt cm chi phi trong khng gian HSV trong phm vi xc nh trc bi cc ngng trn v di ca thnh phn mu sc. Gi nh ny ng trong hu ht cc trng hp . Vic iu chnh gi tr ngng , trong thc t, tm kim cc cm chi phi. Trong hu ht cc trng hp, cc vector mu ca cc im

color regions are likely to be included in the new thresholding box. But this box is not enough to separate skin color regions from background regions of slightly different colors. We will use the term background colors to indicate similar but different colors which need to be distinguished from the true skin color. The background color vectors tend to coexist with the skin color vectors in the thresholding box. Cluster analysis is performed to determine if dominant background color vectors exist in the box. If they do exist, they are separated from the skin color vectors by a linear classifier. The linear classifier divides the thresholding box into two parts (i.e., classes) with a plane. Finally, the vectors that belong to the class whose mean vector is closer to the mean of the skin color vectors obtained in advance from a variety of sample images are chosen as skin color vectors. This paper is organized as follows. In Section 2, a description of how to adaptively update the threshold values for each color component is given. Separating skin color vectors from background color vectors is considered in Section 3. In Section 4, experimental results are shown. Conclusions are given in Section 5.

nh thuc vng mu da c kh nng c cha trong hp ngng mi . Nhng hp ny l khng tch vng mu da t cc vng nn ca mu sc yu . Chng ti s s dng cc iu kin mu nn ch ra mu sc tng t nhng khc nhau m cn phi c phn bit vi mu da tht. Cc vector mu nn c xu hng cng tn ti vi cc vector mu da trong hp ngng . Cm phn tch c thc hin xc nh xem dominant background color vectors liu c tn ti trong hp. Nu chng vn tn ti , chng c tch ra t cc vector mu da ca mt b phn loi tuyn tnh . B phn loi tuyn tnh chia hp ngng thnh hai phn vi mt mt phng . Cui cng, cc vector thuc lp m c mean vector l gn vi gi tr trung bnh ca cc vect mu da thu c trc t mt lot cc hnh nh mu c la chn nh l vect mu da . Bi vit ny c t chc nh sau . Trong phn 2, mt m t lm th no cp nht cc gi tr ngng cho mi thnh phn mu c a ra. Tch vector mu da t vector mu nn c xem xt trong phn 3 . Kt qu thc nghim c trnh by trong phn 4. Kt lun c a ra trong phn 5 .

II. DETERMINE THRESHOLD VALUES FOR EACH COLOR COMPONENT 1. Setting initial threshold values In general, the color of each pixel in a color digital image is represented in terms of a combination of R, G, and B values. But treating color quantities in RGB space is not preferred because R, G, and B values are coupled together so that varying illumination affects all the R, G, and B values of
5

Nhn chung, mu sc ca mi im nh trong mt bc nh mu k thut s c kt hp bi R, G, B. Nhng x l mu sc trong khng gian RGB l khng thch hp v cc gi tr R, G, B c trn ln. Trong bi bo ny, tt c cc cng vic ca chng ti c thc hin trong khng gian mu

pixels. In this paper, all of our work is carried out in HSV (hue, saturation, and value) space instead of in RGB space [7,8]. The HSV representation of color is known to be more compatible with human perception. In other words, the role of each component in HSV space is more understandable by human beings. Therefore, color analysis can be performed more easily in HSV space. Initially, upper and lower threshold values for each color component are chosen manually by observing the skin color distributions of several distinctive sample images that were obtained under various illumination conditions. These threshold values define a 3D box, called the thresholding box, in HSV space. The color vectors inside the thresholding box play the role of standard color vectors representing normal skin color. Note that this box should be large enough to cover most skin color vectors appearing in the sample images. Initial threshold values used in this paper are shown in Table 1, where we shifted hue values by 0.5 (i.e., 1803) to make the center of the hue axis indicate pure red. Because most of the sample images used in our experiments were photographs of yellow people, the threshold values of Table 1 were chosen to reflect the characteristic of skin color of yellow people. If, for example, we need to find skin regions of white people, the threshold values should be adjusted to cover the range of skin color of white people

HSV (hue, saturation, and value) thay v trong khng gian RGB [7,8]. S th hin mu sc ca khng gian mu HSV c bit n l ph hp hn vi cm nhn ca con ngi. Ni cch khc, con ngi c th d dng hiu c vai tr ca mi thnh phn trong khng gian HSV. Do , phn tch mu sc c th c thc hin d dng hn trong khng gian HSV. Ban u, gi tr ngng trn v di cho mi thnh phn mu sc c la chn bng tay bng cch quan st s phn b mu da ca mt s hnh nh mu c bit m thu c trong nhng iu kin nh sng khc nhau. Cc gi tr ngng xc nh mt hp 3D, c gi l hp ngng.. Cc vector mu sc bn trong hp ngng ng vai tr ca vector mu tiu chun i din cho mu da bnh thng. Lu rng hp ny l ln cha tt c cc vector mu da xut hin trong cc hnh nh mu. Gi tr ngng ban u c s dng trong nghin cu ny c trnh by trong bng 1, chng ti chuyn cc gi tr mu sc 0,5 (tc l 1803) lm cho cc trung tm ca trc mu sc cho mu tinh khit. Bi v hu ht cc hnh nh mu c s dng trong th nghim ca chng ti l hnh nh ca nhng ngi da vng, gi tr ngng ca Bng 1 c chn phn nh c tnh ca mu da ngi mu vng. Nu, v d, chng ta cn phi tm vng da ca ngi da trng, cc gi tr ngng nn c iu chnh bao gm mt lot cc mu da ca ngi da trng

2. Updating the threshold values Since the threshold values in Table 1 have been roughly selected from several sample images, we cannot be assured that they are well suited for most images containing skin color. Therefore, they need to be adjusted to fit into the new image to be tested. In our method, however, thresholds for hue are fixed to the values in Table 1, because we assume that these threshold values constitute absolute boundaries for skin color. That is to say, color vectors whose hue values are outside the range bounded by the threshold values are not considered to represent the skin color we want tofind. This assumption is necessary because there is no clear definition of skin color. A user needs to define an absolute range of skin color in color space. In our method, restrictions are imposed only on the hue values of skin color vectors. The threshold values for S and V components are updated iteratively based on a color histogram built in SV space. A detailed procedure for the update of the threshold values is given as follows: 1. Construct a color histogram in SV space with color vectors whose hue values are within the range bounded by
7

V gi tr ngng trong Bng 1 c la chn 1 cch c chng t mt s hnh nh mu , chng ti khng th chc chn rng s liu trn ph hp cho hu ht cc hnh nh c cha mu da . V vy, chng cn phi c iu chnh ph hp vi hnh nh mi trong mi ln th nghim . Trong phng php ca chng ti , tuy nhin , ngng cho mu sc u c c nh vi cc gi tr trong Bng 1 , bi v chng ti gi nh rng nhng gi tr ngng to thnh ranh gii tuyt i cho mu da. Theo , vector mu sc c gi tr mu nm ngoi phm vi gii hn bi cc gi tr ngng khng c coi l i din cho mu da chng ta mun tm. Gi nh ny l cn thit v khng c nh ngha r rng v mu da . Mt ngi s dng cn phi xc nh mt phm vi tuyt i ca mu da trong khng gian mu . Trong phng php ca chng ti , hn ch c p t ch trn cc gi tr mu sc ca vector mu da . Cc gi tr ngng cho S v V c cp nht lp i lp li da trn mt biu mu sc c xy dng trong khng gian SV . Mt quy trnh chi tit cho vic cp nht cc gi tr ngng c a ra nh sau: 1 . Xy dng mt biu mu sc trong khng gian SV vi

the threshold values in Table 1. In our experiments, the histogram was made on 100x100 cells. 2. Construct a thresholding rectangle defined by the upper and lower threshold values of the saturation and value components in Table 1. 3. Let m denote a maximum value of the histogram inside the thresholding rectangle. Calculate the center of gravity of the histogram inside the rectangle for the cells whose values are greater than 0.1m. 4. Move the thresholding rectangle so that its center is placed on the center of gravity calculated in Step 3. The size of the rectangle does not change. 5. Repeat Steps 3 and 4 until the distance between the previous and current thresholding rectangles is less than some threshold value. 6. Final threshold values are determined by the four sides of the new thresholding rectangle that surrounds the region of the histogram whose cell values are greater than 0.1m. Therefore, the new thresholding rectangle becomes smaller (i.e., tighter) than the initial one. The new thresholding rectangle together with the fixed threshold values for hue constitutes a new thresholding box in HSV space

vector mu c mu sc gi tr nm trong phm vi gii hn bi cc gi tr ngng trong Bng 1 . Trong cc th nghim ca chng ti , cc biu c kch thc 100 x100 .. 2 . Xy dng mt thresholding rectangle c xc nh bi cc gi tr ngng trn v di ca S v V 3 . m biu th gi tr ln nht ca biu bn thresholding rectangle. Tnh ton trng tm ca biu bn trong hnh ch nht cho cc c gi tr ln hn 0.1m . 4 . Di chuyn thresholding rectangle trung tm ca n c t vo trng tm tnh trong Bc 3 . Kch thc ca hnh ch nht khng thay i . 5 . Lp li cc bc 3 v 4 cho n khi khong cch gia cc thresholding rectangle trc v hin ti l thp hn so vi gi tr ngng. 6 . Gi tr ngng cui cng c xc nh bi bn cnh ca thresholding rectangle mi bao quanh cc khu vc ca biu c gi tr ca ln hn 0.1m . Do , thresholding rectangle mi tr nn nh hn (v d , cht ch hn ) so vi ban u . The new thresholding rectangle cng vi cc gi tr ngng c nh cho mu sc to nn mt hp ngng mi trong khng gian HSV.

Fig. 1. Adaptation of threshold values: (a) input image; (b) skin color regions extracted using the initial threshold values in Table 1; (c) adjustment of threshold values; (d) skin color regions extracted using the updated threshold values.
9

One of the results obtained with the above method is shown in Fig. 1. An input image is given in Fig. 1(a) and its skin color regions extracted using the initial thresholds in Table 1 are shown in Fig. 1(b). Since the brightness of the face region in Fig. 1(a) is lower than that of the normal skin color, only small portions of the region were detected. Fig. 1(c) shows the thresholds update result and Fig. 1(d) shows the new skin color regions extracted with the updated threshold values. According to our experiments, Steps 3 and 4 of the above procedure were repeated almost once on average for the test images used. One can see that the face region has been found almost correctly. It should be noted that what the above method really does is to look for the dominant color of an input image that is in the range of hue given in Table 1. By dominant color, we mean that the region of that color is larger than those of other colors. In the case of Fig. 1(a), the color of the face is dominant because the face region occupies most of the image's area. If an image is given whose background color is much more dominant than the color of the true skin regions and the difference between the two colors is relatively large, our method will fail.

Mt trong nhng kt qu thu c bng phng php trn c th hin trong Fig. 1 . Mt hnh nh u vo c a ra trong Fig. 1(a) v khu vc mu da ca n chit xut bng cch s dng cc ngng ban u trong Bng 1 c hin th trong Fig. 1(b). V sng ca vng mt trong Fig. 1(a) l thp hn so vi mu da bnh thng , ch c mt phn nh ca khu vc c pht hin . V . Fig. 1(c) cho thy kt qu ca vic cp nht cc gi tr ngng v Fig. 1(d) cho thy vng mu da mi chit xut vi cc gi tr ngng c cp nht . Theo th nghim ca chng ti , bc 3 v 4 ca quy trnh trn trung bnh c lp i lp li gn nh mt ln cho nhng hnh nh th nghim c s dng. C th thy rng cc khu vc mt c tm thy gn nh chnh xc. Cn lu rng nhng g cc phng php trn lm thc s l tm cc mu sc ch o ca hnh nh u vo, v chng thuc trong phm vi ca thnh pn H c a ra trong Bng 1. Chng ti mun khu vc mu sc ch o th ln hn so vi cc mu sc khc . Trong trng hp ca hnh Fig. 1(a), mu sc ca khun mt l chi phi bi v vng mt chim phn ln din tch ca nh . Nu mt hnh nh c a ra c mu nn l nhiu hn chim u th hn so vi mu sc ca vng ng l mu da tht v s khc bit gia hai mu sc l tng i ln , phng php ca chng ti s tht bi. 3. Seperating skin color vectors from background color vectors Nu mt hnh nh u vo c cha mt nn c mu sc tng t nh (nhng phn bit) mu sc ca mt vng da tht (v d, mt hnh nh ca mt ngi mc qun o da mu nh Fig. 2 (a)), phng php trong mc 2.2 s mang li mt kt qu m cp nht hp ngng cha c vector mu nn v vect mu da. Nu kch thc ca mt khu vc
10

If an input image contains a background whose color is similar to (but distinguishable from) the color of a true skin region (e.g., a picture of a person wearing skin colored clothes like Fig. 2(a)), the method in Section 2.2 will yield a result where

the updated thresholding box contains both the background color and skin color vectors. If the size of a background color region is comparable to that of a skin color region, two dominant clusters of color vectors will be formed in color space. In such a case, the background color vectors cannot be simply ignored and need to be separated from the skin color vectors

mu nn l tng ng vi mt khu vc mu da, hai cm chi phi ca vect mu s c hnh thnh trong khng gian mu. Trong trng hp ny, cc vect mu nn khng th ch n gin l b qua v cn phi c tch ra t cc vector mu da

Fig. 2. Separation of skin color vectors from background color vectors: (a) input image; (b) skin color regions extracted using the updated threshold values; (c) 3D histogram of the pixels belonging to the regions of (b); (d) separating plane; (e) resulting skin color regions found; (f) background color regions
11

3.1. Cluster analysis To find out if there exist two dominant groups of color vectors in the thresholding box, cluster analysis is carried out as follows: 1. Construct a color histogram in HSV space with the color vectors belonging to the thresholding box. In our experiments, the histogram was made on 100x100x100 cells. 2. Perform 3D CRE (connected region extraction) for the cells whose values are greater than T1(T1 is usually small). Then, each connected region is assigned a unique label, and subsequently the cells and color vectors belonging to the same region have the same label as that of the region. 3. End this procedure if there exists only one label (i.e., all the cells are connected). In this case, the procedures in Sections 3.2 and 3.3 are skipped, and all the color vectors in the thresholding box are considered to represent skin color. 4. Calculate for each pair of connected regions a distance between their centers if there exist more than two labels. 5. Merge differently labeled regions until only two labels remain. Closer regions are merged first. 6. Count the labels for the cells whose values are greater than Tu (Tu >>Tl ). If there is only one label, the procedures in Sections 3.2 and 3.3 are skipped. In this case, no dominant background color is supposed to exist 3.2. Computing a seperating-plane

tm hiu xem c tn ti hai nhm chi phi ca vect mu trong hp ngng, phn tch cm c thc hin nh sau : 1 . Xy dng mt biu mu sc trong khng gian HSV vi cc vector mu thuc hp ngng . Trong cc th nghim ca chng ti , cc biu c kch thc 100x100x100 2 . Thc hin 3D CRE (connected region extraction) cho cc c gi tr ln hn T1 ( T1 thng l nh ). Sau , tng khu vc kt ni c gn mt nhn duy nht, v sau cc v vect mu thuc cng khu vc c nhn ging nh nhn ca khu vc . 3 . Kt thc quy trnh ny nu c ch c mt nhn (v d , tt c cc c kt ni ) . Trong trng hp ny, cc quy trnh trong mc 3.2 v 3.3 c b qua , v tt c cc vect mu trong hp ngng c coi l i din cho mu da . 4 . Tnh ton cho mi cp ca khu vc kt ni vi mt khong cch gia cc trung tm ca chng nu c tn ti hn hai nhn . 5 . Kt hp khc nhau cc khu vc dn nhn cho n khi ch cn hai nhn. Khu vc gn c sp nhp u tin. 6 . m cc nhn cho cc c gi tr ln hn Tu ( Tu >> Tl ). Nu ch c mt nhn, cc quy trnh trong mc 3.2 v 3.3 c b qua. Trong trng hp ny, khng c mu nn ch o c cho l tn ti.

12

Let us suppose that by the cluster analysis in Section 3.1, it has been revealed that two dominant clusters of color vectors exist in the thresholding box. This means that the color vectors in the thresholding box can be classified into two classes. Note that the color vectors belonging to the cells whose values are greater than Tl have already been classified owing to the procedure in Section 3.1. What we have to do now is to classify other color vectors that are still undetermined. We use a linear classifier for this classification. It divides the thresholding box into two parts (each part corresponding to a different class) with a separating plane in HSV space. Therefore, training the linear classifier is equal to computing a separating plane. The linear classifier is trained with the color vectors labeled in Section 3.1 and the training can be done easily by the perceptron learning method introduced in Ref [9]. The perceptron learning is to find appropriate weights of a linear classifier, given training samples, by minimizing some energy function with the gradient-descent optimization technique. An example for a real image is shown in Fig. 2. An input image and its skin color regions extracted with the updated threshold values are shown in Figs. 2(a) and (b), respectively. Note that since the color of the woman's clothes is similar to the normal skin color, some parts of the clothes were detected as well as the face region. A 3D histogram constructed with the color vectors belonging to the updated thresholding box is shown in Fig. 2(c). In this figure, only cells whose values are above Tl are displayed as black cubes. One can see two distinct

Chng ta hy gi s rng cc phn tch cm trong phn 3.1, n c cho thy rng hai cm chi phi ca vect mu sc tn ti trong hp ngng . iu ny c ngha rng cc vector mu trong hp ngng c th c phn thnh hai lp. Lu rng cc vector mu thuc cc c gi tr ln hn Tl c phn loi do cc quy trnh trong mc 3.1 . Nhng g chng ta phi lm by gi l phn loi cc vector mu khc m vn cn cha xc nh. Chng ti s dng mt b phn loi tuyn tnh cho loi ny . N chia hp ngng thnh hai phn ( mi phn tng ng vi mt lp khc nhau ) vi mt mt phng trong khng gian HSV . V vy , hun luyn 1 b phn loi tuyn tnh bng vi tnh ton mt mt phng phn tch . Phn loi tuyn tnh c hun luyn vi cc vector mu c dn nhn ti mc 3.1 v c th c thc hin d dng bng cc phng php perceptron learning gii thiu trong Ti liu tham kho [ 9 ] . Cc perceptron learning tm trng s thch hp ca mt b phn loi tuyn tnh , cc mu hun luyn cho trc, bng cch gim thiu mt s chc nng nng lng vi cc k thut ti u ha gradient (gradient descent - tin dn ti cc tiu a phng (k thut xung dc) . Mt v d cho mt hnh nh thc s c th hin trong Fig. 2. Mt hnh nh u vo v khu vc mu da ca n c chit xut bng cc gi tr ngng cp nht c hin th trong Fig. 2 (a) v (b) , tng ng . Lu rng v mu sc ca qun o ca ngi ph n cng tng t nh mu da bnh thng , mt s b phn ca qun o c pht hin cng nh khu vc vng da mt. Mt biu 3D c xy dng bng cc vector mu thuc hp ngng c cp nht c th hin trong Fig. 2 (c) . Trong s liu ny, ch c cc c gi tr l trn Tl c hin th nh hnh khi mu
13

clusters in the histogram. These clusters are divided by a separating plane as shown in Fig. 2(d). Fig. 2(e) or (f ) shows the regions of the image corresponding to one of the two sides of the separating plane. As can be seen in Fig. 2(e), the face region has been extracted more accurately. Note that actually we do not know yet which side of the plane corresponds to the skin color class. It will be decided in the next section.

en . Ta c th nhn thy hai cm ring bit trong biu . Cc cm c chia bng mt mt phng phn tch nh Fig. 2 (d) . Fig. 2 (e) hoc 2(f ) cho thy cc khu vc ca hnh nh tng ng vi mt trong hai bn ca mt phng . Nh c th thy trong Fig. 2 (e) , vng mt c chit xut mt cch chnh xc hn . Lu rng thc s cha bit mt bn no camt phng tng ng vi cc lp mu da . N s c quyt nh trong phn tip theo.

14

3.3.

Selecting the part coresponding to the kind color class Nh cp trong cc tiu mc trc, mt phng phntch hp ngng thnh hai phn, nhng n khng c quyt nh phn no tng ng vi cc lp mu da . lm iu ny , chng ta c th s dng mt thuc tnh hnh hc ca mt i tng mc tiu chn mt phn tng ng vi cc lp mu da . V d , hy nhn vo hai hnh nh nh phn trong Figs. 2 (e) v (f) . Nhng hnh nh ny c xy dng bng cch kim tra mt bn ca mt phng vector mu sc ca mi im nh trong Figs. 2 (a) thuc v . Gi nh rng i tng mc tiu ca chng ti l mt khun mt , c th la chn (e) l i din cho vng mt bng cch o nh th no m hnh dng ca vng mt l mt hnh bu dc [ 2 ] . Tuy nhin , k thut ny c v nh khng lm vic tt nu khun mt c mt phn b che khut bi bn tay hoc cc i tng khc . Trong phng php ca chng ti , thng tin hnh dng khng c s dng tt c trng hp . Thay vo , chng ti s dng trung bnh ca vector mu da c ly t nhiu hnh nh mu . Mt bn ca mt phng phn tch c mt vector trung bnh gn vi trung bnh ca cc mu vector mu da c chn l tng ng vi cc lp mu da . Hai trm hnh nh mu c s dng trong cc th nghim v mu vector mu da c chit xut t ng bng cch s dng cc gi tr ngng trong Bng 1 . Trong v d ca Fig. 2 trng hp (e) c la chn mt cch chnh xc vi phng php ny .

As mentioned in the previous subsection, the plane separates the thresholding box into two parts, but it has not been decided yet which part corresponds to the skin color class. To do this, we could use a geometric property of a target object to select the part corresponding to the skin color class. For example, look at the two binary images in Figs. 2(e) and (f). These images were constructed by examining which side of the plane the color vector of each pixel in Fig. 2(a) belongs to. Assuming that our target object is a face, it is possible to choose (e) as representing the face region by measuring how close the shape of the region is to an oval [2]. However, this technique seems not to work well if the face is partly obscured by hands or other objects. In our method, shape information is not used at all. Instead, we use the mean of skin color vectors obtained from many sample images. The side of the separating plane that has a mean vector closer to the mean of the sample skin color vectors is selected as corresponding to the skin color class. Two hundred sample images were used in our experiments and sample skin color vectors were extracted automatically using the threshold values in Table 1. In the example of Fig. 2, case (e) has been selected correctly with this method.

15

16

Fig. 3. Examples of the skin color region detection results: (a) input images; (b) our method; (c) Fleck et al.'s method [3]; (d) Yang and Waibel's method [4].
17

4. Experimental results Test images used to measure the performance of our method are photographs of people that can be obtained easily from the Internet. Since our method is intended to detect regions of only one skin color, we collected most of the test images from one race, i.e., yellow people in this experiment. Since the images were taken and digitized under various conditions, it can be said that no special illumination or other constraints are imposed on our test images. A total of 379 images were collected and categorized manually. We first divided them into two groups according to whether the background of each image contains colors similar to skin color or not, and then we subdivided each group according to the conditions of the skin regions' color. After categorizing all the test images, we applied our algorithm to them in batch and obtained the results in Tables 2(a) and (b), where`success means that at least half of the true skin color regions were found in a given image so that the result does not raise a serious problem in performing the next step. Of the failure images in Table 2, seven images were unsuccessful due to the failure of the selection method of Section 3.3 in the case of (a), and in the case of (b), eight images were unsatisfactory due to the same reason. From the results in Tables 2(a) and (b), it is obvious that our method is robust to the variations of a skin region's color regardless of whether the background of an Hnh nh th nghim c s dng o hiu sut ca phng php ca chng ti l hnh nh ca nhng ngi m c th thu c d dng t Internet. V phng php ca chng ti c thit k pht hin cc khu vc ch c mt mu da , chng ti thu thp hu ht cc hnh nh kim tra t mt chng tc, tc l , ngi da vng l i tng trong th nghim ny. V hnh nh c chp v s ha trong iu kin khc nhau , c th ni rng khng c chiu sng c bit hoc cc hn ch khc c p dng i vi hnh nh th nghim ca chng ti . Tng cng c 379 hnh nh c thu thp v phn loi bng tay. Trc tin chng ti chia chng thnh hai nhm ty thuc vo iu kin nn ca mi hnh nh c cha mu sc tng t nh mu da hay khng, v sau chng ti chia tng nhm theo cc iu kin ca mu cc vng da . Sau khi phn loi tt c cc hnh nh th nghim , chng ti p dng thut ton ca chng ti cho chng trong hng lot nhv thu c kt qu trong Bng 2 ( a) v (b ), trong thnh cng ngha l c t nht mt na trong s cc vng ng l mu da tht c tm thy trong mt hnh nh nht nh m kt qu khng lm tng mt vn nghim trng trong vic thc hin cc bc tip theo. Nhng hnh nh tht bi trong Bng 2 , by hnh nh khng thnh cng do s tht bi ca phng php la chn ca phn 3.3 trong trng hp ( a) , v trong trng hp ( b ), tm hnh nh l khng t yu cu v l do tng t . T cc kt qu trong Bng 2 ( a) v (b) , r rng l phng php ca chng ti l ni tri cc bin th ca mu mt vng da ca bt k l nn ca hnh nh c mu sc tng t nh mu da hay khng. Nguyn nhn chnh cho s tht bi ca cc phng php trong
18

image contains colors similar to skin color or not. The main cause for the failure of our method in finding normal skin color regions is the presence of reddish or yellowish background regions in an image which are much larger than true skin regions. As mentioned in Section 2.2, if the background color of an image is within the range bounded by the initial thresholds and much more dominant than the color of skin regions, our method fails since the thresholding rectangle moves to the cluster center of the dominant background color vectors during the adaptation procedure and consequently excludes true skin color vectors.

vic tm vng mu da bnh thng ca chng ti l s hin din ca cc khu vc nn hi hoc hi vng trong nh ln hn nhiu so vi vng da tht. Nh cp trong mc 2.2 , nu mu nn ca nh nm trong phm vi gii hn bi ngng ban u v nhiu vng chim u th hn so vi mu sc ca vng da , phng php ca chng ti tht bi k t khi di chuyn thresholding rectangle n trung tm cm vector mu nn chim u th trong quy trnh iu chnh cho ph hp v do khng bao gm vector mu da tht.

Fig. 4. Other results of our method: (a) input images; (b) skin color regions found. We also tested our method with several tens of images Chng ti cng th nghim phng php ca chng ti vi vi of white and black people, and found that our method chc hnh nh ca ngi da trng v en , v thy rng phng
19

worked well as in the case of yellow people. Our method sometimes failed to detect the skin color regions of white people when the regions are too shiny due to the re#ection of light so that they almost look white. One of the limitations of our method is that it cannot find the skin color regions at the same time if an input image is taken from a group of people that are composed of several different kinds of races. However, it is theoretically possible to detect them if our method is applied sequentially with different initial settings. Average execution time of our method is shown in Table 3. All the experiments were performed on a Pentium II (350 MHz) PC and all the codes were written in Matlab 5.3. It should be noted that Matlab codes are usually 9 or 10 times slower than the C/C++ equivalents. We implemented other conventional methods and applied them to the same test images [3,4]. Fig. 3 shows some results of our method and the conventional ones. Since threshold values of the conventional methods are fixed, the boundaries of the detected skin color regions were usually inaccurate compared to the results of our method, also they tended to detect many unnecessary regions, especially when the background of a test image contains colors similar to skin color. Furthermore, they failed to extract skin color regions when the color of the skin regions was far different from the standard skin color. On the other hand, our method was successful in such cases. Other results of our method are shown in Fig. 4, where the input images multiple faces.

php ca chng ti lm vic tt trong trng hp ca nhng ngi da vng. Phng php ca chng ti i khi tht bi trong vic pht hin cc vng mu da ca ngi da trng khi cc vng qu sng bng do s phn chiu ca nh sng h gn nh trng c mu trng . Mt trong nhng hn ch ca phng php ca chng ti l n khng th tm thy vng mu da cng mt lc nu mt hnh nh u vo c ly t mt nhm ngi m n t nhiu vng mu da khc nhau. Tuy nhin, v mt l thuyt c th pht hin ra chng nu phng php ca chng ti c p dng tun t vi cc thit lp ban u khc nhau . Thi gian thc hin trung bnh ca phng php ca chng ti c th hin trong Bng 3 . Tt c cc th nghim c thc hin trn my tnh Pentium II ( 350 MHz ) v m c vit bng Matlab 5.3. Cn lu rng m Matlab thng chm hn so vi C / C++ tng ng 9 , 10 ln . Chng ti thc hin phng php thng thng khc v p dng chng vo nhng hnh nh th nghim tng t [3,4] . Fig . 3 cho thy mt s kt qu ca phng php ca chng ti v nhng phng php thng thng. V gi tr ngng ca cc phng php thng thng l c nh, ranh gii ca cc vng mu da pht hin thng l khng chnh xc so vi kt qu ca phng php ca chng ti , chng cng c xu hng pht hin nhiu khu vc khng cn thit, c bit l khi nn ca mt hnh nh th nghim c mu sc tng t nh da mu . Hn na, cc phng php khng th trch xut cc vng mu da khi mu sc ca vng da khc xa vi mu da tiu chun. Mt khc , phng php ca chng ti thnh cng trong trng hp nh vy . Cc kt qu khc ca phng php ca chng ti c th hin trong Fig . 4, trong nhng hnh nh u vo nhiu khun mt .

20

5. Conclusions In this paper, we proposed a new skin colorfilter that is useful for finding candidate regions for faces or hands in color images. Since our method is capable of adaptively adjusting its threshold values and effectively separating skin color regions from similar background color ones, it is applicable to images with various conditions. Our method and other conventional methods were tested with a variety of sample images obtained from the Internet and experimental results show that the proposed method is robust to the variations of skin regions' color compared to the conventional ones. Trong bi bo ny, chng ti xut mt b lc mu da mi m hu ch cho vic tm kim cc khu vc ng c vin cho khun mt hoc tay trong hnh nh mu. V phng php ca chng ti c kh nng thch nghi iu chnh gi tr ngng ca n v tch hiu qu vng mu da t nhng mu nn tng t, n c p dng cho hnh nh vi cc iu kin khc nhau. Phng php ca chng ti v cc phng php thng thng khc c th nghim vi mt lot cc hnh nh mu thu c t Internet v cc kt qu thc nghim cho thy phng php xut l tri hn tm ra cc bin th ca mu vng da so vi nhng phng php thng thng.

Ti liu tham kho:

21

-End-

22

You might also like