Skin Color Segmentation in YCBCR Color Space with Adaptive Fuzzy Neural Network (Anfis)
Автор: Mohammad Saber Iraji, Azam Tosinia
Журнал: International Journal of Image, Graphics and Signal Processing(IJIGSP) @ijigsp
Статья в выпуске: 4 vol.4, 2012 года.
Бесплатный доступ
In this paper, an efficient and accurate method for human color skin recognition in color images with different light intensity will proposed .first we transform inputted color image from RGB color space to YCBCR color space and then accurate and appropriate decision on that if it is in human color skin or not will be adopted according to YCBCR color space using fuzzy, adaptive fuzzy neural network(anfis) methods for each pixel of that image. In our proposed system adaptive fuzzy neural network(anfis) has less error and system worked more accurate and appropriative than prior methods.
Skin color segmentation, image processing, fuzzy, anfis, color space
Короткий адрес: https://sciup.org/15012291
IDR: 15012291
Текст научной статьи Skin Color Segmentation in YCBCR Color Space with Adaptive Fuzzy Neural Network (Anfis)
Published Online May 2012 in MECS
One of the most important issues that is discussed in many human/computer interaction and face detection, is finding points in image which is part of human color skin . Human color skin from one person to another and from one race to another has more difference.
Therefore, finding skin color in color images needs more accuracy and more confidence. Skin Color has comprehensive usage in identification recognition systems , machine vision and moreover in intelligent systems for human kind interactions[1].
After determining that which part of an image is relevant to skin, it can use in multiple affairs. Here accuracy in color skin segmentation will be important as far as computation must be controlled and done more Delicate . For detecting that if a pixel of an image is color skin or not, there are methods that we will mention some of them. In our method, color skin segmentation is in YCBCR color space and using fuzzy technique. In this method in addition to considering color intensity's features, luminance component is also considered, therefore in different light environment color skin from non-color skin will be easily recognize and segregate . In many of usages, knowing that a pixel is as skin color very important, in our algorithm easily and with high accuracy can resolve this kind of problems. Also, where color skin points and non-color skin points have overlap, using fuzzy membership degree criteria can accurately make decision for determining that if a pixel is color skin or non-color skin.
The paper is organized in five sections. After the introduction in Section I, Section II which also introduces the existing methods of the skin color segmentation. Section II continues with explanations of fuzzy skin color segmentation system in ycbcr color space in section III.in Section IV is proposed adaptive fuzzy neural network(anfis) skin color segmentation in ycbcr color space . It continues with discussions on the architecture of hybrid learning and fuzzy model validation, the error of observations for training data sets. Section V presents the conclusions of the research. The paper ends with a list of references.
-
II. SKIN COLOR SEGMENTATION ALGORITHMS
Dealing with simple ‘black’ and ‘white’ answers is no longer satisfactory enough; degree of membership (suggested by Prof. Zadeh in 1965) became a new way of solving problems by treating data as imprecise or in a fuzzy form, thereby allowing the fuzzy system to handle certain degree of randomness without compromising on the efficiency of the system.
Neuro-fuzzy systems are one of the most successful and visible directions of that effort. Neuro fuzzy hybridization is done in two ways [2]: a neural network equipped with the capability of handling fuzzy information (termed fuzzy neural network) and a fuzzy system augmented by neural networks to enhance some of its characteristics like flexibility, speed, and adaptability (termed neuro-fuzzy system(NFS) or ANFIS). An adapted neuro-fuzzy system (NFS) is designed to realize the process of fuzzy reasoning, where the connection weights of network correspond to parameters of fuzzy reasoning[2,3]. These methodologies are thoroughly discussed in the literature [2].
Juang and Shiu proposed an algorithm for skin color segmentation in Hsv color space. SOTFN-SV is trained to find the HS regions that correspond to skin color despite there is discontinuity in the H channel.
That is, if input regions near the scaled values of H=0 and H=1 are non-skin regions[4].Juang and Chang used scheme of HSV color space Like the previous system , They believed To produce a good segmentation result, must be a suitable threshold is selected. Using a fixed threshold for all public images segmentation result does not provide satisfactory. Experimental results show that a smaller threshold generates better results provide for brighter images. On the contrary, for darker images a larger threshold images good performance. Therefore, threshold value is related to the illumination. They used a neural fuzzy system (FS) to find the appropriate threshold, and adaptively to a more desirable results than previous methods were available [5].
Lie proposed an algorithm for skin color segmentation in YCBCR color space. He defined a threshold for each component of ycbcr, if the components of each pixel was greater than the threshold, they were skin color, otherwise , were nonskin color [1].
Abbas Nasrabadi and Javad Haddadnia proposed a method for skin color segmentation this method employs a model based approach to represent and differentiate the background colors and skin colors. To indicate skin region, a set of images including skin areas is used and skin areas are extracted from images. By applying low pass filter on skin samples, the noise reduces and then each skin image changes into YCbCr space. Then, the two color elements, Cb and Cr are obtained. In this section, a color filter is introduced for separation skin areas. data station of skin images is considered as a cluster that all of its elements are skin. This cluster has a mean and a standard deviation[6].
Mohammad Ibrahim Khan and Md. Al-Amin Bhuiyan proposed a method for skin color classification, In this work, they use the Takagi-Sugeno fuzzy inference system (FIS) . system is composed of two inputs (the two components Cb and Cr) and one output (the decision: skin or non-skin color),they disregarded y component[7].
-
III. FUZZY SYSTEMS AND YCBCR COLOR SPACE
At first represent comments on fuzzy systems and YCBCR color space briefly.
-
A. Fuzzy system
Fuzzy sets theory provides a framework to materialize the fuzzy rule-based (or inference) systems which have been applied tomany disciplines such as control systems, decision-making and pattern recognition(J. Yen , 1989). The fuzzy rule-based system consists of a fuzzification interface, a rule base, a database, a decision-making unit, and finally a defuzzification interface [8].
B. YCBCR color space
YCbCr is a family of color spaces used as a part of image pipeline in video and digital photography photography systems. Y is the luma component and CB and CR are the blue-difference and red-difference chroma components. Y (with prime) is distinguished from Y which is luminance, meaning that light intensity is non-linearly encoded using gamma correction[9].
The Y in YCbCr denotes the luminance component, and Cb and Cr represent the chrominance factors .In YCbCr, the Y is the brightness (luma), Cb is blue1 minus luma (B _ Y) and Cr is red minus luma (R _ Y). If R, G and B are given with 8 bit digital precision, then YCbCr from ‘‘digital 8-bit RGB’’ can be obtained from RGB[10].coordinate using a transformation matrix as illustrated in Figure 1 When representing the signals in digital form, the results are scaled and rounded, and offsets are typically added. For example, the scaling and offset applied to the Y component per specification results in the value of 16 for black and the value of 235 for white when using an8-bit representation. The standard has 8 bit digitized versions of Cb and Cr scaled to a different range of 16– 240[11].
" 16"
+ 256
Г 65.738 129.057
-37.945 -74.494
112.439 -94.154
25.0641 Г Л
112.439
-18.285
G
-
Figure 1. RGB to YCBCR conversation matrix.
-
C. Skin color segmentation in fuzzy YCBCR color space
The YCbCr space was chosen for six reasons:
-
(1) The luminance component (Y) of YCbCr is independent of the color, so can be adopted to solve the illumination variation problem and it is easy to program.
-
(2) According to[12], the skin color cluster is more compact in YCbCr than in other color space.
-
(3) YCbCr has the smallest overlap between skin and non-skin data in under various illumination conditions.
-
(4) YCbCr is broadly utilized in video compression standards (e.g., MPEG and JPEG) [13].
-
(5) YCbCr is a family of color spaces used in video systems. YCbCr was defined.for standard-definition television use in the ITU-R BT.601 standard for use with digital component video.
-
(6) YCbCr is one of two primary color spaces used to represent digital component video (the other is RGB).
The difference between YCbCr and RGB is that YCbCr represents color as brightness and two color difference signals, while RGB represents color as red, green and blue. In YCbCr, the Y is the brightness (luma), Cb is blue minus luma (B _ Y) and Cr is red minus luma (R _ Y).
Many researchers assume that the chrominance components of the skin-tone color are independent of the luminance component [14-17], however, in practice; the skin-tone color is nonlinearly dependent on luminance. Therefore, samples were taken at random from very large pixels in human faces to obtain the skin color distribution in the YCbCr color space. In first we define a set of colors similar than human skin colors,this shown in Figure 2.

