Voici
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.
Recherches à la une
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.
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.
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
drawbacks:
disadvantages:
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 );
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;
}
}
}
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
// 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
}
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;
}