Kinect – Getting Started – Become The Incredible Hulk
- Posted: Jun 23, 2011 at 9:30 AM
- 6,114 Views
..in this article I'll show how to Get Started with Kinect SDK, from there we will move forward to how you can control the Camera Angel using the SDK and finally I'll show how to use the Skeleton Tracking and with a nice example how to become The Incredible Hulk.
Project Information URL: http://www.codeproject.com/KB/dotnet/KinectGettingStarted.aspx
Project Download URL: http://www.codeproject.com/KB/dotnet/KinectGettingStarted.aspx
void SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e)
{
foreach (SkeletonData data in e.SkeletonFrame.Skeletons)
{
//Tracked that defines whether a skeleton is 'tracked' or not. The untracked skeletons only give their position.
if (SkeletonTrackingState.Tracked != data.TrackingState) continue;
//Each joint has a Position property that is defined by a Vector4: (x, y, z, w).
//The first three attributes define the position in camera space. The last attribute (w)
//gives the quality level (between 0 and 1) of the
foreach (Joint joint in data.Joints)
{
if (joint.Position.W < 0.6f) return;// Quality check
switch (joint.ID)
{
case JointID.Head:
var heanp = getDisplayPosition(joint);
Canvas.SetLeft(imgHead, heanp.X);
Canvas.SetTop(imgHead, heanp.Y);
break;
case JointID.HandRight:
var rhp = getDisplayPosition(joint);
Canvas.SetLeft(imgRightHand, rhp.X);
Canvas.SetTop(imgRightHand, rhp.Y);
break;
case JointID.HandLeft:
var lhp = getDisplayPosition(joint);
Canvas.SetLeft(imgLefttHand, lhp.X);
Canvas.SetTop(imgLefttHand, lhp.Y);
break;
}
}
}
} Contact Information:
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.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?