Face Detection Using Template Matching
Face Detection Using Template Matching
blink together and symmetrically positioned, which eliminates similar motions in the
video. Each image is subtracted from the previous image.
The difference image will show boundaries of moved pixels. If the eyes happen to be
blinking, there will be a small boundary within the face. A face model can contain the
appearance, shape, and motion of faces. There are several shapes of faces. Some common
ones are oval, rectangle, round, square, heart, and triangle. Motions include, but not
limited to, blinking, raised eyebrows, flared nostrils, wrinkled forehead, and opened
mouth. The face models will not be able to represent any person making any expression,
but the technique does result in an acceptable degree of accuracy. The models are passed
over the image to find faces, however this technique works better with face tracking.
Once the face is detected, the model is laid over the face and the system is able to track
face movements. A method for human face detection from color videos or images is to
combine various methods of detecting color, shape, and texture. First, use a skin color
model to single out objects of that color. Next, use face models to eliminate false
detections from the color models and to extract facial features such as eyes, nose, and
mouth.
Applications
Face detection is used in biometrics, often as a part of (or together with) a facial
recognition system. It is also used in video surveillance, human computer interface and
image database management. Some recent digital cameras use face detection for
autofocus. Face detection is also useful for selecting regions of interest in photo
slideshows that use a pan-and-scale Ken Burns effect. Face detection is gaining the
interest of marketers. A webcam can be integrated into a television and detect any face
that walks by. The system then calculates the race, gender, and age range of the face.
Once the information is collected, a series of advertisements can be played that is specific
toward the detected race/gender/age. Face detection is also being researched in the area of
energy conservation. Televisions and computers can save energy by reducing the
brightness. People tend to watch TV while doing other tasks and not focused 100% on the
screen. The TV brightness stays the same level unless the user lowers it manually. The
system can recognize the face direction of the TV user. When the user is not looking at
the screen, the TV brightness is lowered. When the face returns to the screen, the
brightness is increased.
Template Matching
Here, we present an original template based on edge direction. It has been noticed that the
contour of a human head can be approximated by an ellipse. This accords with our visual
perception and has been verified by numerous experiments. The existing methods have
not sufficiently used the global information of face images in which edge direction is a
crucial part, so we present a deformable template based on the edge information to match
the face contour.
The face contour is of course not a perfect ellipse. To achieve good performance, the
template must tolerate some deviations.
In this paper, an elliptical ring is used as the template as illustrated in Fig. Fig. 2.1.5(a) is
a normal upright face; 2.1.5(b) is the binary image after edge linking. In 2.1.5(b), we can
note that the external contour cannot be represented by a single ellipse no matter how the
parameters are adjusted. However, if we use an elliptical ring representing the contour as
shown in Fig. 2.1.5(c), almost all the edge points on the contour can be included. The
other important advantage of this template is that we can choose a relatively big step in
matching so as to reduce the computational cost.
the image intensity function) is at each image point a 2D vector with the components
given by the derivatives in the horizontal and vertical directions. At each image point, the
gradient vector points in the direction of largest possible intensity increase, and the length
of the gradient vector corresponds to the rate of change in that direction. This implies that
the result of the Sobel operator at an image point which is in a region of constant image
intensity is a zero vector and at a point on an edge is a vector which points across the
edge, from brighter to darker values.
Thresholding
Thresholding is the simplest method of image segmentation. From a grayscale image,
thresholding can be used to create binary images. During the thresholding process,
individual pixels in an image are marked as "object" pixels if their value is greater than
some threshold value (assuming an object to be brighter than the background) and as
"background" pixels otherwise. This convention is known as threshold above. Variants
include threshold below, which is opposite of threshold above; threshold inside, where a
pixel is labeled "object" if its value is between two thresholds; and threshold outside,
which is the opposite of threshold inside. Typically, an object pixel is given a value of
1 while a background pixel is given a value of 0. Finally, a binary image is created
by coloring each pixel white or black, depending on a pixel's labels. We have taken the
threshold value as 55. Above this value, we make all pixels 255 and below the threshold
value we make all pixels values 0.
Highlights of the Project
We have demonstrated the effectiveness of a new face detection algorithm in the images
with simple. The algorithm is able to correctly detect all faces in the images with simple
backgrounds. We are planning to test the method over a larger set of images; also over
images, that don't contain faces. Such tests should help to detect weak points of the
algorithm and consequently give directions for algorithm upgrade. We intend to extend
the algorithm for multiface detection. First, the number of faces should be known before
the detection. Second, we assume that faces do not overlap each other in images.
System Specification
The hardware and software requirements for the development phase of our project are:
Software Requirements :
OPERATING SYSTEM : Windows 07/ XP Professional
FRONT END : Visual Studio 2010
BACK END : SQL SERVER 2005
Hardware Requirements :
PROCESSOR : PENTIUM IV 2.6 GHz, Intel Core 2 Duo.
RAM : 512 MB DD RAM
HARD DISK : 40 GB
KEYBOARD : STANDARD 102 KEY
MONITOR : 15 COLOUR
CD DRIVE : LG 52x