Real Time Finger Tracking and Contour Detection For Gesture Recognition Using Opencv
Real Time Finger Tracking and Contour Detection For Gesture Recognition Using Opencv
Abstract—Gestures are important for communicating For a successful communication, a sender and a receiver must
information among the human. Nowadays new technologies of have the similar information for a particular gesture.
Human Computer Interaction (HCI) are being developed to There are two approaches which are commonly used to
deliver user's command to the robots. Users can interact with interpret gestures for Human Computer Interaction, which are
machines through hand, head, facial expressions, voice and specified as below:
touch. The objective of this paper is to use one of the important
modes of interaction i.e. hand gestures to control the robot or for A. Data Gloves based Method :
offices and household applications. Hand gesture detection
algorithms are based on various machine learning methods such In this method user had to wear gloves, helmet & other
as neural networks, support vector machine, and Adaptive heavy apparatus. For detecting hand gesture some optical or
Boosting (AdaBoost). Among these methods, AdaBoost based mechanical sensors, actuator & accelerometer are attached
hand-pose detectors are trained with a reduced Haar-like feature with the glove [2]. That equipment converts finger flexions
set to make the detector robust. The corresponding context-free into electrical signals for determining the hand posture. In this
grammar based proposed method gives effective real time approach user had to carry a load of cables which were
performance with great accuracy and robustness for more than difficult to manage in real time environment. This method
four hand gestures. Rectangles are creating some problem due to demands more maintenance due to the complex wired
that we have also implement the alternate representation method structures which is shown in figure 1.
for same gestures i.e. fingertip detection using convex hull
algorithm.
975
the linear combination with the strength that is proportional to finger triangle should be more or less same, thus we can find
the resulting accuracy. So the training sample weights are out number of location of tip of finger. Here AdaBoost
updated i.e. training samples that are missed by the previous algorithm and Haar like feature set algorithm are adopted for
classifier are boosted in accordance. The next classification hand detection and recognition. But when we combine every
stage must achieve better accuracy for these misclassified gesture in same program, it get mixed and create confusion for
training samples so that the error can be reduced. By this real world hardware. So we have changed the representation
procedure we can improve the overall classification accuracy way of rectangle & do it with fingertip by connecting lines for
at further stage. The iteration goes on by adding new clear visibility. This experiment we developed on open source
classifiers to the linear combination until the overall accuracy library for computer vision application called Open Computer
meets to the required level. At the final level the result is a Vision Library (OpenCV).
strong classifier composed of a cascade of the selected week
classifiers. IV. SOFTWARE IMPLEMENTATION
In Convex Hull algorithm first step is segmentation of the The OpenCV library is basically used in HCI, robotics,
hand image that contains the hand to be located. In order to biometrics, image processing and other areas where
make this process it is possible to use shapes, but they can be visualization is important and includes an implementation of
changed greatly in interval that hand moves naturally. So, we Haar classifier detection and training [4][5]. To train our own
select skin-color to get characteristic of hand. The skin-color classifiers, two set of images are required. One set which
is a distinctive cue of hands and it is invariant to scale and referred as the negative images that contains an image or
rotation [8]. In the next step we use the estimated hand state to scene which does not contain the interested object. In this case
extract several hand features to define a deterministic process the hand gesture feature that look exactly like the positive one,
of finger recognition. After the hand is segmented from the except those containing same hand gesture. The other set of
background, a counter is extracted. The counter vector images are positive images where they look exactly like the
contains the series of coordinates of edges of hand. Then the object which we want to detect. It is also important that they
processing of counter vector gives the location of the finger should be different in lighting and background. In our
tip. implementation, two hand postures are tested the “palm”
posture and the “fist” posture. The camera that was used for
the video input is a low-cost Web camera of laptop. This Web
camera provides video capture with a maximum resolution of
640 ˣ 480 up to 15 frames/s. The experiments are implemented
with natural fluorescent lighting conditions. We collected 480
and 420 positive samples with different scales for the palm
posture and the fist posture respectively and 500 random
images for negative samples. In order to increase the
robustness of the final classifier, the original positive set of
images needs to be represented by different human hand in
different color and size. After all of the positive and negative
samples are ready, we set the required false alarm rate at 1 x
10-6 to terminate the training process which means that the
accuracy of the classifier will meet to the requirement.
V. RESULT & CONCLUSION
As a first step we try the face detection based on available
database of OpenCV. Then for capturing live streaming of
camera the initialization has been done. The two gesture
Fig 4: Flow of Methodology for finger counter detection like palm and fist by green rectangle which is trained
by integral images. The second step is the extracted image
In convex hull implementation firstly calculate the points with gestures which are compared with stored positive-negative
minimum and maximum x and y-coordinates and by joining integral image dataset and perform finger tip tracking by
these points a bounding rectangle is defined, within which the contour detection. All this requires analyzing the entire image
hull is contained. There will be other points of convexity too; with all present grammar. Using a 2.40 GHz intel® core™
we find the convex defects i.e. between each arm of hull. The processor Linux based OpenCV image processing software &
defect points are most likely to be the center of the finger Qt Creator IDE is used to analyze a 640 ˣ 480 image size, a
valleys [8]. Then find out the average of all these defects frame rate of 30 frames per second has achieved.
which is definitely bound to be in the center of palm, but it is
Fig.5 shows the detection of Fist and Palm gesture
very rough estimate so average out and finds this rough palm
respectively by using C++ programming language. Fig.6
center. Thus the radius of palm is an indication of depth of the
shows various finger gestures detected by proposed algorithm
palm using radius. The ratio of palm radius to the length of the
976
and also contain segmented image and Identified gestures. important feature and can be used to discriminate two different
Fig.7 shows the Finger tracking evaluation by multiple gesture.
experiment.
References
[1] Radhika Bhatt, Nikita Fernandes, Archana Dhage "Vision Based Hand
Gesture Recognition for Human Computer Interaction" University Of
Mumbai (IJESIT) Volume 2, Issue 3, May 2013
(c) Three finger (d) Four finger [3] Qing Chen Nicolas, D. Georganas, and Emil M. Petriu "Hand Gesture
Recognition Using Haar-Like Features And A Stochastic Context-Free
Grammar" IEEE ,Vol. 57, No. 8, August 2008
977