Professional Documents
Culture Documents
3. Images Used and Performance Metrics histogram-based approach for segmenting the skin pixels
from the remainder of the image. This approach relies on
Both algorithms presented here were trained using 48 the assumption that skin colors form a cluster in some
images. The testing was done on 64 other images. The color measurement space ([10, 11]). A two-dimensional
images were downloaded from a variety of sources, histogram is used to represent the skin tones. By using
including frames from movies and television, professional the two parameters of a color system which do not
publicity photos and amateur photographs. The images correspond to intensity or illumination, the histogram
were selected so as to include a wide range of skin tones, should be more stable with respect to differences in
environments, cameras, and lighting conditions. Some of illumination and local variations caused by shadows [12].
the images depicted multiple individuals and the quality of The two-dimensional histogram used here is referred to
the images varied. The choice of the images is described as the lookup table (LT). Each cell in the LT represents
in greater detail in [18]. To obtain ground truth for the number of pixels with a particular range of color value
training and evaluation of pixel classification performance, pairs. A set of training images is used to construct the
the skin regions in all 112 images were marked by hand. LT as follows: Each image, having been previously
Four different metrics are used to evaluate the results segmented by hand, undergoes a color space
of the skin detection algorithms. C (percent correct) is transformation. Then, for each pixel marked as skin, the
the proportion of all image pixels (both skin and non- appropriate cell in the LT is incremented. After all the
skin) identified correctly. SE (skin error) is the number images have been processed, the values in the LT are
of skin pixels identified as non-skin, divided by the divided by the largest value present. The normalized
number of image pixels. NSE (non-skin error) is the values ([0,1]) in the LT cells reflect the likelihood that
number of non-skin pixels identified as skin, divided by the corresponding colors will correspond to skin.
the number of image pixels. S (% of skin correct) is the To perform skin detection, an image is first
proportion of all skin pixels identified correctly. transformed into the color space. For each pixel in the
image, the color values index the normalized value in the
4. Algorithm 1: Lookup Table Method LT. If this value is greater than a threshold, the pixel is
identified as skin. Otherwise, the pixel is considered to be
The first algorithm presented here uses a color non-skin.
4.1 Lookup Table Results is near or below 5%.
It is interesting that the two Hue-Saturation based
Initially, ten different LTs were constructed, at two color spaces perform better than the two systems designed
different resolutions (64 x 64 and 128 x 128) and in five to accurately reproduce color information (CIELAB and
different color spaces (CIEL*a*b*, HSV, an Alternate YC rC b).
Hue-Saturation system, referred to here as Fleck HS ([6]),
Normalized RGB and YCrCb ). Each of the ten LTs was 4.2 Adding Double Thresholding
constructed from the 48 images in the training set and
tested with the 64 images from the test set. For each While the LT method works reasonably well, it has a
image, the algorithm was run with thresholds from 0 to 1. tendency to omit pixels (a high SE at low thresholds).
Figure 1 shows the results for a resolution of 64 x 64. To overcome this problem, a simple double-thresholding
For all ten LTs, the value of the threshold determined region-growing method was added to the algorithm. A
a tradeoff between NSE and SE. In all cases C (% similar technique was used in [6].
correct) started below 50% and then increased to around Values above a threshold are always considered to be
80% where it leveled off. The S (% of skin correct) skin, while values below a lower threshold are always
tended to be close to 100% at very low thresholds, and considered to be non-skin. All pixels with values above
then fell to near zero at high thresholds. the first threshold are identified as skin. Next, for each
Figures 2 and 3 show these results grouped by S , pixel, the 5x5 neighborhood around the pixel is examined.
rather than by color space. In each plot, C, SNE and S E If a majority of the pixels in this neighborhood are skin,
are shown for all five color spaces. it is also identified as skin (if not already). Otherwise, the
At a 60% S (Figure 2), HSV and Fleck HS have the current pixel is identified as non-skin. This has the effect
best results, with C around 80%, NSE just over 10% and of removing small groups of spatially outlying skin
SE just below 10%. The results from the other color pixels, as well as filling in small areas that were missed.
spaces are comparable, but with a higher NSE and a After applying this simple smoothing technique, the
lower C. region growing begins. Pixels adjacent to pixels that
At an 80% S (Figure 3) the differences between the have been previously identified as skin are examined. If
color spaces become more apparent. Here, Fleck HS has the LT indicates a value between the two thresholds, the
the best results, followed closely by HSV, while YC rC b pixel is identified as skin. This process repeats until the
and CIELAB have the worst, with C below 70% and total number of new pixels added from a single pass
NSE above 30%. In every case, SE is negligible, as it through the image is less than 1% of the total number of
Figure 2: Result at an 60% Skin Correct Figure 3: Result at an 80% Skin Correct
Figure 4: Lookup table method with double Figure 5: Lookup table method with double
thresholding of half of original threshold. thresholding of quarter of original threshold.