only onle hand's gesture recognize

Aug 26, 2011 at 1:59 PM

this program is awesome.

and thanks for this code its of great use.

what i wanted to understand is the " Dynamic computation of the DTW matrix" in Dtw method of dtwgesturerecognition- what it dose .

I didn't understand it(sorry for that,bcoz event though it is very simple).

i wanted my program to understand and check only right hand's gesture not whole upper body's joints.

i commented out the points in Skeleton2ddataextract and reduced the size of point(p) to 3 but i get exception in Dtw() method.

can you help me in this.....

thanks in advance...

Aug 26, 2011 at 6:41 PM
Edited Aug 29, 2011 at 8:38 AM

Well, if I can find the time, I'll try to write a real explanation of the program algorithm.

And I might also post a new version that would only compute a dtw distance on specific joints. Not sure yet.


If you wan't to just check the right hand, you can do this :

In the DTW class, create this method. It is a distance that will only consider the right hand.


private double DistRightHand(double[] a, double[] b)
            double d = 0;
            for (int i = 10; i < 12; i++)
                d += Math.Pow(a[i] - b[i], 2);

            return Math.Sqrt(d);


Then, modify de dtw method so that it uses this DistRightHand function instead of the dist2 function.

Aug 27, 2011 at 8:09 AM
Edited Aug 27, 2011 at 1:50 PM

Hey Simboubou,

Thanks for the help.

It worked for me, what i mean by my right hand was my whole right hand,wrist,elbow,shoulder to work, so i changed value of i from 10 to 6, and it worked.


I have another problem,

I also wanted to know if i can limit only one skeletonframe .

because when any other skeleton frame enters the screen it doesn't detects the gesture correctly so if i limit only one skeleton it may solve this problem,

but other problem will be if i leave the frame no other frame gets detected(for that i can check if there is any skeleton already existing in the frame). 


thanks again for this worked

Aug 29, 2011 at 8:41 AM

Right know, I don't think there is anything in the app regarding the case of two tracked skeletons... Not sure though, since that part was mainly done by Rymix.

You have to look at the trackingID of the skeleton and have your app to behave the way you want with the different skeleton...