Skip to main content

UPDATE (Dec 10, 2012): The following article was originally published on January 20, 2011. As a result, it might not be accurate nowadays. I strongly insist on downloading the official Kinect for Windows SDK instead.

Playing Kinect games is a really great experience. Programming for Kinect is even greater! Browsing the web, you can find many cool “hacks” (CLNUIOpenKinect) which allow Kinect be used by a PC rather than an XBOX. Via these hacks, we gain access to Kinect’s cameras (color and depth), LED, accelerometer and motor. Obtaining both the raw and the depth image, it is easier to build Machine Vision applications. But the main problem remains: Kinect magic is its software and the device simply cannot give us all those body-tracking algorithms by itself.

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:

Introduction

Playing Kinect games is a really great experience. Programming for Kinect is even greater! Browsing the web, you can find many cool “hacks” (CLNUIOpenKinect) which allow Kinect be used by a PC rather than an XBOX. Via these hacks, we gain access to Kinect’s cameras (color and depth), LED, accelerometer and motor. Obtaining both the raw and the depth image, it is easier to build Machine Vision applications. But the main problem remains: Kinect magic is its software and the device simply cannot give us all those body-tracking algorithms by itself.

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!

Prerequisites

Tutorial

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.

Drivers are now installed in your PC.

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:

Kinect OpenNi device manager

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 inC:\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!

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)

OpenNI is the primary assembly you’ll need when developing Natural User Interfaces applications.

C# tutorials on using the managed OpenNI.net libraries can be found in this blog, so stay tuned :-).

Kinect user tracking

Update June 12, 2011: Troubleshooting

  • 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 (e.g. CLNUI).
  • You are done!
Vangos Pterneas

Vangos Pterneas is a software engineer, book author, and award-winning Microsoft Most Valuable Professional (2014-2019). Since 2012, Vangos has been helping Fortune-500 companies and ambitious startups create demanding motion-tracking applications. He's obsessed with analyzing and modeling every aspect of human motion using AI and Maths. Vangos shares his passion by regularly publishing articles and open-source projects to help and inspire fellow developers.

8 Comments

  • Baraka Dukkha says:

    A lot of the links are 404s is there anywhere else to find them?

  • cristian Narvaez says:

    Hello, first i want to congratulate you for the blog and the web is very useful for kinect beginners.
    Now i have a question, for mi university i have to use the kinect in a game engine, we are tempted to use the unity engine, i don’t know if you have reference about it. also i want to know if the OpenNI is discontinued like you say, the Microsoft SDK let us to do the same stuff as the OpenNI?
    you have experience using the kinect from the upper view when you only can recognize i don’t know the head and the shoulders? like this

    http://www.doschdesign.com/images2/Red-DVI-BirdsEyePeople-AfricanAmerican.jpg

    i’m sorry for the questions but is the first time i use kinect and is for a final project in a university subject, so if you can help me , thanks for your help :).

  • Hi Cristian. Thank you so much for your comment. OpenNI has been discontinued by PrimeSense, though it’s currently being maintained by Occipital. I suggest you use the official Microsoft SDK, to take advantage of the new features. It is a much more powerful SDK right now.

    I have not used Kinect from the upper view and I do not believe it would be a good solution, unless you write too much custom code to make it work. You’ll need to handle the depth stream all by yourself. It would be quite interesting however.

  • Primi Diaz says:

    Hi Vangos Pterneas,

    First thank you for the tutorial and all your blog is very helpful.
    I am trying to install kinect and When I try to install the driver in the step 1 it show me an error that first I have to install openNI 1.5 or higher. So I install openNI, then I execute the sensorkinect-unstable againg an error still appears. I tried omit this step and intall the NITE and the driver that is located in the folder Sensor-Unstable >> plataform >> win32 >>driver>> dpinst-amd64.exe, the drivers appear installed sucessful in device manager (Prime Sense, Kinect Camara, Kinet Audiio, kinect motor) but when execute the samples it does not work, it opens and close immediately.

    Best regards.

  • Omar says:

    Hi vangos! I’m trying to install Kinect drivers on my Windows xp. But the motor driver not appear, and the camera and audio yes in the management devices. I don’t know what I’m doing wrong… Can you hep me! Please!!

  • Taro says:

    Hi Vangos, I use OpenNI 1.1, unfortunately the link you provided is dead now..

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.