Skin detection is the process of finding skin-colored pixels and regions in an image or a video. This process is typically used as a preprocessing step to find regions that potentially have human faces and limbs in images [2]. Skin image recognition is used in a wide range of image processing applications like face recognition, skin disease detection, gesture tracking and human-computer interaction [1]. The primary key for skin recognition from an image is the skin color. But color cannot be the only deciding factor due to the variation in skin tone according to different races. Other factors such as the light conditions also affect the results. Therefore, the skin tone is often combined with other cues like texture and edge features. This is achieved by breaking down the image into individual pixels and classifying them into skin colored and non-skin colored [1]. One simple method is to check if each skin pixel falls into a defined color range or values in some coordinates of a color space. There are many skin color spaces like RGB, HSV, YCbCr, YIQ, YUV, etc. that are used for skin color segmentation [1]. We have proposed a new threshold based on the combination of RGB, HSV and YCbCr values. The following factors should be considered for determining the threshold range:
1) Effect of illumination depending on the surroundings.
2) Individual characteristics such as age, sex and body parts.
3) Varying skin tone with respect to different races.
4) Other factors such as background colors, shadows and motion blur.
The skin detection is influenced by the parameters like Brightness, Contrast, Transparency, Illumination, and Saturation. The detection is normally optimized by taking into consideration combinations of the mentioned parameters in their ideal ranges.
In today's fast paced life, where personal health care has taken a back seat and lowest priority due to ever- growing hustle for earning more and staying ahead of competition, the significance of health can hardly be overstated. At such crucial junctures, if technology can join hands with health sector, humanity will be blessed. In rural India, just like in any other developing country, ignorance towards personal health care is so rampant that skin diseases often go unnoticed and overlooked. The uneducated Indian rural masses wouldn't even know they have a skin disease until it reaches the last stage (or the most critical and dangerous phase which is often incurable).
Thus by logic, an intervention done by technology in the primitive or early stages of disease contraction would greatly help the diagnosis and avert the fatalities. Such a prognosis needs accurate detection of human skin.
Skin detection techniques can be broadly classified as pixel-based techniques or region-based techniques. In the pixel-based skin detection, each pixel is classified as either skin or non-skin pixel individually depending on certain conditions. The skin detection based on color values is pixel-based. In region-based skin detection technique, spatial relationship of pixels is considered to define some area from given image as skin region. Initial skin region is grown bigger by adding more pixels based on its neighbors properties [6].
Using machine learning based on available data sets, a classifier can be trained to differentiate the image pixel by pixel (a skin pixel from a non-skin pixel). This can greatly help in setting a range of values which are valid for concluding that the pixel is a skin pixel. Then a set of area from the image is recognized as a skin image, using RGB (Red Green Blue), HSV (Hue Saturation Value) and YCbCr.
This paper uses a threshold based methodology to detect whether an image is a skin image or not. It attempts to give a constructive and feasible solution to skin disease detection problem by implementing the different color models on the skin images. It formulates a range for RGB, HSV and YCbCr models which other papers have not ascertained. These ranges attempt to distinguish the skin pixels from the non-skin pixels. Most of the research work in this area highlights the different methodologies that can be used for image recognition; different color models. However after a comparative study of strengths and weaknesses of these models; combination of RGB, HSV and YCbCr seem to fit for the purpose of recognizing skin images.
Color space is a mathematical model to represent color information as three or four different color components. Different color spaces (models) are used for different applications such as computer graphics, image processing, TV broadcasting, and computer vision. Different color space is available for the skin detection. They are: RGB based color space (RGB, normalized RGB), Hue Based color space (HSI, HSV, and HSL), Luminance based color space (YCBCr, YIQ, and YUV)[5]. These models are explained subsequently in next sections. Color space selection is the primary process in skin color modeling and further for classification. One or more color spaces can give an optimal threshold value for detection of pixels of skin in a given image. The choice of appropriate color space is often determined by the skin detection methodology and the application. We use the following color spaces for recognizing skin pixels.
3.1 Red, Green, and Blue (RGB) Color Model
RGB color space is widely used and is normally the default color space for storing and representing digital images. We can get any other color space from a linear or non-linear transformation of RGB [1]. The RGB color space is the color space used by computers, graphics cards and monitors or LCDs. As shown in fig.1 it consists of three components, red, green and blue, the primary colors. Any color can be obtained by mixing the three base colors. Depending on how much is taken from each base color, any color can be created. Reversing this technique, a specific color can be broken down into its red, blue and green components as shown in equation 1 to equation 3 [1]. These values can be used to find out similar colored pixels from the image. [7] explains skin color detection based on RGB color space. Normalized RGB is a representation that is easily obtained from the RGB values by a simple normalization procedure [1].
A remarkable property of this representation is that for matte surfaces, while ignoring ambient light, normalized RGB is invariant (under certain assumptions) to changes of surface orientation relatively to the light source [4].
Fig. 1.RGB Color Model
3.2 YCbCr (Luminance, Chrominance) Color Model
YCbCr is an encoded non-linear RGB signal, commonly used by European television studios and for image compression work. As shown in fig. 2 color is represented by luma (which is luminance computed from non- linear RGB) constructed as a weighted sum of RGB values [4]. YCbCr is a commonly used color space in digital video domain. Because the representation makes it easy to get rid of some redundant color information, it is used in image and video compression standards like JPEG, MPEG1, MPEG2 and MPEG4.The transformation simplicity and explicit separation of luminance and chrominance components makes YCbCr color space [3]. In this format, luminance information is stored as a single component (Y), and chrominance information is stored as two color-difference components (Cb and Cr). Cb represents the difference between the blue component and reference value. Cr represents the difference between the red component and a reference value. YCbCr values can be obtained from RGB color space according to eq. 4 to eq. 6. [7][8][9] uses YCbCr space for skin detection.
Fig. 2. YCbCr Color Model
-------------------eq. 5
-------------------eq. 6
3.3 Hue Saturation Value (HSV) Color Model
The HSV color space is more intuitive to how people experience color than the RGB color space. As hue (H) varies from 0 to 1.0, the corresponding colors vary from red, through yellow, green, cyan, blue, and magenta, back to red. As saturation(S) varies from 0 to 1.0, the corresponding colors (hues) vary from unsaturated (shades of gray) to fully saturated (no white component). As value (V), or brightness, varies from 0 to 1.0, the corresponding colors become increasingly brighter. The hue component in HSV is in the range 0Β° to 360Β° angle all lying around a hexagon as shown figure 3 [3].
With RGB the color will have values like (0.5, 0.5, 0.25), whereas for HSV it will be best used when a user is selecting a color interactively It is usually much easier for a user to get to a desired color as compared to using RGB [3]. [9][11] explain use of HSV color space for skin detection.
Fig. 3.HSV Color Model
The proposed algorithm converts the entire image in a two dimensional matrix in which the column and row size is defined by the width and height of the image respectively. Once the image is divided, each entry consists of a pixel of the image. The ARGB color of that particular pixel is determined. The ARGB value retrieved from the image for each pixel is a 32-bit value. Hence to extract each sub-value i.e. red, green, blue and alpha we right shift this value by 24 bit in order to get the value of alpha. The alpha channel is normally used as an opacity channel. If apixel has a value of 0% in its alpha channel, it is fully transparent (and, thus, invisible), whereas a value of 100% in the alpha channel gives a fully opaque pixel (traditional digital images). Similarly, for red right we shift by 16 bits, for green right shift by 8 bits. The remaining value is of blue color.
Bitwise AND operation with 0xff was applied on these calculated values in order to extract only the bits corresponding to that particular color. The above entire procedure is applied to each and every pixel of the image. In order to make the recognition more precise the ARGB value is converted to HSV as well as YCbCr value using conversion factors and built-in functions. The HSV, YCbCr and ARGB value of each pixel is compared to the
standard values of a skin pixel and decision is made whether the pixel is a skin pixel or not depending on whether the values lie in a range of predefined threshold values for each parameter. The ranges for a skin pixel in different color spaces used by our algorithm are as follows:
Cr <= (-2.2857*Cb)+432.85nothing (H : Hue ; S: Saturation ; R : Red ; B: Blue ; G : Green ; Cr, Cb : Chrominance components ; Y : luminance component ) Figure 4 shows flowchart that illustrates steps of the algorithm.
Pratheepan dataset for human skin detection is used as baseline for comparing results [11]. The images in this dataset are downloaded randomly from Google for human skin detection research. These images are captured with a range of different cameras using different colour enhancement and under different illuminations. The dataset also contains Ground Truth images for sample images in dataset. Fig 5 shows results obtained on some of the images in the dataset. Each diagram shows original image, ground truth image and resultant image from our algorithm. Table 1 shows accuracy calculations on the images shown in fig 5 using following definitions [14]. True positive (TP) represents number of Skin pixels correctly identified as skin, True negative (TN) is number of Non-skin pixel correctly identified as non-skin, False positive (FP) is Non-skin pixel incorrectly identified as skin and False negative (FN) βSkin pixel incorrectly identified as non-skin. Precision and Accuracy
Table 1. Accuracy Calculations
Additionally some sample images were collected from internet [12]. Fig. 6 shows the results obtained from the algorithm on sample images. The bar chart in fig. 7 represents the number of skin pixels detected in the three different color spaces RGB , HSV & YCbCr for three images respectively 6a)-6c). All three color spaces are almost equally contributing in the process of skin pixel identification. The algorithm is implemented in JAVA.
Fig. 4 Flowchart of the proposed system
Fig. 5. Experimental results on Pratheepan Dataset
Fig. 6. Experimental results on sample images.
Fig. 7. Bar chart showing no. of Skin Pixels
This paper demonstrates a threshold based algorithm which recognizes skin image using the RGB-HSV-YCbCr model. The algorithm is capable of processing images of different light conditions such as brightness etc. Our algorithm gives promising results in terms of precision and accuracy when compared with baseline dataset as seen in fig. 6. The future scope of this algorithm is to detect face, hand as well as hand gestures which can be used for security purpose, aid for physically challenged (deaf) individuals or for skin disease detection.
[1] Patil, Prajakta M., and Y. M. Patil, "Robust Skin Colour Detection and Tracking Algorithm", International Journal of Engineering Research and Technology Vol. 1. No.8 (October-2012), ISSN: 2278- 0181 (2012).
[2] Ahmed, E., Crystal, MSkin Detection-a short Tutorial
Encyclopedia of Biometrics, pp. 1218β1224 ,Springer-Verlag Berlin, Heidelberg,(2009).
[3] Poorani. M, Prathiba. T, RavindranIntegrated Feature Extraction for Image Retrieval
tional Journal of Computer Science and Mobile Computing vol.2 no. 2, 28-35(February2013)
[4] B.D., Zarit, B.J., Super, and F.K.H. Quek: "Comparison of five color models in skin pixel classificationWorkshop on Recognition, Analysis, and Tracking of Faces and Gestures in Real-Time Systems, 58-63(Sept1999).
[5] V. Vezhnevets, V. Sazonov, and AA Survey on Pixel- Based Skin Color Detection Techniques
[6] KB Shaik, P Ganesan, V Kalist, BS Sathish, JMM Jenitha:"Comparative study of skin color detection and segmentation in HSV and YCbCr color space", Procedia Computer Science57 ,41-48(2015).
[7] Brand, JA comparative assessment of three approaches to pixel level human skin- detection
of the International Conference on Pattern Recognition, vol. 1,2000, 1056-1059.
[8] Jones, MStatistical color models with application to skin detection
, International Journal of Computer Vision (IJCV),46(1), 81-96(2002).
[9] Phung, S. L., Bouzerdoum, A., And Chai, DA novel skin color model in ycbcr color space and its application to human face detection
, IEEE International Conference on Image Processing
2002), vol. 1, 289-292(2002).
[10] Chai, D., and Bouzerdoum, AA bayesian approach to skin color classification in ycbcr color space
Proceedings IEEE Region Ten Conference
[11] Albiol, A., Torres, LOptimum color spaces for skin detection
, Proceedings of the International Conference on Image Processing (ICIP), 122- 124(2001).
[12] Tan, Wei Ren, Chee Seng Chan, PratheepanYogarajah, and Joan Condell.: "A fusion approach for efficient human skin detection", Industrial Informatics, IEEE Transactions on 8, no. 1,138-147(2012)
[13] Free Images
com, 2016, Web. 16 June 2016.
[14] Sensitivity_and_specificity
org, 2016, Web.16 June 2016