Kinect SDK 1 - The Full Skeleton
Written by Harry Fairhead   
Article Index
Kinect SDK 1 - The Full Skeleton
Drawing the Body
The Full Skeleton


The Full Skeleton

Now that you have seen this much adding two legs should be easy:

//left leg
DrawBone( JointType.HipCenter,
S, g);
DrawBone( JointType.HipLeft,
S, g);
DrawBone( JointType.KneeLeft,
S, g);
DrawBone( JointType.AnkleLeft,
S, g);
//Right Leg
DrawBone( JointType.HipCenter,
S, g);
DrawBone( JointType.HipRight,
S, g);
DrawBone( JointType.KneeRight,
S, g);
DrawBone( JointType.AnkleRight,
S, g);


All we have left to do is to add the two arms:

//Left Arm
DrawBone( JointType.ShoulderCenter,
S, g);
DrawBone( JointType.ShoulderLeft,
S, g);
DrawBone( JointType.ElbowLeft,
S, g);
DrawBone( JointType.WristLeft,
S, g);
//Right Arm
DrawBone( JointType.ShoulderCenter,
S, g);
DrawBone( JointType.ShoulderRight,
JointType.ElbowRight, S, g);
DrawBone( JointType.ElbowRight,
S, g);
DrawBone( JointType.WristRight,
JointType.HandRight, S, g);

Now if you run the program you will see a complete skeleton plot.

Where next

You can argue that there are better ways to organize the code but you have to have a list of the joints you want to draw lines between somewhere. This dumb approach does have the advantage of making it very obvious what work you have to do.

A better approach would be to store the sequences of joints in a collection and then write a routine to render each of the body parts as a polyline.

If you want to try taking it further why not change the drawing of the head for an ellipse and a rectangle for the body. You could even take cartoon or photo cutouts of various body parts and use them to mark the position of each of the skeletons body parts. The effect that you can achieve by being just a little creative are quite impressive and very easy. .


You can download the code for the Windows Forms version of this program from the CodeBin (note you have to register first).


Practical Windows Kinect in C#
Chapter List

  1. Introduction to Kinect
  2. Getting started with Microsoft Kinect SDK 1
  3. Using the Depth Sensor
  4. The Player Index
  5. Depth and Video Space
  6. Skeletons
  7. The Full Skeleton
  8. A 3D Point Cloud


C book



or email your comment to:


To be informed about new articles on I Programmer, subscribe to the RSS feed, follow us on Google+, Twitter, Linkedin or Facebook or sign up for our weekly newsletter.


Further reading:

Avatar Kinect - a holodeck replacement

A Kinect Princess Leia hologram in realtime

Kinect augmented reality x-ray (video)

Kinect flies

Kinect plus a glass wedge gives ...

Kinect makes you Superman

Kinect goes self aware - a warning

Kinect for Microsoft Robots

Kinect knows what you are doing...