Figure 2. Human skin colors
According to Lin three rules to aid the task of human skin color segmentation:
-
1. Y(i) > a: means that the Y (luma/bright) should be larger than a.
-
2. Cb > b: means that the Cb (Cb = Blue _ luma) should be larger than b.
-
3. Cr > c: means that the Cr (Cr = Red _ luma) should be larger than c.
The first rule means that the (Y) (luma/bright) should be larger than a. The second rule means that the Cb (Cb = Blue _ luma) should be larger than b. The third rule means that the Cr (Cr = Red _ luma) should be larger than c. In our system, the value of ‘‘a’’ = 120, the value of ‘‘b’’ = 95, and the value of ‘‘c’’ = 110. In other words, if the pixels of the input image satisfy the above three rules, then the pixels are regarded as skin color and will keep the original color. Otherwise, we will treat the pixels as non-skin color and assign them to pure black color.
In many applications, knowing that how much the color of a pixel acts like human's skin color is important also in the regions where color and non-skin colors overlapped , overlaps must based on an accurate measure determine that the desire pixel consider to which category.
Since the effects of light on skin color segmentation should not disregard so a method is required which properly behave with different lighting conditions. To solve mentioned problems and resolve many other issues and enhance the accuracy and reliability, we used fuzzy method to skin color segmentation. In our method instead constantly assuming the threshold for each components we evaluate them by are class membership criteria. As follows that any of them how much acts close to the skin color defined values and then by combining the results of each one we will achieve to a unique answer that is membership degree for each pixel. In the other words determined that one pixel how much acts like color skin and how much is like non-color skin. We used low and high linguistics terms for each of the components which their range listed in table I.
TABLE I. RANGE OF TERMS
* |
Low |
High |
Y |
16-120 |
120-235 |
CB |
16 - 95 |
95-240 |
CR |
16-110 |
110-240 |
According to table 1 The fuzzy inference rules are designed as follow :
Rule 1 : If Y is Low AND CB is Low AND
CR is Low Then PIxel is Non-Skin
Rule 2 : If Y is Low AND CB is Low AND
CR is High Then Pixel is Non-Skin
Rule 3 : If Y is Low AND CB is High AND
CR is Low Then Pixel is Non-Skin
Rule 4 : If Y is Low AND CB is High AND CR is High Then Pixel is Non-Skin
Rule 5 : If Y is High AND CB is Low AND
CR is Low Then Pixel is Non-Skin
Rule 6 : If Y is High AND CB is Low AND CR is High Then Pixel is Non-Skin
Rule 7 : If Y is High AND CB is High AND
CR is Low Then Pixel is Non-Skin
Rule 8 : If Y is High AND CB is High AND CR is High Then Pixel is Skin.
Where Y , CB and CR are color space components and Low , High are terms that are we defined.
Figures 3 Shows the functions for input,output variables based mamdani fuzzy system.

