Hand Gesturevrecognization Seminar

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 37

HAND GESTURE RECOGNITION BASED

ON CONVEXITY APPROACH AND


BACKGROUND SUBTRACTION
BY: AISHWARYA S. HUNDEKAR
2KL18SCS01
WHAT IS GESTURE?
 Most natural mode of communication

 Gestures may be specified as the physical actions wrought


by humans that transmit some meaningful information.

 In Human Computer Interaction (HCI), using gestures


communication is simple and natural as compare to
graphical user interface as keyboards, computer mice, and
touch screens.
GENERALLY, THE PROCESS OF HAND GESTURE
RECOGNIZATION CAN BE DIVIDED INTO FOUR STAGES

sample image identification


feature parameters
images pre- analysis extraction,
capturing processing classification and
recognition
BACKGROUND SUBTRACTION
 Background subtraction is a common and widely used
technique for generating a foreground mask by using static
cameras.
 BS calculates the foreground mask performing a subtraction
between the current frame and a background model,
containing the static part of the scene.
 Fundamental logic for detecting moving objects from the
difference between the current frame and a reference
frame, called “background image” and this method is known
as FRAME DIFFERENCE METHOD.
 Background is estimated to be the previous frame.
Background subtraction equation then becomes:
B(x ,y ,t) = I (x ,y ,t-1)

I (x, y, t) – I (x, y, t – 1) > Th



THRESHOLDING:

• The key parameter in the thresholding process is the choice of the threshold
value.
• Several different methods for choosing a threshold exist,
– Users can manually choose a threshold value, or
– A thresholding algorithm can compute a value automatically, which is known as
automatic thresholding.
FRAME DIFFERENCING
INTRODUCTION TO GAUSSIANS:
• Each pixel is characterized by its intensity in the RGB color space.
• The probability of observing the current pixel value is considered given by
the following formula

• Gaussian probability density function:

K determined by the available memory and computational power. Stauffer and Grimson
proposed to set K from 3 to 5
MIXTURE OF GAUSSIANS:

• Alternate method for background substraction.


• the MoG method tracks multiple Gaussian distributions simultaneously.
• MoG maintains a density function for each pixel.
• Since MoG is parametric, the model parameters can be adaptively updated without
keeping a large buffer of video frames.
• the pixel posses of a pixel Z
that is the set of the last t values at the pixel ie
{Z0 , Z1 , ..., Zt−1}
GAUSSIAN MIXTURE MODEL (GMM)

• A GMM is a mixture pdf which is a linear


combination of K Gaussian pdfs.

• sum of wi = 1

• each pixel is given one GMM


CONVEXITY APPROACH:

• The convexity detection comprises the following steps:


1. filtering the depth image using erode and dilate approaches,
2. extracting hand contours,
3. approximating the hand contour with a polygon,
4. detecting concave and convex points of the approximation polygon,
5. Then filtering convex and concave point.
DILATION:

• In dilation, a small image called structuring element is used as a local


maximum operator. As the structuring element is scanned over the image, we
compute the maximal pixel value overlapped by SE and replace the image
pixel under the anchor point with that maximal value.

• Dilation gradually enlarges the boundaries of regions of foreground pixels.


Thus areas of foreground regions grow in size while holes within those regions
become smaller.
EXAMPLE FOR DILATION:
EROSION:

• Erosion is the converse of dilation.


• The action of the erosion operator is equivalent to computing a local minimum
over the area of the kernel.
• As the kernel is scanned over the image, we compute the minimal pixel value
overlapped by SE and replace the image pixel under the anchor point with
that minimal value.
EXAMPLE FOR EROSION
EXTRACTING HAND CONTOUR:

• The contour of hand is a series of points which are the boundary pixels of the
hand area.
• After obtaining the contour, the gesture and its
shape then can be detected and recognized by
using contours analysis
Here we use Canny edge detection method to
extract the contour of hand gesture
CANNY EDGE DETECTION ALGORITHM:

The Canny edge detection algorithm is composed of 5 steps:


• Noise reduction;
• Gradient calculation;
• Non-maximum suppression;
• Double threshold;
• Edge Tracking by Hysteresis.
NOISE REDUCTION:

• Edge detection results are highly sensitive to image noise.


• Apply Gaussian blur to smoothen the image.
• To do so, image convolution technique is applied with a Gaussian Kernel.
• The kernel size depends on the expected blurring effect. Basically, the
smallest the kernel, the less visible is the blur.
GRADIENT CALCULATION:
• The Gradient calculation step detects the edge intensity and direction by
calculating the gradient of the image.
• Edges correspond to a change of pixels’ intensity.
• To detect it, the easiest way is to apply filters that highlight this intensity
change in both directions: horizontal (x) and vertical (y)
• When the image is smoothed, the derivatives Ix and Iy w.r.t. x and y are
calculated.
• It can be implemented by convolving I with Sobel kernels Kx and Ky,
respectively;

• Then, the magnitude G and the slope θ of the gradient are calculated as
follow:
NON-MAXIMUM SUPPRESSION

• Ideally, the final image should have thin edges.


• Thus, we must perform non-maximum suppression to thin out the edges.
• The principle is simple: the algorithm goes through all the points on the
gradient intensity matrix and finds the pixels with the maximum value in the
edge directions.
DOUBLE THRESHOLD:
EDGE TRACKING BY HYSTERESIS:
CONVEX HULL:

• The convex hull of hand gesture contour is the convex polygon surrounded by
all the convex vertices in gesture contour,
CONVEXITY DEFECTS:

• The convex defect is defined as the difference between gesture convex hull and
contour.
• The convex defect is defined as the difference
between gesture convex hull and contour.
• The data structure of each of the convex
defects contains three components:
start contour point, end contour point and
concave contour point.
• Therefore, it is possible to detect the fingertips by using hand gesture contour
and convex defects.
• The count and position of fingertips can be determined as following:
1) Conduct noise elimination on the obtained convex defects.
Based on the physiological structure of human hand and large numbers of experiments,

it is appropriate to define the depth minimum and maximum threshold as big as

the 1/5 and 1/2 of the height of hand gesture contour respectively, and the height of

hand gesture contour is defined as the length of the quadrilateral formed by points

composed of the co-ordinates.

2) Scan filtered convex defects clockwise, take the start contour point of the first convex defect and the end contour point
of the last convex defect as the first and last fingertip respectively.

3) Take use of the average position of the end contour point of current convex defect and the start contour point of next
convex defect as the position of current fingertip.
FEATURES EXTRACTION
• The tightness of hand gesture contour to its convex hull is defined as the gesture
convexity, which is denoted by δ, its value is the area ratio of gesture contour and
convex hull.

• Where, hullArea is the area of convex hull, contourArea is the area of gesture
contour.
• we can get according to the image that hullArea > contourArea, so δ ϵ (0,1), and the
bigger the value, the tighter the gesture contour to convex hull.
RELATIVE ANGLES OF FINGERS:
• Different gestures can be distinguished by the relative position of fingertips,
which is composed of two values of α and β.
• α is the summation of angles with centroid as vertex, lines from centroid to the
first fingertip and other fingertips as edges, and β is the value of the angle
with centroid as vertex, lines from centroid to the first fingertip and last
fingertip as edges
RESULTS AND CONCLUSION

You might also like