Making a dancer
In the previous section, we used the user-tracking capabilities of the OpenNI framework to locate the user in the depth image provided by the Kinect infrared camera. Now we will take it one step further and locate the body parts of the player. The feature we are going to use in this task is called skeleton tracking . The OpenNI skeleton tracker locates certain key points of a human body, which we will use to construct our stick figure. For each player, the Kinect can see and get the location of the head, neck, torso, shoulders, elbows, hands, hips, knees, and feet.
We are also showing the image of the infrared camera and the user pixels we used in the last section as a little heads-up display (HUD) so that the player is able to see what Kinect is tracking.
Engage Thrusters
We need to create a new Processing sketch and import the
SimpleOpenNI
library. Then we need to add asetup()
and adraw()
method.import SimpleOpenNI.*; void setup() { } void draw() { }
We create three methods...