Figure 3.1 .Functions For Y

Figure 3.2. Functions For CB

Figure 3.3. Functions For CR
brightness value 98 for a pixel , 0.4 is member of acceptable range skin color and 0.6 is not member of this range.which system choose amount of 0.6 low's function between this two amounts Low = 0.6 and High = 0.4 . Similarly for CB and CR values the above operation is done, then by combining the results of these three components will find the accurate answer.
Following two Figures shows the results of implementation and testing for two pixels in Matlab environment.Figure 5 shows the pixel which its RGB values are , R = 198, G = 156, B = 132 , respectively.The Pixel seems to be completely in skin color range but result of testing shows the accurate result. After its transferring it to YCBCR space values changes as follow and result of testing shows that this pixel to specific value is on Figure 5 consider as skin color and a few is in the category of non skin-color(output=1.6).

Figure 3.4. Functions For output,1 Means skin color ,2 Means nonskin color

Figure 5. Result of Test
According to Figure 4 consider the amount of brightness (Y) for a pixel as 98, The system will work as follows:

Figure 4. Low and High Functions For Y
In Figure 6 desire pixel with RGB value is as follow: R = 39, G = 217, B = 112. After converting the YCBCR color space values The following values are achived which we do test on them: Y = 146.368 (High) , CB = 108.249 (High),CR = 57.313 (Low)
the Pixel seems to be completely in non-skin color renge(output=1.9) because CR value is less than acceptable range, but result of testing shows the accurate result. As Figure 6 shows membership degree related to being non skin color of this pixel is more than it's member degree of being skin color .so the system recognized that how much is color skin and how much is non color skin.

