May 2014: PrimeSense was bought by Apple at the end of April, and the OpenNI.org website was shut down. Fortunately, several sites have set up archives of the old OpenNI and NITE software, such as Simple-OpenNI and Structure Sensor.
When looking through these archives, it's important to remember that the code examples in my book use OpenNI version 1. It's quite different from version 2, which sports many changes to the skeleton and hand detection functions, resulting in big changes to NITE as well. In other words, you need to find archive copies of version 1 of OpenNI and NITE to run my code. The following instructions explain how to do that.
This page is written in the form of a checklist. If you prefer a wordier explanation, then please have a look at section 3 of the draft chapter. Remember that it refers to the now-defunct OpenNI website from 2012, so ignore any weblink information in that chapter.
Useful freeware tools for cleaning Windows: Revo Uninstaller, CCleaner
Download the relevant OpenNI/NITE zip file from the Simple-OpenNI downloads website. Search for "All Downloads" to find suitable versions of OpenNI and NITE for Windows, Linux, and OSX. I recommend the following:
For example, the Windows 32-bit zip file ( OpenNI_NITE_Installer-win32-0.27.zip) contains four installers:
I've also made that zip file available here; it's 120 MB large.
There are two installers containing the word "sensor", which relate to the SensorKinect driver. It seems that the driver inside SensorKinect092-Bin-Win32-v18.104.22.168.msi is compiled using VC++ 2010 so you must have Microsoft's VC++ 2010 redistributable installed for the driver to correctly execute. The redistributable is inside sensor-win32-22.214.171.124-redist.msi.
If you don't want to install the 64-bit version of OpenNI on your 64-bit Windows machine, then you can use the 32-bit installer instead. Some good instructions on how to do that can be found here.
Install the four downloaded packages in the order:
Afterwards, check if the software is in the C:\Program Files\OpenNI\ and C:\Program Files\PrimeSense\ directories.
To install the three hardware drivers (for motor, audio, and camera), you should:
Delete OpenNI's Java CLASSPATH environment variable via Windows' System control panel Advanced tab
In C:\Program Files\PrimeSense\NITE\Data edit:
In C:\Program Files\OpenNI\Data edit:
The edits to these XML files are:
<License vendor="PrimeSense" key="0KOIk2JeIBYClPWVnMoRKn5cdY4="/>
<MapOutputMode>attributes to all the
<MapOutputMode xRes="640" yRes="480" FPS="30"/>
Look at SampleConfig.xml in the chapter 2 code for examples of these changes.
In C:\Program Files\OpenNI\Samples\Bin\Release, run the applications:
In C:\Program Files\PrimeSense\NITE\Samples\Bin\Release, run:
The Java wrappers for OpenNI and NITE are part of the installation, so you can now start programming. For details, please read the draft chapter.