How do I implement a wave gesture in kinect?
Asked Answered
C

3

11

I would like to use a gesture, so the kinect can select the person with the gesture as the main player. After this he can control the PC. Selecting the person and giving them control is done. Now i have to implement a gesture, but i dont know how to start.

Can anyone help me?

Conrado answered 9/12, 2011 at 15:25 Comment(0)
E
7

I guess that is what you want (if you like to recognize gestures by yourself):
MS explains how to recognize a wave gesture with a full code example here: http://blogs.msdn.com/b/mcsuksoldev/archive/2011/08/08/writing-a-gesture-service-with-the-kinect-for-windows-sdk.aspx

By now there are also some gesture recognizer toolkits available.
See this for example:
http://kinecttoolbox.codeplex.com/

You can also surf on http://channel9.msdn.com for similar projects, like that one: http://channel9.msdn.com/coding4fun/kinect/Gestures-and-Tools-for-Kinect-and-matching-Toolkit-too

Engrail answered 9/12, 2011 at 15:30 Comment(0)
I
2

Did you get as far that you have the skeleton? The easiest is to check how many times the hand changed velocity direction

+x --> -X means it went left and is now coming back right, you can do a distance check between these points to determine if the wave gesture is obvious enough (omits very tiny waves/jitter)

Inverson answered 9/12, 2011 at 15:50 Comment(1)
Here is some pseudo code, this is the most naive approach, based on positions, you can improve it by basing it on velocity, and more directions as well. (make it as complex and robust as you need) Apart from this example its worth digging in the SDK, they might have an example showing the Wave gesture (which might be overly complex for your intentions) pastebin.com/PqSbZrVHInverson
B
1

Take some reference for hand have - say elbow - and store it into a variable and take some reference distance for the hand move such that whenever the hand moves on both sides beyond the reference distance on both sides, calculate the number of waves with the waves you require in your program. If both match select that person for your program

Bramble answered 9/4, 2012 at 6:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.