- By Rob Miles
Testing the Kinect Sensor Bar
The Kinect for Windows SDK is provided with some sample applications that you can use to demonstrate that the Kinect sensor is working correctly. Later in this book, we will take a look inside these applications to find out how they work.
The Kinect SDK Sample Browser
This sample allows you to demonstrate that the video and infrared cameras are working properly. It also gives a very good demonstration of the body-tracking abilities of the Kinect system. The program is supplied as part of the SDK and will be copied onto your computer when you install the Kinect for Windows SDK on it. You can find the program on the Windows Start Menu in All Programs | Microsoft Kinect SDK v1.0 | Kinect SDK Sample Browser (Figure 2-2).
Figure 2-2 The Kinect SDK Sample Browser.
When you run the program, it displays a number of options that allow you to view documentation and run a number of sample programs, including the Kinect Explorer program (Figure 2-3).
Figure 2-3 Selecting the Kinect Explorer program.
If you click on the Kinect Explorer program, you get the option to read the documentation, install the sample code on your machine, and run the program.
Figure 2-4 shows the main screen displayed by Kinect Explorer. On the left is the image from the video camera, with the bones of any tracked skeletons displayed on top of it. On the right is the image from the “depth” camera. Points in the depth view that are different distances from the sensor are given different colors. The viewer also adds color to those parts of the depth view that have been identified as being part of a person in the scene. The display also shows the rate at which the display is being updated in frames per second (FPS). The sensors generate 30 frames per second. If the computer running Kinect Explorer is not fast enough to process and display each frame, this number will be lower.
Figure 2-4 The Kinect Explorer main screen.
By clicking the down arrow at the bottom right of the screen, you can open the Settings menu, which allows you to configure the sensors in the Kinect device.
Figure 2-5 shows the options display. You can change the resolution of the color and depth cameras and also select the type of skeleton tracking that the program uses. You can also use the slider at the right side of the options to adjust the elevation angle of the sensor. This controls the motor in the base of the Kinect sensor and allows for adjustment of the angle of the sensor to get the best view of the scene.
Figure 2-5 Kinect Explorer with option screen.
The Kinect Explorer program also shows how Kinect uses the four microphones in the sensor bar to locate sound. It displays the angle from the sensor to any sound source that it detects as well as the angle of the audio beam that it has directed at the sound. If you make a noise in front of the sensor, you will see that the display changes to display where in front of the sensor the sound came from. In the display in Figure 2-5, the indicator underneath the right-hand “30 FPS” shows the direction in which the microphone is being aimed, with the broader area underneath giving the broad area from where the sound is coming.
Kinect Explorer provides a very good introduction to the capabilities of the sensor. You will discover how each part of the Kinect sensor works and how to use it from your programs in the coming chapters of this book.