Here’s the full details and process on getting your Kinect running on your PC using the OpenNI and Primesense drivers, yes this may be a little old news for some, but my guide here will actually get your Kinect running pretty much first time rather than leave you to guess and try to follow the other guides out there.
So first of all you’ll need a Kinect! Now we’ve sorted that out, the rest is easy and just a matter of following the steps – I’m documenting this as much for my own use as well as yours… I’m doing this for a Windows XP laptop, but you can do this on Ubuntu, Windows 7, Mac OSX etc…
1. Remove any existing drivers
First of all, if you have any drivers previously installed for the Kinect, such as OpenKinect, Freenect, Microsoft Kinect drivers etc… you’ll need to remove/ uninstall them. They will appear in the device manager under Human Interface and normally be called something like Xbox NUI Motor, Xbox NUI Camera, Xbox NUI Audio. Incidently when you install the OpenNI/ Primesense drivers, they are named differently and you do not want to under any circumstances use the above drivers.
2. Download and install the following drivers & binaries
Head on over to Github and get this package https://github.com/avin2/SensorKinect which you want to download that and then navigate to the Bin directory and install the relevant driver for your OS. This has the drivers precompiled for you but you can also compile this from source. The file will be something like:
Next, you’ll want to go to OpenNI.orgs download page and for each of the options select stable choose which development package you want for your OS:
- OpenNI Binaries
- OpenNI Compliant Middleware Binaries
- OpenNI Complient Hardware Binaries
You can also download & compile these from binaries by going to the OpenNI github page
So now you should have 3 files something like:
Or whatever you’ve compiled from Git, run the installs etc…
On the Primesense Nite installation, if prompted for a key, add the following:
Now that’s done you’ll need to download and install the Microsoft Visual C++ Redistributable Package for your OS which can be found at:
In my instance I’m using the x86 one, for windows 7 use x64 etc… just grab the latest one available. This allows you to run the OpenNI applications.
3. Plug and pray
Now plugin the Kinect – make sure you have the power plugged in as well, not just the USB! Your computer should recognise the Kinect and want to install the drivers – make sure you choose the Primesense ones if prompted – I found that when I had old drivers it remembered the location, so I just zipped up the folder and archived it to remove it from the driver search.
If all goes well you should have 3 hardware installation screens on Windows and the device manager should show the hardware under Primesense
Now that’s installed there are a few more things you need to do in order to hook up OpenNI and Primesense, namely a few XML config files which you just need to add in the same license key so that Primesense will work for you that key was:
Now that’s done you can start to play around with the examples – there are various wrappers/ API’s available to you to now use this to create applications.
- Test out OpenNI by running the NiViewer sample
- Test out Primesense by running any of the samples there
Now you have that installed you can move on to using various wrappers etc… to hook the Kinect up to Flash, Silverlight, Processing, Arduino, Java, Python etc…