Image Processing Reference
Fig. C.1 ( a ) Histogram of 100 training images. ( b ) Gaussian-shaped histogram
so extreme that virtually every single pixel in the input image will satisfy the con-
dition of a skin pixel. All these non-skin pixels being segmented as skin pixel are
denoted False Positives . If we want to make sure that only real skin pixels are seg-
mented, then we probably need to have T Hue min and T Hue max very close to each other.
This will of course result in too few real skin pixels being segmented. These errors
are denoted False Negatives . So, regardless of how we define the thresholds we will,
in general, make incorrect segmentation. As a designer you need to balance the false
positives and false negatives when you choose the thresholds. And understand the
consequences of the two error types—are they equally important?
Looking at the histogram once more we might want to define the threshold values
around 140 and 220, respectively, since this is where the majority of the values are.
A more general approach is to use statistics, specifically, the mean and variance.
The mean is the average value of Hue and is calculated by summing all Hue values
and normalizing with the number of pixels, N , used in the training:
where Hue i is the Hue value of the i th training pixel.
The variance measures the variation of the Hue values around the mean value.
That is, how close/far from the mean the Hue values are in general. The histogram
in Fig. C.1 (b) has a larger variance than the one in Fig. C.1 (a). The variance is
Hue Mean ) 2
( Hue i −
The variation is often represented as the standard deviation instead of the
variance. The standard deviatio n is simply the square root of the variance:
Since we now have two values (mean and standard deviation) which represent
the data in the histogram we can define the threshold values in more general terms