Kinect SDK Skeleton Custom Control for WPF

Why re-invent the skeleton wheel when we can stand on the shoulders of giants (and leverage their work)?

Skeleton Custom Control for Kinect SDK WPF

I’ve been using the Microsoft Research SDK for Kinect for a little over a week in my spare hours, it is tonnes of fun and so much more stable then the previous frameworks I had been using. One thing that I think everyone will want to do is show a nice skeleton of up to two people being tracked by the Kinect.

I’ve created a Custom WPF Control ready for you to use or to style to your taste in Blend. It uses András Velvárt Bone Behaviour to create awesome little bones between the tracked joints.

...

Project Information URL: http://www.soulsolutions.com.au/Blog/tabid/73/EntryId/733/Skeleton-Custom-Control-for-Kinect-SDK-WPF.aspx

Project Download URL: http://www.soulsolutions.com.au/tools/SoulSolutions.Kinect.Controls.zip

SNAGHTML8f4efc

SNAGHTML8fbb07

 

public bool Jump
{
    get { return SkeletonData.Joints[JointID.FootLeft].Position.Y > -0.7 && SkeletonData.Joints[JointID.FootRight].Position.Y > -0.7; }
}

public bool LeftArmOut
{
    get { return ((SkeletonData.Joints[JointID.HandLeft].Position.X - SkeletonData.Joints[JointID.ShoulderLeft].Position.X) < -0.5); }
}

public bool RightArmOut
{
    get { return ((SkeletonData.Joints[JointID.HandRight].Position.X - SkeletonData.Joints[JointID.ShoulderRight].Position.X) > 0.5); }
}

public bool RightArmUp
{
    get { return ((SkeletonData.Joints[JointID.HandRight].Position.Y - SkeletonData.Joints[JointID.Head].Position.Y) > 0); }
}

public bool LeftArmUp
{
    get { return ((SkeletonData.Joints[JointID.HandLeft].Position.Y - SkeletonData.Joints[JointID.Head].Position.Y) > 0); }
}

public bool Crouched
{
    get { return (Math.Abs(SkeletonData.Joints[JointID.FootLeft].Position.Y - SkeletonData.Joints[JointID.HandLeft].Position.Y) < 0.2); }
}

public bool HandsTogether
{
    get
    {
        return (Math.Abs(SkeletonData.Joints[JointID.HandRight].Position.Y - SkeletonData.Joints[JointID.HandLeft].Position.Y) +
                Math.Abs(SkeletonData.Joints[JointID.HandRight].Position.X - SkeletonData.Joints[JointID.HandLeft].Position.X) < 0.3);
    }
}

Contact Information:

Follow the Discussion

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.