Hand Gesture Recognition Based On Digital Image Processing Using MATLAB
Hand Gesture Recognition Based On Digital Image Processing Using MATLAB
ISSN 2229-5518
Abstract - This research work presents a prototype system that helps to recognize hand gesture to normal people in order to
communicate more effectively with the special people. Aforesaid research work focuses on the problem of gesture recognition
in real time that sign language used by the community of deaf people. The problem addressed is based on Digital Image
Processing using Color Segmentation, Skin Detection, Image Segmentation, Image Filtering, and Template Matching
techniques. This system recognizes gestures of ASL (American Sign Language) including the alphabet and a subset of its
words.
Index Terms— Hand Gesture Recognition, Digital Image Processing, Skin Detection, Image Segmentation,
Image Filtering, Template Matching technique.
—————————— ——————————
1. Introduction
Communication is a Latin word derived from The gesture recognition method is divided into
SCIO means to share. Communication means to two major categories a) vision based method b)
share thoughts, messages, knowledge or any glove based method. In glove based systems data
information. Since ages communication is the gloves are used to achieve the accurate positions
tool of exchange of information through oral, of the hand sign though, using data gloves has
writing, visuals signs or behaviour. The become a better approach than vision based
communication cycle consider to be completed method as the user has the flexibility of moving
once the message is received by a receiver and the hand around freely.
recognizes the message of the sender. Ordinary
people communicate their thoughts through There are many possible vision based methods
speech to others, whereas the hearing impaired are available. Above all, Byong K. Ko and H. S.
community the means of communication is the Yang developed a finger mouse system that
use of sign language. enables a signer to specify commands with the
fingers as in [2]. Apart from that, there are other
Around 500,000 to 2,000,000 speech and hearing different methods available such as colored
impaired people express their thought through hand-glove based method, Neural Network and
Sign Language in their daily communication [1]. PCA as in [3] to [5] etc.
These numbers may diverge from other sources
but it is most popular as mentioned that the ASL Though, implementation of Neural Network is
is the 3rd most-used sign language in the world. very simple, but it is used to be over-trained on
such a limited training sample particularly
obstructed gesture sign also may cause a
2. Objective
problem. In these circumstances, it is very
This research work focuses on the problem of
difficult to predict the response of a neural
gesture recognition in real time that sign
network. Also the Neural Network can
language used by the community of deaf people.
potentially create erroneous results due to
Research problem identified is based on Digital
environment variation. In the other hand PCA,
Image Processing using Color Segmentation,
due to the very limited training set. PCA faces
Skin Detection, Image Segmentation, Image
the same problem of over-specification of the
Filtering, and Template Matching techniques.
gesture sign as well as may involve lowering the
This system recognizes gestures of ASL
dimensionality of the image.
including the alphabet and a subset of its words.
The main goal of this research paper is to
———————————————— demonstrate that how a good performance can
Author Tahir Khan has accomplished his Masters of Philosophy be achieved without using any special hardware
program in Computer Science from Iqra University, Karachi,
Pakistan. equipment, so that such a system can be
E-mail: [email protected] implemented and easily used in real life.
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 9, September 2015 339
ISSN 2229-5518
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 9, September 2015 340
ISSN 2229-5518
the signer to capture the image of the hand Though, there is no any common theory
gestures of the signer. available for color image segmentation up till
now. The color image segmentation methods all
7. Image Processing Steps we have are yet, either by nature or ad hoc basis.
To satisfy and reduce the computational effort The color segmentation approaches are
needed for the processing, pre-processing of the dependent on the application , there are no any
image taken from the camera is highly common algorithms which is considered the best
important. Apart from that, numerous factors for color image segmentation. The color image
such as lights, environment, background of the segmentation is a psychophysical perception,
image, hand and body position and orientation since it is very essential to have pre-knowledge
of the signer, parameters and focus the of camera of mathematical solutions about the image
impact the result dramatically. information.
The main purpose of Color segmentation is to
8. Color Segmentation find particular objects for example lines, curves,
Color in an image is apparent by human eyes as etc in images. In this process every pixel is
a combination of R(red), G(green) and B(blue), assigned in an image in such a way that pixels
these three colors i.e Red, Green and Blue are with the same label share certain visual
known as three primary colors. Other kinds of characteristics.
color components can be derived from R,G,B
color represented by either linear or nonlinear The goal of color segmentation in this research
transformations. work is to simplify and increase the ability of
separation between skin and non-skin, and also
The RGB color components represent the decrease the ability of separation among skin
incoming light, that is the brightness values of tone.
the image that can be obtained through (Red,
Green and Blue filters) i.e RGB filters based on 9. Skin Detection
the following equations: There are several techniques used for color space
transformation for skin detection. Some potential
color spaces that are considerable for skin
detection process are:
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 9, September 2015 341
ISSN 2229-5518
between the blue component and a reference After the skin detection, image marked with Blue
value, whereas component Cr is the difference color converted into the binary with skin pixels
between the red component and a reference as '1' and rest are “0”. So that, the correlation of
value [8]. the image can be matched with the Template,
height = size(inputImage,1)/1.5;
width = size(inputImage,2)/2;
imcrop(inputImage,[0 0 width height]);
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 9, September 2015 342
ISSN 2229-5518
1. Spatial Filtering
2. Linear Filtering
12. Implementation
Figure 10: Template Image T(xt, yt)
The Template Matching cross-correlation
involves simply multiplying together
corresponding pixels of the signer image, here is
called the Target image and the Template and
then summing the result.
Template Matching is implemented by the
following method:
First, select a part of the search image
that can be used as image template:
called the search image. i.e S(x, y),
where S represents Search Image, x and
y represent the coordinates of each pixel
in the search image.
The template T(xt, yt), where T
represents Template, xt and yt represent
the coordinates of each pixel in the
template.
Then the center of the template T(xt, yt)
moves over each x and y point in the
search image. And then sum up the
products between the coefficients in
Search Image S(x, y) and the Template Figure 11: Result: the output of the Convolution
T(xt, yt) over the complete area of the
Cross-correlation is used to compare the
target image.
intensities of the pixels using template matching
The search image considers all the
to handle the translation issue on the signer
position of the template.
image.
The largest value of the position is
considered the best position of the For our hand gesture recognize application in
object. which the brightness of the input image of the
signer can vary due to the various environmental
condition like lighting sensitivity, background
color and condition, electric or magnetic fields or
any other disturbance and exposure conditions
of the signer, the images has to be first
normalized. The norma-lization has to be done at
every step by subtracting the mean and dividing
Figure 9: Search Image S(x y) by the standard deviation. That algorithm is
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 9, September 2015 343
ISSN 2229-5518
called the cross-correlation of a template and transforms. Or we can say, in time domain,
represented as follow: convolution is point-wise multiplication in
frequency domain
{ f * g}= {f} . {g}
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 9, September 2015 344
ISSN 2229-5518
alphabets. Table 1 represents result of algorithm MATLAB code for skin detection
presented using the code in MATLAB. The
algorithm can detect all the alphabets from A to Filename: generate_skintone.m
Z with 100% recognition rate if the signer
function [out bin] = generate_skintone(inputimage)
supplies the correct sign.
%GENERATE_SKINTONE Produce a skinmap of
an inputimage. Highlights patches of %skin" like
pixels. Can be used in , gesture recognition,
.
if nargin > 1 | nargin < 1
error(generate_skinmap(inputimage)');
end;
function_out = grayworld(input_image)
%Color Balancing
% input_image- 24 bit RGB Image
% result - Color Balanced 24-bit RGB Image
%R,G,B components
R = input_image(:,:,1);
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 9, September 2015 345
ISSN 2229-5518
IJSER © 2015
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 6, Issue 9, September 2015 346
ISSN 2229-5518
IJSER © 2015
http://www.ijser.org