Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kinect hand waving gesture

Tags:

c#

wpf

kinect

I'm doing a kinect Application using Kinect SDK.

The Result I want that it has to able to identify the hand waving for 5sec. Do something if it does Anyone knows how to do so?

I'm doing in a WPF application. Would like to have some example. I'm rather new to Kinect.

like image 780
ravithejag Avatar asked Jan 18 '23 01:01

ravithejag


1 Answers

You can write a simple alghoritm to get the wage gesture. For your example you need a time limit

public static int timeLimit = 5000;

Now think about wave. It has 3 states

1) Neutral pose when your hand is at the same position on X-axis as your elbow.

2) When hand is to the right of elbow

3) When hand is to the left of elbow

Remember that you start from state 1. To get from 2 to 3 you need to go with 1 in the middle. So as you can see there is a combination 1 - 2 - 1 - 3 - 1 <-- first wave

The secuence you can get from Position of Joint

first.Joints[JointType.HandRigh].Position.X

it`s simple math.

About the sec. Just get from (for example) SkeletonFrame timestamp and compare

if((currentTimestamp - startTimestamp) < MainWindom.timeLimit) 

startTimestamp is timestamp when your hand is in position to start.

Add also a flag tha indicates that the the hand is on a good track

I hope it helped

like image 107
Fixus Avatar answered Jan 25 '23 02:01

Fixus