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?

Marc-André Lafortune
  • 78,216
  • 16
  • 166
  • 166
Letoir
  • 395
  • 7
  • 15

3 Answers3

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

juergen d
  • 201,996
  • 37
  • 293
  • 362
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)

Giel
  • 397
  • 1
  • 9
  • 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) http://pastebin.com/PqSbZrVH – Giel Dec 12 '11 at 14:59
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

lee-m
  • 2,269
  • 17
  • 29
ravithejag
  • 588
  • 11
  • 23