Real Time Face Detection
Real Time Face Detection
net/publication/257022696
CITATIONS READS
12 2,325
4 authors, including:
Mudassar Raza
COMSATS University Islamabad
132 PUBLICATIONS 3,070 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Removal of pectoral muscle for reducing the false positive rate in detection of breast cancer View project
All content following this page was uploaded by Muhammad Sharif on 30 May 2014.
Abstract: In this paper, the difficulty of face detection in real time scenario is considered and an appropriate solution is being
proposed for this problem. The proposed idea is to detect human face in color images. For this purpose, HSV color space is used in
the experiments to detect faces. The proposed algorithm detects face in a real time video in two steps. In the first step, it applies
statistical model to get H (Hue) and S (Saturation) ratios for skin region. Secondly, it applies these defined ratios for scene width and
height to get approximation of face location in an image with respect to the detected skin region. Finally, an eye template matching
algorithm is applied on the previous roughly detected skin region to verify the face from this region. The proposed model has been
tested in real time environment with fairly acceptable performance.
Keywords: Face, Detection, RGB, (Red, Green, Blue), HSV, (Hue, Saturation, Value) Skin.
2.1. Face Detection This proposed model has been tested and its results
Our proposed face detection system is mainly have been mentioned in results section.
comprised of two major steps. The initial step is to
h i , j 1 ( i , j h min i , j h max)
m, n
categorize the skin pixels. For classifying skin pixels, (1)
the equations are defined which satisfy the presence of where, ,h m in ,h m ax represent the hue value, minimum
skin in an image. The second step is to use the defined
and maximum threshold values for hue respectively.
global parameters for scene height and width for
( i , j s m in i , j s m ax) (2)
m, n
approximating the face region in an image. Then the s i , j 1
eye template matching is used to verify the face in an Where, p ,s m in ,s m ax represent the saturation value,
image.
minimum and maximum threshold values for
2.2. HSV Model and RGB to HSV saturation.
Low complicated but precise methods such as HSV h s (3)
modeling and color histogram are favored. To section
human skin areas from a consistent skin color model where, ө gives the resultant detected skin region.
that is flexible to various skin colors and to diverse Along with these HSV ratios the proposed algorithm
illumination conditions is required. The basic RGB also used the defined ratios of chromic blue and
color model is not appropriate for skin color chromic red which are as under:
classification because the triplet (R, G, B) represents Cb (xR) (xG) (xB) C (4)
not only color but also lighting which varies Cr (xR) (xG) (xB) C (5)
transversely the person‟s face due to the ambient Where, Cb and Cr represent chromic blue and chromic
illumination. HSV color model is a nonlinear red respectively. , , , , are conversion constants
renovation of the RGB color space. The HSV model is
user-oriented and is based on artist‟s philosophy of hue, from RGB to CbCr color space.
shade, and tone, with self-determining values for Hue, 2.4. Face Detection
Saturation, and Value, corresponding respectively to In this step the task is to detect face area in a
wavelength, excitation, and intensity. detected skin region. The skin region detected may be
rough up to some extent. As it is must to clean the skin
Black has HSV = (0, 0, 0). Thus the facial HSV
region for verifying face in this region, therefore, image
model of Africans is clustered about the source of the
cleaning on above results is applied using a defined
coordinate arrangement. Across the African continent,
global parameter „noise_face_max‟. It removes all
unassuming variations occur which do not leave
connected components (objects) from a binary image
significantly from this value. Most color pictures are
that have less than a defined number of pixels. Now
recorded as (R, G, B) triplets. Given a color distinct by
label the cleaned image. The proposed algorithm uses
(R, G, B) where R, G, and B are normalized to 0.0 to
defined ratios for scene height and width for searching
1.0, an equivalent (H, S, V) color is determined by the
a bounding box in an image. The bounding box must
following set of formulas. (Sandro et. al.)
GB
satisfy the conditions for height, width, portal and
0 MAX MIN * 60, ifR MAX landscape ratios for a suitable bounding box for face
detection. The proposed bounding box used in our
BR
H 2 * 60, ifG MAX
MAX MIN approach is of size 100x100. Then the proposed
R G algorithm applies region propping on the basis of
4 MAX MIN * 60, ifB MAX
labeled image and the characteristic of bounding box.
MAX MIN Next it calculates the length of a propped region. The
S ; V MAX
MAX length of a propped region tells the predicted number of
Considering MAX to be the maximum of the (R, G, B) faces in an image. The final step is to search all the
values and MIN the minimum values, the model is: faces in an image with the help of eye template
where H, S and V vary from 0.0-360 and 0.0-1.0 matching.
respectively. Traditional template matching approaches are
2.3. Skin Verification very slow. Since the proposed algorithm is being
Following mathematical model is proposed to designed for real time scenarios, therefore, timing is a
classify skin pixels in an image. The model uses the crucial factor in it. So, template matching is applied in
values as: frequency domain instead of using time domain
skin_color_H_min = 0.10; because in frequency domain both images must have
skin_color_H_max = 0.90; the same size for applying template matching. So a
skin_color_S_min = 0.30; resizing phenomenon is defined here for resizing an eye
skin_color_S_max = 0.99; template according to the parameters of bounding box
Real Time Face Detection 599
where, N e
( 2 i )/ N
is an Nth
root of unity, N=number of samples. Fig. 7 RGB skin Detected Fig. 8Morphological Filled image
For template matching a mathematical model Step 6: In this step, eye template matching for face
used is represented as under: detection is used. If the corelation is higher then 0.65
Tprows Tpcols then it satisfies the face otherwise it is a non face
SAD( x, y) Diff ( x i, y j, i, j)
i 0 j 0
(6) region. The template for eye and the detected
results are as follows:
face
Elliptical boundary
90% 20.9%
Model in CIE-xy [Lee and Yoo 2002]
Fig. 3 Choromic Red Element Fig. 4 Choromic Blue Elemen
Detected Detected Single Gaussian in
Step 4 : Following figure shows the result of combining CbCr [Lee and Yoo 2002] 90% 33.3%
all three regions/elements produced above and it gives Gaussian Mixture in IQ
90% 30.0%
the required skin region in binary format. [Lee and Yoo 2002]
M. SHARIF,et al., 600