DCSIMG
How-to: Successfully install Kinect on Windows (OpenNI and NITE) - Vangos Pterneas blog - Site Root - StudentGuru

How-to: Successfully install Kinect on Windows (OpenNI and NITE)

Playing Kinect games is a really great experience. Programming for Kinect is even greater! Browsing the web, you can find many cool "hacks" (CLNUI, OpenKinect) 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:

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 in the Device Manager window

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)

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 ;-).

User tracker Kinect application

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!
  • Anonymous
    Anonymous

    Hi, thank you for the tutorial. I followed it step by step, however, I am not able tu run the sampes. In NiViewer.exe, I get error: A timeout has occured when waiting for new data!

    I was able to compile NiVewer using VS2010, I am running on Windows 7. Any ideas how to fix it?

    Best regards,

    Zdenek

    zdenek.kalal@epfl.ch

  • Anonymous
    Anonymous

    Hi Zdenek,

    I was getting the same error when I had not properly configured the three XML files, so make sure that you use the ones I provide. If the error remains:

    - Try to omit step 1 or

    - Install the stable release only.

    Did you manage to run the recompiled project and got the same error?

    Regards,

    Vangos

  • Anonymous
    Anonymous

    Honestly, that is an absurd number of steps to go through to install these drivers.  I'm surprised no one has created a unified installer yet.   Maybe it is best to wait for the official Microsoft drivers, which aren't too far away.

  • @Chachi

    Yeah, the official drivers release would be ideal. But, currently, that's the best way we have to use Kinect's great capabilities.

  • Anonymous
    Anonymous

    Hey thx for the tut! But i cant get no picture! There is just a black screen... I tried it 3 times!

  • Anonymous
    Anonymous

    Hi pat,

    Which demo did you launch? Were any error messages displayed?

  • Anonymous
    Anonymous

    Thanks here too, great tutorial.

    I got the same problem as pat, every program I use start up like it shoud be. But I cant see myself or anything. No errors too. With the C:\Program Files\Prime Sense\NITE\Samples\Bin\Release\Sample-StickFigure.exe. I just see a scene with nothing in it. The IR-Beam is working correctly too.... I am working with WinXP.

  • Anonymous
    Anonymous

    Hey Pat and Mitrous,

    I had the same problem with the blank screen.  I tried an experiment that worked for me:  I ran the SensorKinect installer again.  Maybe there is a fight between the PrimeSense (non-Kinect) driver package and the Kinect-specific version.

    (Also, Vangos, I wasn't able to successfully run the current complied SensorKinect binary installer on my system, though I did have success using an older version that I found archived on someon's blog) (and also I think I now know how to just install the drivers directly).

  • Thank you everyone for your feedback. I really appreciate it.

    @Tom, thanks for commenting. Here are SensorKinect releases: github.com/.../unstable. The latest one worked for me in both 32 and 64-bit computers.

    Here is another solution you may try if the tutorial does not work for you:

    - Omit step 1.

    - Install OpenNI.

    - Navigate to C:\Program Files\OpenNI\Driver and install dpinst-x86 or dpinst-amd4.exe.

    - Install NIITE and replace the XML files.

    Also, make sure that you install stable or unstable releases (eg, I would not recommend installing OpenNI unstable and NITE stable, although it might work for someone).

  • Anonymous
    Anonymous

    Vangos,

    I don't know if what you say above will work (which apparently indicates not installing modded "SensorKinect" drivers) but I will tell you what just worked for me on my laptop (which had also had the blank screen issue):

    Eradicate all traces of all PrimeSense and OpenNI drivers

    Install OpenNI

    Install Nite

    install SensorKinect drivers

    replace XML files

    bingo

    In other words, I followed your original steps, except I did the SensorKinect hardware layer installation (your original step 1) last, and I left out your step 4 (or rather replaced it with step 1).

    The SensorKinect drivers are modded versions of the OpenNI hardware drivers.  Makes sense that you wouldn't want to be intalling them over top of each other.

    Cheers.

    -Tom

  • Anonymous
    Anonymous

    I tried all the steps, with the latest unstable builds for all and I have a x64 processor. The Device Manager looks the same, but I get an error whent rying to load the openNI samples:

    Error: One or more of the following nodes could not be enumerated:

    Device: PrimeSense/Sensorv2/5.0.0.25: The device is not connected!

    Ideas?

  • Anonymous
    Anonymous

    Try to run SensorKinect-Win32-5.0.0.exe (in the bin folder) of the SensorKinect driver (rather than run dpinst-x86.exe). This is how I solved the

    "Error: One or more of the following nodes could not be enumerated:

    Device: PrimeSense/Sensorv2/5.0.0.25: The device is not connected!"

  • Anonymous
    Anonymous

    Thanks Erevodifwntas. I accidently did this step by following the guide:

    github.com/.../README  How do I get started using the functionality? I downloaded openNI unity sample, now I need to know what kind of information I can get? Like how do I detect poses and such. Could someone point me in the right direction?  Should I be looking at avin2 for the functionality I get use, or OpenNI?

  • Anonymous
    Anonymous

    Excellent blog post, really helped me out. I was having difficultly installing OpenNI with unstable builds, now I know that the order of installation is very important. Thanks.

    How are you C# tutorials coming along, I can't wait to read them, will you do anything on head tracking? I want to track user's head positions and redraw a 3D scene from their perspectives.

    Thanks,

    Mark.

  • Thanks for your comment, Mark.

    I am planning to publish some posts about Kinect and WPF (getting raw and depth image, body tracking, painting using gestures, etc). Head tracking sounds interesting.

    I had some head tracking demos using OpenCV, so porting them to use Kinect might be a quite nice idea.