Enhanced skin tone detection using heuristic thresholding
The segmentation of skin regions in color images is a preliminary step in several applications. Many different methods to discriminate between skin pixels and non-skin pixels are available in literature. The presence of skin or non-skin region in a digital image can be determined by manipulating tone and/or texture of pixels. The main problem in the detection of skin tone is that it is not satisfactory under illumination conditions and is rarely used for production of an enhanced image. The objective of this article is to enhance and ensure a robust skin tone detection approach which works better under varying lighting conditions and unconstrained environments. This paper outlines a method for detection of skin tone using a heuristic thresholding of YCbCr color space and skin tone enhancement. This approach is successfully applied for segmenting human skin and non-skin regions of single person and group of people in random internet images. Evaluation of the proposed approach can be done using different measures like F-measure, specificity and detection rate. Comparison of the proposed method is made with the HSV model. Experimental results demonstrate high objective quality in terms of detection rate and low false positive rates for the proposed model compared to HSV model for variety of images under varying lighting conditions.
Skin tone detection, YCbCr model, Thresholding, Skin tone enhancement.
In this era of internet multimedia computing, detection of human face in color images is an essential step in many computer visions, biometric applications like automatic face recognition, video surveillance and human computer interaction. All these applications are based on the assumption that the areas of human skin have already been detected and located. Skin detection is the process of finding skin pixels or regions in an image or video. Many skin detection algorithms are available for separating skin regions from the background. Skin detection process is commonly called the pre-processing step for face detection applications. Therefore Skin tone is an important cue for finding skin pixels in an image.
Detection of human skin tone is classified as a set of problems which has drawn considerable attention of researchers in recent years. Skin tone has been chosen for face detection applications due to its high speed processing as well as good detection performance. More over skin tone detection is robust and it is not prone to geometric transformations. Recent challenges faced by researchers in skin tone detection include choice of color space and creating skin model to detect the skin regions effectively.
Skin detection process has two phases viz,The training phase and the detection phase. Training a skin detector involves three basic steps:
1. Collection of a database of skin patches from different images. Such a database typically contains skin-colored patches from a variety of people under different illumination conditions.
2. Choice of a suitable color space.
3. Learning the parameters of a skin classifier.
Given a trained skin detector, identifying skin pixels in a given image or video frame involves:
1. Converting the image into the same color space that was used in the training phase.
2. Classifying each pixel using the skin classifier as either a skin or non-skin pixel.
3. Typical post processing is needed using morphology to impose spatial homogeneity on the detected regions .
Ahmed  has discussed the problems generally faced by any researcher and steps to be carried out for skin detection while building a system. He has also made a detailed survey about skin detection and the color spaces used. Generally the image pixel representation in a suitable color space is the primary step in skin segmentation for color images. A survey of different color spaces like RGB, YCbCr, HSV, CIE Lab, CIE Luv and normalised RGB for skin-color representation and skin-pixel segmentation methods has been made by Ahmed . A suitable color space selection needs a good classifier to perform the best skin region segmentation. A satisfactory skin classifier must be able to discriminate between skin and nonskin pixels for a wide range of people with different skin types such as white, yellow, brown and dark, etc. Existing classification techniques use neural networks and probabilistic classifiers . A researcher who chooses color as a feature for face detection should take note of three requirements. The first relates to the choice of an appropriate color space which plays a vital role in the detection, the second is understanding the exact method for modeling skin color distribution and third, the manner of processing color segmentation results for face detection .
This paper outlines a process for skin tone detection by using heuristic thresholding of YCbCr color space and followed by extraction thereof and subsequent enhancement. Fixed decision boundaries (or fixed threshold) classification approaches find successful application in segmenting human skin. Further the performance of skin detection algorithm can be evaluated using different measures like F-measure, specificity and detection rate.
The paper is organized as follows: Section 2 provides details of related work on skin tone detection. The color spaces used for skin tone detection are discussed in Section 3. Proposed methodology is described in Section 4, results of the proposed analysis and comparison are presented in Section 5, and conclusions are given in Section 6.
Zheng  has proposed an algorithm for improvement of the performance of skin detection algorithms under poor illumination conditions. A hybrid skin detection model is utilized for solving these problems by combining two Gaussian models of skin under normal conditions and bright illumination. The experimental results show the ability of that algorithm to cope up with a complex illumination change and greatly improve skin classification performance under inferior illumination conditions [4,5]. Leyuan has proposed a real-time skin color detection method for handling rapidly changing illumination conditions under vision based HCI application environment. A simple but effective method is also proposed for detecting illumination changes, and the skin color model is updated only if the illumination has changed. High false detection rate has been obtained by this algorithm .
A robust skin color detection method proposed by Xiao analyses the distribution of skin color in HSV color space in varying lighting conditions. Then, the distribution of favorite skin color and its reference region is determined via a psychological experiment .
Color space analysis was used by Son with Bayesian classifier .Here the histogram technique was used for segmenting skin areas on the basis of color pixel classification which is largely unaffected by the choice of the color space. Segmentation performance degrades only when chrominance channels are used for classification . Pratheeban have used the dynamic skin tone detection technique for skin segmentation. Here the author concludes that fixed thresholding is not suitable for combination of region growing and merging . In  the author proposes an approach for thresholding the histogram on the basis of the similarity between gray levels. A fuzzy measure for thresholding the image histogram forms the basis for this approach.
Color Space for Skin Tone Detection
Pixel-based skin color detection methods aim at introducing a tool for measuring the distance of each pixel color to skin color tones. The color itself can be represented in many different ways; the most widely used ones among them are summarized below.
RGB and normalized RGB
The RGB color space has been widely used for processing and storing the data in a digital image data. This model describes each color as a weighted combination of three main components viz., Red, Green and Blue. However, high correlation between components and mixing luminance with chromaticity makes it very sensitive to changes in imaging conditions such as background illumination, lighting. By normalizing each component, normalized RGB is tried to reduce the dependence of each component to the brightness of the pixel using the Equation 1.
r=R/(R+G+B) g =G/(R+G+B) b=B/(R+G+B) → (1)
Hue saturation value model (Value or intensity or lightness)
Hue Saturation Value (HSV) model describes color with dominant color (Hue), colourfulness in proportion to the brightness (Saturation), and the volume of luminance (Lightness). The most important characteristic of the model is its explicit discrimination of luminance from chrominance. This makes the model insensitive to brightness at white color and ambient light; the properties that have attracted many researchers to put their skin color detection works on this model . H, S, and L components are computed using the following Equation 2.
H=arccos (1/2 ((R-G)+(R-B)))/√((R-G)2+(R-B)(G-B)) → (2)
S=1-3 (min(R, G, B))/(R+G+B)
YCbCr color space
YCbCr is an encoded nonlinear RGB signal which is used by European television studios for image compression work. Two different chrominance values Cb and Cr are formed by subtracting luminance from blue and red components. Due to separation of illumination and chrominance components, this color space is effective for skin color modeling. YCbCr separates luminance from chrominance in RGB values using a linear transform consisting of a weighted sum of the three components. The explicit separation of luminance has made the model very attractive for skin color detection [3,13,14]. Hence the YCbCr color space is one of the most popular choices for skin detection. The equation for RGB conversion to YCbCr can be seen in Equation 3.
Y=0.299 R-0.587 G-0.114B → (3)
Heuristic Thresholding of Ycbcr Color Space for Skin Tone Detection and Enhancement
In this paper, skin tone detection is carried out using YCbCr color model which is ideal as suggested by available literature [8,9]. A heuristic thresholding is used for skin tone detection and the detected skin regions are enhanced for good appearance for further applications like biometrics, face detection, biomedical image processing and so on.
The purpose of any skin detection system is to differentiate between skin pixels and non-skin pixels. For skin tone/color, classification is modeled using different techniques. The most basic of all these approaches is explicit color space thresholding. Non-parametric skin modeling methods estimate skin tone distribution from the training data without using an explicit model of the skin tone . The parametric skin tone modeling estimates skin tone distribution from the training data by making inferences about the parameters of an explicit model of the distribution.
The main purpose of this study is to detect and enhance a skin tone regions using YCbCr color space which is able to classify the skin pixels and non-skin pixels effectively and efficiently. The methodology of skin detection is discussed in this section.
First, an approach of color space transformation is achieved using heuristic thresholding to detect skin tone regions by the suitable YCbCr color space. Secondly, the detected skin tone regions alone will be extracted using morphological processing. Finally the extracted skin regions are enhanced with the help of color transformation. The workflow of the proposed algorithm is shown in Figure 1.
The proposed algorithm for skin tone detection and enhancement is briefed in the following sections.
Skin tone detection using heuristic thresholding: In skin tone modeling, different set of input images are taken randomly from the internet which has set of people of different ethnicities, genders and age. Input images from a single person as well as a group of persons in different illumination conditions are considered.
Human skin tone varies differently with respect to different ethnicity. Algorithms of various kinds are in use for detecting human skin pixels. Modeling the skin tone requires an appropriate color space to be chosen and a cluster associated with the skin tone to be identified in this space. Recently, many researchers face the challenge in skin tone detection is the choice of color space. It has been observed that in YCbCr color space skin clusters can be well represented by the luminance and chrominance . Hence YCbCr color space is the right choice for segmenting skin pixels and non-skin pixels and the same has been demonstrated.
In the proposed algorithm, choice of thresholding is the important key note for effective detection of skin regions using YCbCr color space. A nominal threshold value has been chosen to detect the skin regions.
Skin segmentation approaches that rely on pixel-level classification often use a fixed decision threshold technique. In the fixed decision threshold classification technique, the decision boundaries are often fixed by the designer to obtain best skin segmentation results. The need for learning any predefined fixed threshold from collected database does not arise due to the use of an enhanced threshold. Therefore there is no training phase in the proposed skin tone detection method. The proposed method is purely based on the threshold value of the different chrominance components by RGB to YCbCr color transformation. When an RGB color image is transformed into YCbCr color image, the resultant image is composed of intensity component (Y) and chrominance components (Cb and Cr).
In the existing method , random thresholding was applied as a threshold for chrominance components only as Cr>150 and Cr<200, Cb>100 and Cb<150 which misclassify skin as nonskin region. The proposed algorithm requires the choice of a heuristic thresholding as chrominance Cb should present between 77 and 127 and the value of Cr should be between 133 and 173. This predefined thresholding will classify skin regions without any training phase. This range of thresholding could analyse and detect skin pixels exactly not only for various illuminations conditions as well as efficiently used for group of people in a single image.
In general, HSV color model has been chosen by many researchers as a favorite skin model for skin tone detection. In , the recognition of skin color is highly influenced by intensity and saturation of the image, the distribution of intensity, saturation, and hue should be defined for skin detection. Here the author chose suitable threshold for hue and saturation which is not efficient for detecting skin regions for more number of people present in a single image. According to the comparative analysis , random thresholding is used in YCbCr as well as in HSV modeling techniques. The proposed algorithm shows YCbCr color space efficiently detects skin pixels and non-skin pixels with heuristic thresholding for different ethnicity. According to predefined thresholding without training , skin tone pixels are detected. Table 1 provides a comparative study of parameters used in the proposed algorithm and the existing one.
|Skin tone detection||Parameters||Threshold range||Accuracy||Average detection rate|
|Proposed method using heuristic thresholding||Chrominance
Cb and Crfixed
|77<Cb<127 and 133<Cr<173||High||0.93 or 93%|
|Khamar ||ChrominanceCb and Cr-fixed||100<Cb<150 and 150<Cr<200||Low||0.65 or 65%|
|Xiao ||Hue and saturation-fixed||0<H<50 and 0.2< S<0.68||Low||0.60 or 60%|
Table 1. Threshold range for skin tone detection.
Skin tone extraction and enhancement: The next step in the proposed framework includes the utilization of morphological operations for refining the skin regions extracted from the skin pixel segmentation. The detected skin regions obtained from heuristic thresholding of YCbCr color space are subjected to morphological processing using image erosion.
A suitable morphological operation is chosen and it applies a structuring element to an input image which aims to create an output image of the same size. A flat structuring element is a binary valued neighborhood, in which the true pixels are included for the morphological computation, while the false pixels are not included for computation. Thus coefficients are obtained by using these structural elements. In a morphological operation, the value of each pixel in the output image is based on a comparison of the corresponding pixel in the input image with its neighbors.
The most basic morphological operations are dilation and erosion. Dilation is used to add pixels to the boundaries of objects in an image, while erosion is used to remove pixels which are found on object boundaries. The number of pixels added to or removed from the objects in an image depends on the size and shape of the structuring element used for processing the image .Using morphological operations, the state of any given pixel in the output image is determined by applying a rule to the corresponding pixel and its neighbors in the input image. In erosion, the skin tone is extracted by the rule used for processing the pixels.
Therefore the detected skin tone region using heuristic thresholding of YCbCr color space has undergone image erosion to extract the skin regions alone.
After extraction, the skin regions are enhanced by transforming luminance and chrominance into RGB component. Finally the extracted skin regions are converted to binary format for qualitative analysis. In the proposed approach, enhanced output has been obtained by using a heuristic thresholding and transformation and the results are compared with Khamar  and Xiao  which proves proposed algorithm produces high accuracy of skin tone detection with enhancement.
Experimental Results and Analysis
The experimental data set is a set of static images from the Internet which depicts people of different ethnicities, genders and age and their corresponding ground truths are downloaded to make quantitative performance evaluation of the proposed skin color detection method. The misclassified pixels can be divided into two categories: False Positives (FP) are the pixels that labeled as non-skin tone/color in Ground Truth (GT) but classified as skin color, and False Negatives (FN) are the pixels that are labeled as skin color but actually classified as non-skin color. The False Negative Rate (FNR) and False Positive Rate (FPR) were adopted as the measures for the quantitative performance evaluation.
The other important measures such as F-measure, specificity and accuracy are used to evaluate the algorithm. The author  evaluates the approaches based on F-measure and or specificity. The F-measure is calculated by evenly weighting precision and recall. The true negative rate is measured and named as specificity
F-Measure=2 × ((Precision × Recall))/((Precison+Recall))
Specificity=TN/((TN+FP)); FPR=FN/(FN+TP); FNR=FP/(FP +TN)
Precision is the percentage of correctly classified pixels out of all the pixels classified as skin . False-Positive Rate (FPR) is the percentage of background pixels misclassified as skin. False-Negative Rate (FNR) is the percentage of background pixels misclassified as non-skin.
Smaller the FNRs and FPRs, better the outcomes. The performance measures of the proposed approach and  favorite HSV model is provided in Tables 2 and 3.
|Proposed approach using Ycbcr with heuristic thresholding||Favorite HSV color model |
|Original image||FNR||FPR||F-Measure||specificity||Accuracy||Detection rate||FNR||FPR||F-measure||specificity||Accuracy||Detection rate|
Table 2. Performance measures of image 1 to 4 between proposed and .
|Proposed approach usingYCbCr with heuristic thresholding||Favorite HSV color model |
|Original image||FNR||FPR||F-Measure||specificity||Accuracy||Detection rate||FNR||FPR||F-Measure||specificity||Accuracy||Detection rate|
Table 3. Performance measures of images 5 to 8 between proposed and .
The random internet input images of an individual person from Figures 2a-5a are taken for skin detection. Skin tone detection using heuristic thresholding of YCbCrcolor space is shown in Figures 2b-5b which depicts that the proposed algorithm can qualitatively detect human skin and non-skin regions for different set of people. The quantitative analysis of images in Table 2 shows that high accuracy and detection rate is achieved using the proposed algorithm than the existing [18-22].
Figure 2: Simulation result for individual by proposed model and favorite HSV. (a) Original input image (Image 1) (b) Skin tone detection using proposed model (c) Enhanced image from extracted skin detection (d) skin tone detection using HSV model .
Figure 3: Simulation result for individual by proposed model and favorite HSV. Original input image (Image 2) (b) Skin tone detection using proposed model (c) Enhanced image from extracted skin detection (d) skin tone detection using HSV model .
Figure 4: Simulation result for individual by proposed model and favorite HSV. (a) Original input image (Image 3) (b) Skin tone detection using proposed model (c) Enhanced image from extracted skin detection (d) skin tone detection using HSV model .
Figure 5: Simulation result for individual by proposed model and favorite HSV. Original input image (Image 4) (b) Skin tone detection using proposed model (c) Enhanced image from extracted skin detection (d) skin tone detection using HSV model .
The most efficient usage of proposed algorithm is detecting skin regions using skin tone by heuristic thresholding in more number of persons with different ethnicity in a single image. For the set of people with different age, lighting condition and background present shown in Figures 6-9, the proposed algorithm proves that it detects skin regions efficiently to the different changes. From Tables 2 and 3, it is seen that the proposed method has high detection rate when compared to existing HSV model [20-22].
A high accuracy is also achieved by proposed method than the favorite HSV model. The computed FNR and FPR values are between 0 and 1. Finally skin tone regions are alone extracted and enhanced from the detected image.
A sample of results acquired for four images are depicted for individual from Figures 2-5 and Figures 6-9 for group of people, where rows (a) represent the original images, (b) represent that skin tone detected images using proposed model, (c) represent enhanced output image from the extracted skin tone detection and the images are better viewed in enhanced approach and (d) represent skin tone detection using HSV model. Figures 2-5 depicts that skin tone can be detected efficiently by the proposed model than by the HSV model.
Figure 6: Simulation result for proposed model and favorite HSV for different age and group of people. (a) Original input image (Image 5) (b) Skin tone detection using proposed model (c) Enhanced image from extracted skin detection (d) skin tone detection using HSV model .
Figure 7: Simulation result for proposed model and favorite HSV for different age and group of people. (a) Original input image (Image 6) (b) Skin tone detection using proposed model (c) Enhanced image from extracted skin detection (d) skin tone detection using HSV model .
Figure 8: Simulation result for proposed model and favorite HSV for different age and group of people. (a) Original input image (Image 7) (b) Skin tone detection using proposed model (c) Enhanced image from extracted skin detection (d) skin tone detection using HSV model .
Figure 9: Simulation result for proposed model and favorite HSV for different age and group of people. (a) Original input image (Image 8) (b) Skin tone detection using proposed model (c) Enhanced image from extracted skin detection (d) skin tone detection using HSV model .
Figures 6d-9d depict the inability of the existing HSV model to detect skin regions for a group of people in a single image. The proposed approach can efficiently detect the skin regions than the existing one. As well as for the set of people with different age, lighting condition and background present, the proposed algorithm proves that it is robust even under varying condition.
The performance of the proposed skin tone detection technique is better than that of HSV model for skin tone detection. The proposed method is robust to imaging conditions and not biased by human ethnicity. In this paper, we have presented skin detection and extraction method using YCbCr model which consolidates better detection in different illumination conditions for individual and different age and group of people. Detection of more than one person in an image is possible in better way. Proposed method achieves high accuracy and detection rate than the HSV model . The skin detection model can be used in biomedical image processing and the same can be implemented using hardware in future.
- Ahmed E, Crystal M, Dunxu H. Department of computer science, skin detection-a short tutorial Rutgers university. Piscataway NJ 08902 USA 2009.
- Khamar BS, Ganesan P a, Kalist V, Sathish BS, Merlin MJJ. Comparative study of skin color detection and segmentation in HSV and YCbCr color space procedia. Comp Sci 2015; 57 41-48.
- Vladimir V, Vassili SAA. A survey on pixel-based skin color detection techniques. International Conference Graphicon Moscow Russia 2003.
- Jian HZ, Chong YH, Yang YF, Xian Z. Adaptive, skin detection under unconstrained lighting conditions using a bigaussian model and illumination estimation. Image Anal Stereol 2005; 24: 21-33.
- Hani KAM, Junita MS, Shahrel AS. Human skin color detection: A review on neural network perspective. Int J InnovComput Inform Control 2012; 8.
- Leyuan L, Nong S, Saiyong Y, Rui H. Real-time skin color detection under rapidly changing illumination conditions. IEEE Transact Cons Electr 2011; 57.
- Xiao NZ, Jue J, Zhi HL, Chun- LL. Skin color enhancement based on favorite skin color in HSV color space. IEEE Transact Cons Electr 2010; 56.
- Son LP, Abdesselam B, Douglas C. Skin segmentation using color pixel classification: analysis and comparison. IEEE Trans Patt Anal Mac Intel 2005; 27.
- Pratheepan Y, Joan C, Kevin C, Abbas C, Paul MK. A dynamic threshold approach for skin segmentation in color images. Int J Biometr 2012.
- Orlando J. Tobias, image segmentation by histogram thresholding using fuzzy sets. IEEE Trans Image Proc 2002; 11.
- Jones M, Rehg JM. Statistical color models with application to skin detection. Proc IEEE IntConf Comp Vision PattRecogn 1999; 274-280.
- Ghazali O, Muhammad SH, Mohd NI. Enhanced skin colour classifier using RGB ratio model. Int J Soft Comput (IJSC) 2012; 3.
- Kakumanu P, Makrogiannis S, Bourbakis N. A survey of skin-color modeling and detection methods. ITRI Comp SciEng Wright State Univ 2005.
- Bhushan LB, Tripti S. Hybrid approach for face detection using skin color based segmentation and edge detection. Int J Adv Res Comp CommunEng 2014; 3.
- Li W, Eung JL. 3D face recognition using face feature points based on parallel stereo vision. Int J Dig Content TechnolAppl 2010; 4.
- Rehan UK. Contextual skin segmentation for content filtering. Comp Vision Lab 2011.
- Michal K. Self-adaptive algorithm for segmenting skin, Kawulok . EURASIP J Adv Sign Proc 2014; 2014: 170.
- Brand J, Mason J. A comparative assessment of three approaches to pixel level human skin detection. Proc IEEE IntConfPattRecogn 2000; 1056-1059.
- Mokhtar MH. Superior skin color model using multiple of Gaussian mixture model. Br J Sci 2012; 6: 1-14.
- Prajakta MP, Patil YM. Robust skin colour detection and tracking algorithm . Int J Eng Res Technol (IJERT) 2012; 1.
- Zhi-Wei Z. A skin color model based on modified GLHS space for face detection. J Inform Hid Multimed Sign Proc 2014; 5.
- Otsu N. A threshold selection method from gray-level histogram. IEEE Trans Sys Man Cybernatics 1979; 1: 62-66.