Jimmy Engström

NAVIGATION

Kinect Extensions

The Kinect SDK doesn’t have any built-in gesture system, it is however quite easy to use joints and check how they relate to each other.

 

For example:
if  (data.Joints[JointID .HandRight].Position.Y >  data.Joints[JointID.ShoulderRight].Position.Y)

 

That would trigger if I hold my right hand over my right shoulder.
It is still a bit hard to read and I wanted to simplify both reading and writing the code to check different joints, so I created a couple of extension methods to help out.

 

Code that does the same as above would look like this using my extensions:
var
  joints=data.Joints;
if  (joints[JointID .HandRight].HigherThan(joints[JointID.ShoulderRight]))

 

So far I have implemented:

HigherThan
LowerThan

BetweenVertically
BetweenHorizontally
ToTheLeftOf
ToTheRightOf

 

Hope these extensions will help =)

 

JointExtensions.zip (436.00 bytes)

Posted in Gadgets, Kinect