Professional Documents
Culture Documents
Model Matematika Deteksi Wajah - Hadi Unpad
Model Matematika Deteksi Wajah - Hadi Unpad
Abstract. Skin colour in digital image is important element that is very useful
for preprocessing task in skin-based automatic image detection. In this paper, skin
colour was investigated and its representation in several colour spaces has been
explored. A mathematical model for the representation has been developed and
successfully implemented for automatic single frontal face detection conjuncted
with mathematics morphological and segmentation image processing filters and
simple 4-neigbourhood image measurement algorithm. The experiment has been
conducted based from our proposed method using face database images that have
been collected from several sources, such as standard FERET Colour face database
and local native face database.
1 Introduction
Skin colour is an important element in detecting image that contain skin or skin-
like region. Skin colour can be used to detect faces [5, 8, 9] or hands [13, 28], in
dynamic images as well as in still images. Skin colour has also been used to detect
images of naked people for Internet content altering [3, 6, 7]. In the field of health
and disease, skin colour can also be used to analyse medical images. For example,
the ability to segment an image using skin colour can aid in the diagnosis of skin
cancer [17].
Skin colour detection will give result of skin region and skin-like region. False
detection of skin-like colour region can degrade the performance of skin colour
detection. To cover this problem, skin colour detection must be followed with
Setiawan Hadi, Adang Suwandi A., Iping Supriana S., Farid Wazdi
other detection techniques. In our approach, skin color detection in three colour
spaces was conducted and compared using skin detector that has been created
semi-manually based on the statistical skin model that has been developed from
the previous step. The result of skin color detection is followed with two morpho-
logical filters, those are erosion, for thinning the image and removing the noise
with salt and pepper technique, and dilation, for compacting the binary image
representation.
In the following pages, we will describe skin color distribution in the explored color
spaces. Description about colour in digital images can be read in [4], meanwhile
elaboration of colour spaces and their comparison can be found in detail in [27].
Figure 1: Sample image and its skin colour distribution in colour spaces
the normalised rg colour space and various hue and saturation based colour spaces
result in a skin colour distribution that, is well modelled with a bivariate Gaussian
distribution [19, 25, 23]. There is contradiction about the best statistical model to
use for skin colour. Most researchers use a single distribution, while some [24, 26]
claim that a single multivariate distribution is inadequate, and a Gaussian mix-
ture model is more appropriate. Other researchers use a Gaussian mixture model,
yet observe that a single Gaussian distribution is often adequate [14, 15]. Some
researchers have used adaptive skin colour models to overcome the limitations
between fixed and statistical colour models. Jordao et al. [8] used the variance of
the skin colour distribution in the HSV colour space to detect regions in an image
as being skin coloured based on the variance of colour within the region. Yang and
Waibel [22] used a statistical model in the normalised rg colour space, and allowed
the model parameters to adapt from one frame to the next in a video sequence.
Raja, McKenna, and Gong [15] used an adaptive Gaussian mixture model that
modified the model parameters from frame to frame by resampling a window of
the image, while ignoring frames that were too different to the current model.
Similarly, Rowley [16] used a Gaussian model in the normalised rg colour space
that resampled areas around the centre of the face to adapt the model parameters
from frame to frame.
In our approach, skin color is modelled using mean and covariance of chrominant
color. If we use normalize rg space, then the value of r and g are calculated.
If HSB, h element and s element are considered. Similar with that, Cb and Cr
components are used for modelling skin colour in YCbCr colour space.
Setiawan Hadi, Adang Suwandi A., Iping Supriana S., Farid Wazdi
The mean (x, y) location is then used to derive an angle in polar coordinates which
is then mapped onto the range [0..2π), by adding or subtracting multiples of 2π as
necessary, and then mapped onto the range [0, 1) by dividing by 2π. Saturation
ranges from [0..1], and does not wrap around, so the mean saturation is calculated
in the usual way. The calculation of the angle θ, mean hue ans saturation are
n
y θ 1
θ = arctan( ) h= s= si (2)
x 2π n i=1
and
∆si = si − s. (7)
Chromaticity is defined as (r, g) for the normalised rg colour space instead of (h, s).
The covariance matrix is calculated in the same way as for the HSB colour space
by substituting r for h, g for s, r for h, and g for s. The absolute value of h is not
constrained when using the normalised rg colour space because this space does not
wrap around.
If (Chh Css − Chs Chs ) = 0 (which in practise is usually the case), the covariance
matrix is invertible, and the invers [2] is
−1 1 Css −Chs
C = (10)
Chh Css − Chs Chs −Chs Chh
This calculation is the same for the rg colour space using the appropriate chro-
maticity values and covariance matrix.
4 Face Detection
Face detection can be considered as part of face recognition implementation. Lit-
erature shows many researches have been conducted in face detection area that
have been reported in survey papers [11, 21]. Skin colour has been used in research
as a preprocessing step in face detection. Many methods have been developed and
reported in the literature that use skin colour to detect skin and skin-like region
in digital image.
Our approach in skin detection has been implemented in three colour spaces,
normalized rg, HSB and YCbCr colour spaces. Figure 2 shows the schematic
approach of our proposed face detection based on the skin colour representation.
Setiawan Hadi, Adang Suwandi A., Iping Supriana S., Farid Wazdi
Training Images
Skin model
generation Input Image
Skin colour
Detection (Image
distribution in
Matching)
chrominant space
Detection result
1 1 1 1
Mk = T1 + T2 + · · · + Tn−1 + Tn (12)
δ1 δ2 δn−1 δn
Mk is skin model-k, meanwhile Ti is tripixel RGBof skin image-i (training image).
δi is parameter is interval between 1 and n. If δi = n the process is averaging.
The amout of training image is presented by n.
Images that will be used as training images are segmented and cropped semi-
manually. Figure 3 and figure 4 illustrated sample images before segmentation
and the result of segmentation. Figure 5 show combined images of segmented
images and their statistical measurement characteristics (mean chromaticities) and
visualization in histogram.
Figure 6 shows distribution of skin color in an image for every colour space. It is
clearly seen that skin cluster is located in a small area or region (the white small
region) of the whole skin distribution (the black large region).
MATHEMATICAL MODEL OF SKIN COLOUR FOR FACE DETECTION
To localize face-only image, two morphological filters are utilized. First, Erosion
filter, which is mainly used to remove skin-like detected pixels that can be con-
sidered as noise. After image is cleaned, we have to compact the image, by filling
the holes in image using dilation filter. The result of this implementation of two
filters are image that has clear and compact representation. Detail description on
mathematical foundation and its practical implementation of these filters can be
found a lot in literatures. After face can be localized, a 4-neighbourhood ellipse
generator algorithm is implemented to mark the face region. Figure 7 shows step
by step our proposed face detection.
5 Result of experiment
Experiment has been conducted using several face databases that have been col-
lected in various ways. FDB-08 is obtained officially from FERET face database
NIST which consists of two DVD-ROM (10 Gigabytes); for this research we just
use small number of pictures. FDB-02 was created using 3.3 megapixels digital
camera Minolta S304, consists of single photograph of academic and administra-
tive staffs of Mathematics Department UNPAD. FDB-07 is set of face images
which have been taken from extension student candidates of UNPAD using Fuji
3.3 megapixels MPIX digital camera. Other database sets have been collected from
various multimedia resources and internet. Table 1 shows the detail specification
of databases used in the experiment.
MATHEMATICAL MODEL OF SKIN COLOUR FOR FACE DETECTION
The goal of this experiment is to measure the detection performance of our pro-
posed face detection algorithm. In this report, we use simple qualitative perfor-
mance measurement by using human-eye visual examination. The referenced skin
model was generated from FDB-02 face database (see figure 7). We define the
result into two categories, (i) the target face is in ellipse and (ii) target face is
outside the ellipse. The result can be shown in table 2. In advance measurement,
a face detection system system makes two types of errors [1]: (i) mistaking mea-
surement of non face region which is detected as face (called false match or false
accept), and (ii) mistaking in measurement of a face region which is not detected
as face (called false non-match or false reject). There is a trade-off between false
match rate (FMR) and false non-match rate (FNMR) in every face detection sys-
tem. In fact, both FMR and FNMR are functions of the system threshold t ; if t
is decreased to make the system more tolerant to input variations and noise, then
FMR increases. On the other hand, if t is raised to make the system more secure,
then FNMR increases accordingly. The system performance at all the operating
points (thresholds, t ) can be depicted in the form of a Receiver Operating Char-
acteristic (ROC) curve.
Setiawan Hadi, Adang Suwandi A., Iping Supriana S., Farid Wazdi
6 Concluding Remarks
We have presented the theoretical background of mathematical skin colour mod-
elling and its practical implementation in the area of face detection. The proposed
approach utilizes of a skin-color detector to detect the skin region, as the first step
(initial) detection. To localize the face region, morphological filters, erosion and
dilation, are used, conjuncted with 4-neigbourhood ellipse generation algorithm.
Experiment has been performed in three colour spaces using more than 1 Giga-
bytes data of face databases.
It is shown that the result was not very accurate in general. This problem arised
due to the use of only one skin model (from FDB-02) which perhaps not appro-
priate for other face database sets. Nonetheless, the future research will involve
the use of other techniques to enhance and assist in face localization and also to
perform face tracking such as: detection of symmetricity and skewness of faces(by
using feature point detection), multiple face detection (using clustering), general
skin detector generation , non frontal face detection, advance measurement of face
detection accuracy using ROC curve, interactive detection of face(s), 3D genera-
tion of detected face(s), and other enhancement.
References
[1] Anil K. Jain, Arun Ross and Salil Prabhakar. An Introduction to Biometric
Recognition. IEEE Transactions on Circuits and Systems for Video Technol-
ogy, vol. 14, no. 1, pp. 4–20, Jan 2004.
[2] Anton, H. Elementary Linear Algebra. 4th ed. John Wiley & Sons, Inc, New
York, USA, 1984.
[5] Hunke, M. and Waibel, A. Face locating and tracking for human computer
interaction. In Proceedings of the 28th Asilomar Conference on Signals, Sys-
tems & Computers, Nov 1994.
[6] Jones, M. J. and Rehg, J. M. Statistical color models with application to skin
detection. Tech. Rep. CRL-98/11, Compaq - Cambridge Research Laboratory,
Dec 1998.
[8] Jordao L., Perrone M., Costeira J. P. and Santos-Victor J. Active face and
feature tracking. In Proceedings of the 10th International Conference on Im-
age Analysis and Processing, Sep 1999.
[9] Kim, S.-H. and Kim, H.-G. Face detection using multi-modal information.
In Proceedings of the 4th IEEE International Conference on Automatic Face
and Gesture Recognition, pp. 14–19, Mar 2000.
[12] David Thomas John O’Mara. Automated Facial Metrology. PhD Dissertaion
Univ. of Western Australia, Feb 2002.
[14] Raja Y., McKenna S. J. and Gong S. Segmentation and tracking using colour
mixture models. In Proceedings of the Asian Conference on Computer Vision,
vol. 1 607–614, 1998.
[15] Raja Y., McKenna S. J. and Gong S. Tracking and segmenting people in
varying lighting conditions using colour. In Proceedings of the 3rd IEEE
International Conference on Automatic Face and Gesture Recognition, pp.
228–233, Apr 1998.
[17] Schmid, P. Segmentation & symmetry measure for image analysis: Applica-
tion to digital dermatoscopy. PhD thesis, École Polytechnique Fédérale de
Lausanne, 1999.
[18] Mariań Sedlaćek. Evaluation of RGB and HSV models in Human Faces De-
tection. Slovak University of Technology.
[20] Terrillon J., David M. and Akamatsu S. Detection of human faces in complex
scene images by use of a skin color model and of invariant Fourier-Mellin
moments. In Proceedings of the 14th International Conference on Pattern
Recognition, vol. 2 1350–1355, Aug 1998.
Setiawan Hadi, Adang Suwandi A., Iping Supriana S., Farid Wazdi