Voici 

Prezi AI.

Votre nouvel assistant de présentation.

Affinez, améliorez et adaptez votre contenu, trouvez des images pertinentes et éditez des visuels plus rapidement que jamais.

Chargement du contenu...
Chargement...
Transcription

Object Detection

Motion Detection

Hand Gesture Recognition

  • Blob counter : Find the maximum object Using the max object

  • Move Toward Filter - Adaptive background :

filter slightly changes an image in a direction to make a smaller difference with the second provided image (save CPU time ).

1) Detecting the motion : Catches the moment when the object stops , then Do gesture !

2) check if the same gesture can be recognized in several frames : it may not want the system to gesture it , maybe its just moving.

3) We have counter that counts the amount of consequent frame without motion.

  • Straight Raised : high and thin peak.
  • Diagonal up: peak shifted to the beginning of histogram.
  • Diagonal down: peak shifted to the center.

Objectives .. ?!

  • 15 gestures which are a combination of four different positions of two hands – hand is not raised, raised diagonally down, diagonally up, or raised straight

When a hands gesture is detected, the application could perform different actions depending on the type of the gesture, such as controlling some sore of device or another application sending different commands to it depending on the recognized gesture.

  • Object should occupies the entire image not part of it .
  • we used AForge.NET framework
  • Accuracy 80%

Related Works

  • Appearance-based models’
  • 3D model-based algorithms:

Three dimensional hand model based approaches rely on the 3D kinematic hand model,and try to estimate the hand parameters by comparison between the input images and the possible 2D appearance projected by the 3D hand model

use image features to model the visual appearance of the hand and compare these parameters with the extracted image features from the video input

  • look for skin coloured regions in the image

drawbacks:

  • skin colour detection is very sensitive to lighting conditions

disadvantages:

  • very computational intensive
  • sensitive to noise

Threshold + Opening Filter

background modeling

approach + Difference

Filter

Initial back ground without any moving object

// check background frame

if ( backgroundFrame == null )

{

// save image dimension

width = image.Width;

height = image.Height;

frameSize = width * height;

  // create initial backgroung image

backgroundFrame = grayscaleFilter.Apply( image );

return;

}

Threshold Filter : each pixel may be classified as a significant change (most probably caused by a moving object) or as a non-significant change.

Opening filter : remove the noise

Use difference filter:  absolute difference between two images

// apply difference filter

Bitmap betweenFramesMotion = differenceFilter.Apply( currentFrame );

// apply threshold filter

thresholdFilter.ApplyInPlace( betweenFramesMotionData );

// apply opening filter to remove noise

openingFilter.ApplyInPlace( betweenFramesMotionData );

Hands Gesture Recognition !

Blob Counter

+ MoveTowards fiter

move towards filter

// if we have only small objects then let's adopt to changes in the scene

if ( ( maxObject.Rectangle.Width < 20 ) || ( maxObject.Rectangle.Height < 20 ) )

{

// move background towards current frame

moveTowardsFilter.OverlayImage = currentFrame;

moveTowardsFilter.ApplyInPlace( backgroundFrame );

}

// process blobs

blobCounter.ProcessImage( motionObjectsData );

Blob[] blobs = blobCounter.GetObjectInformation( );

int maxSize = 0;

Blob maxObject = new Blob( 0, new Rectangle( 0, 0, 0, 0 ) );

// find the biggest blob

if ( blobs != null )

{

foreach ( Blob blob in blobs )

{

int blobSize = blob.Rectangle.Width * blob.Rectangle.Height;

if ( blobSize > maxSize )

{

maxSize = blobSize;

maxObject = blob;

}

}

}

  • Based on histograms and statistics :

  • (horizontal histogram and vertical histogram) :

provides information about vertical distribution of pixel intensities

Horizontal Histogram :

1)to find areas of the image which are occupied by hands, and the area, which is occupied by the torso.

2)that the human hand thickness can never exceed 30% percent of the human body height

// get statistics about horizontal pixels distribution

HorizontalIntensityStatistics his =

new HorizontalIntensityStatistics( bodyImageData );

int[] hisValues = (int[]) his.Gray.Values.Clone( );

// build map of hands (0) and torso (1)

double torsoLimit = torsoCoefficient * bodyHeight;

// torsoCoefficient = 0.3

for ( int i = 0; i < bodyWidth; i++ )

{

hisValues[i] = ( (double) hisValues[i] / 255 > torsoLimit ) ? 1 : 0;

}

3) If he two hands are not raised then

there will be no thickness for the

hands, and will not be considered as

one of the gestures

Our Added Value

// get hands' length

int leftHand = 0;

while ( ( hisValues[leftHand] == 0 ) && ( leftHand < bodyWidth ) )

leftHand++;

int rightHand = bodyWidth - 1;

while ( ( hisValues[rightHand] == 0 ) && ( rightHand > 0 ) )

rightHand--;

rightHand = bodyWidth - ( rightHand + 1 );

// get torso's width

int torsoWidth = bodyWidth - leftHand - rightHand;

// process left hand

if ( ( (double) leftHand / torsoWidth ) >= handsMinProportion )

{

// hand is raised

}

else

{

// hand is not raised

}

  • Deal with shadows : for example if there is a hand shadow, it can be removed by walking through the histogram(vertical) and removing all peaks which are not the highest peak.

  • Handling of dynamic scenes, where different kinds of motions may occur behind the main object.

Vertical Histogram : recognizing the

exact hand position when it is raised

the class will be applied not to the

entire object’s image, but only

the hand’s image.

if ( ( (double) handImage.Width / ( histogram.Max -

histogram.Min + 1 ) ) > minStraightHandProportion )

{

handPosition = HandPosition.RaisedStraigh;

}

else

{

// processing of diagonaly raised hand

}

// processing of diagonaly raised ::

if ( ( (double) histogram.Min / ( histogram.Max - histogram.Min + 1 ) ) <

maxRaisedUpHandProportion )

{

handPosition = HandPosition.RaisedDiagonallyUp;

}

else

{

handPosition = HandPosition.RaisedDiagonallyDown;

}

Apprenez-en plus sur la création de présentations dynamiques et engageantes avec Prezi