Fortunately, PrimeSense, the company behind Kinect, released OpenNI framework and NITE middleware. This means that we can now have access to features such as real-time skeleton tracking, gesture recognition, wave detection and much more!
OpenNI and NITE installation can be painful if not done properly. Let's do it step by step:
Step 0
Uninstall any previews drivers, such as CLNUI. Look at the end of this post if you want to see how you can have multiple drivers installed.Step 1
- Download Kinect Drivers and unzip.
- Open the unzipped folder and navigate to Bin folder.
- Run the msi Windows file.
Step 2
Download and install the latest stable or unstable OpenNI Binaries from OpenNI website.Step 3
Download and install the latest stable or unstable OpenNI Compliant Middleware Binaries (NITE) from OpenNI website.During installation, provide the following (free) PrimeSense key: 0KOIk2JeIBYClPWVnMoRKn5cdY4=
Step 4
Download and install the latest stable or unstable OpenNI Compliant Hardware Binaries from OpenNI website.
Both stable and unstable releases have worked for me. If you have trouble installing the unstable releases, just try the stable ones.
Step 5
- Plug in your Kinect device and connect its USB port with your PC.
- Wait until the driver software is found and applied.
- Navigate to the Device Manager (Control Panel). You should see something like the following:
Step 6
Navigate to C:\Program Files\OpenNI\Samples\Bin\Release (or C:\Program Files (x86)\OpenNI\Samples\Bin\Release) and try out the existing demo applications. Try the demos found in C:\Program Files\Prime Sense\NITE\Samples\Bin\Release (or C:\Program Files (x86)\Prime Sense\NITE\Samples\Bin\Release), too. If they work properly, then you are done! Congratulations!If they do not work, make sure that you have replaced the XML files I mentioned in step 5 with the ones I provided you. If the demos still do not work, try installing the stable version of OpenNI, middleware and hardware binaries. Personally, I have successfully installed OpenNI and NITE (both stable and unstable releases) in a 32-bit desktop and a 64-bit laptop following the methodology I described.
Step 7
You have successfully installed Kinect in your Windows PC! Read the documentation and familiarize yourself with the OpenNI and NITE API. You'll find the proper assemblies in:- C:\Program Files\OpenNI\Bin (or C:\Program Files (x86)\OpenNI\Bin) and
- C:\Program Files\Prime Sense\NITE\Bin (or C:\Program Files (x86)\Prime Sense\NITE\Bin)
C# tutorials on using the managed OpenNI.net libraries can be found in this blog, so stay tuned ;-).
Update Jun 12, 2011: Troubleshooting
If you have followed the above guide and still have trouble viewing the demos, then try out the following:- If you are running a version of OpenNI older than 1.1.0.38, then you need to replace the XML files found under Program Files\OpenNI\Data and Program Files\PrimeSense\NITE\Data with the corresponding ones found here.
- If the demos do not run, then navigate to the Control Panel and open the Environment Variables panel. Under "System variables", find OPEN_NI_BIN variable and replace C:\Program Files\OpenNI\bin with C:\Program Files\OpenNI\Bin (uppercase "B")
Installing multiple drivers
Thanks to my friend George Karakatsiotis (@erevodifwntas), you can now have various Kinect drivers installed concurrently. Here's how to achieve this:- Open Device Manager.
- Right click Kinect Camera under PrimeSensor.
- Select "Update driver software"
- Select "Browse my computer for driver software" and "Let me pick from a list of device drivers on my computer".
- Select the driver of your preference (eg CLNUI).
- You are done!