Figure 6. Result of Test
base.Backpropagation applies to this network since all layers are differentiable. Two possibilities for learning are apparent. One is to adjust the weights in the output laye,i.e ,all the singletons wi until the error is minimized. The other is to adjust the shape of the membership functions, provided they are parametric
A. Anfis classfier
Consider the fuzzy neural network in figure 8. The output of the first layer nodes are the degree of membership of linguistic variables. Typically, in this layer bell –shaped functions are used. Bell-shaped function is shown in Relationship 1. The purpose of learning in this layer is adjusting the parameters of membership function of inputs.
f ( x ) = exp
—
x
—
( 2
b i1
a
1 )2
Below ( Figure7 ) are some images which the above method has been applied on them:

Figure 7 . left :original image , right: system's result
The second layer is 'rules layer'. In this layer, the condition part of rules is measured by usually Min fuzzy logic operator, and the result will be the degree of activity of rule resultant. Learning, in this layer, is the change of the amount of activity of rules resultant, regarding to the 'training data', given to the network. In the third layer, we'll get the linear combination of rules resultant rate, and in order to determine the degree of belonging to a particular category, Sigmund function is used in layer 4 [18]. If a series of training vectors is given to the network in the form of the formula 2:
{(xk, yk), k = 1,..., K}
where x k refers to the K-th input pattern, then we
have:
(1,0)
(0,1)
if x k belongs to class1 if belongs to class 2
(3) x k
IV. DESIGNING BY NEURO FUZZY
It immediately comes to mind, when looking at a neural network, that the activation functions look like fuzzy membership functions. Indeed, an early paper from 1975 treats the extension of the McCulloch-Pitts neuron to a fuzzy neuron (Lee & Lee, 1975;
The one neuron in the output layer, with a rather odd appearance,calculates the weighted average corresponding to the center of defuzzification in the rule
The error function for K pattern can be defined by relationship 4:
Ek = 2[( O1 — У1) + ( O 2 — y 2) ] (4)
where y
output.
k
is desired output, and
Ok
is computed

Figure 8. adaptive neuro fuzzy Network(anfis)

Figure 9. fis output
In anfis system number of membership function of each factor 2 , function type primf , output membership function linear ,fis type gride partition and optim.method type hybrid Were considered. 8 rules a weight was created(Figure 10). After training by training data, network with 30 anfis output as Figure 11epochs the mean squared errors value(mse) reaches 0.0182 .
-
B. Design classification system by anfis
In this study, we took into 3 factors y,cb,cr which their range listed in table 1. Then, we have created the linguistic variables corresponding to the values . Output is categories of skin to skin color or non-skin color .we implemented Our proposed system for 71 cases with fuzyy and anfis systems. To implement article matlab 7.1 were used.
-
V. Discussion and Conclusion
In fis system number of membership function of each factor 2 , function type primf , output membership function primf ,fis type mamdani Were considered. Fis output as Figure 9 and the mean squared errors value(mse) reaches 0.2050.
-
1. If (у is low) and (cb is low) and (or is low) then (output is out1 ml 1) (1) 2. If (y is low) and (cb is low) and (cr is high) then (output is out1 mf2) (1) 3. If (y is low) and (cb is high) and (cr is low) then (output is out1 mf3) (1) 4. If (y is low) and (cb is high) and (cr is high) then (output is out1 mf4) (1) 5. If (y is high) and (cb is low) and (cr is low) then (output is out1 mf5) (1) 6. If (y is high) and (cb is low) and (cr is high) then (output is out1 mf6) (1) 7. If (y is high) and (cb is high) and (cr is low) then (output is out1 mf7) (1) 8. If (y is high) and (cb is high) and (cr is high) then (output is out1 mf8) (1)
-
Figure 10 . fis rules
Thus anfis proposed system mse is less and Anfis accuracy further. For future work can be other color space, different types of membership functions, different types of neural network and optimization algorithms like genetic algorithm considered.

Figure 11. anfis output
In this methods for segmentation of color skin , in addition to considering the features of color intensity, brightness component also considered therefore in different light environments easily not-skin and skin colors are identified and separated.In many applications, knowing that how much the color of a pixel acts like human's skin color is important in our algorithm easily and with high precision decision making for this kind of problems is possible.Also in regions where skin color with non-skin color are overlapped , using the membership degree of fuzzy's criteria, can accurately determine being the skin color of a pixel or being non-color skin.
Список литературы Skin Color Segmentation in YCBCR Color Space with Adaptive Fuzzy Neural Network (Anfis)
- Lin.Ch ,” Face detection in complicated backgrounds and different llumination conditions by using YCbCr color space and neural network “, National Taipei University, Taipei 10433, Taiwan, ROC,2007
- S.Mitra,Y.Hayashi. Neuro-fuzzy rule generation: Survey in soft computing framework. IEEE Transactions on Neural Networks,2000, 11(3), 748–768.
- H.R.Berenji, P.Khedkar, P.” Learning and tuning fuzzy logic controllers through reinforcements”. IEEE Transactions on Neural Networks, 1992, 3, 724–740.
- Juang.C.F , Shiu. Sh.J , “Using self-organizing fuzzy network with support vector learning for face detection in color image”s ,Department of Electrical Engineering, National Chung-Hsing University, Taichung 402, Taiwan, ROC,2007.
- Cheng.W.Y, Juang.Ch.F ,” An incremental support vector machine-trained TS-type fuzzy system for online classification problems” , Department of Electrical Engineering, National Chung-Hsing University, Taichung 402, Taiwan, ROC,2010
- Nasrabadi.A,Haddadnia.J,” Skin Color Segm- entation by Fuzzy Filter , International Journal of Computer and Electrical Engineering, Vol.2, No.6, December, 2010,1793-8163
- Ibrahim Khan. M , Bhuiyan.A.A ,” Facial Expression Recognition for Human-Robot Interface“, IJCSNS International Journal of Computer Science and Network S ecurity, VOL.9 No.4, April 2009 Sivanandum.S.N,Sumathi.S,Deepa.S.N,“Introduc-tion to Fuzzy Logic Using MATLAB”, Springer-Verlag, Berlin/Heidelberg, 2007.
- Poynton.Cha, “Digital Video and HDTV”, Chapter 24, pp. 291–292, Morgan Kaufman, 2003.
- Nodaa.H,Niimia.M,”Department of Systems Innovation and Informatics”, Kyushu Institute of Technology, 680-4 Kawazu, Iizuka 820-8502, Japan,2007.
- Chaves-González.J,Vega-Rodriguez.M, Gomez-PulÍdo.J,SánchezPérez.JM.,” Detecting skin in face recognition systems: A colour spaces study ”.Digital Signal Processing Volume 20, Issue 3, May 2010, Pages 806-823
- Hsu.R.L,et all,”Face detection in color images”, IEEE Trans. Pattern Anal. Machine Intell. 24 (5), 2002,696–706.
- Garcia. C., Tziritas. G,”Face detection using quantized skin color regions merging and wavelet packet analysis”, IEEE Trans. Multimedia1 (3), 1999,264–277.
- Sobottka.K,Pitas.I.,” Novel method for automatic face segmentation, facial feature extraction and tracking”,Signal Process. Image Commun. 12, , 1998, 263–281.
- Jones.M., Rehg.J.M.,” Statistical Color Models with Application to Skin Detection”, Technical Report Series, Cambridge Research Laboratory,December 1998.
- Saber, E., Tekalp, A.M,” Frontal-view face detection and facial feature extraction using color, shape and symmetry based cost functions”. Pattern Recognition Lett. 19, 1998, 669–680.
- Menser.B, Brunig.M,”Locating human faces in color images with complex background”. Intelligent Signal Process. Commun. Systems, December 1999,533–536.
- Iraji.ms, Eshragh Jahromi.a.h , tosinia.a,” Failure detection and classification of circular sheets through the methods of perceptron neural network, lvq and neurofuzzy “,3rd International Conference on Intelligent and Advanced Systems, Kuala Lumpur, IEEE,2010