O'Reilly logo

Augmented Reality with Kinect by Rui Wang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Obtaining joint positions

Before we can consider using the skeleton for gesture-based interaction, we should first print out all the skeletal-joint-related data to have a directly perceived look of the Kinect skeleton positions. The data can then be merged with our color image so that we can see how they are matched with each other in real time.

Drawing the skeleton

We will first draw the skeleton with a series of lines to see how Kinect defines all the skeletal bones.

  1. The Microsoft Kinect SDK uses NUI_SKELETON_POSITION_COUNT (equivalent to 20 for the current SDK version) to represent the number of joints of one skeleton, so we define an array to store their positions.
    GLfloat skeletonVertices[NUI_SKELETON_POSITION_COUNT][3];
  2. Add the following lines ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required