It took me sometime to get the installation done so just thought of making a little tutorial that would help other folks. I am assuming that you have Microsoft kinect and the adapter ready with you .
Two competing frameworks to work with Kinect are Microsoft Kinect’s sdk and Prime Sense OpenNI sdk . But since the Microsoft’s sdk is only for non commercial use, many developers love to use OpenNI sdk.
In this tutorial we would be installing OpenNI, SensorKinect and NITE. In simple terms OpenNI and SensorKinect are the drivers that help to access RGB-D data [Depth & Color] from Kinect . NITE is a skeleton tracking library that can be used by developers to create gesture interactions etc. Hence if you just want to work with depth images and pointclouds you wouldn’t necessarily need to install NITE. So, technically it is optional but most of them install it as it doesn’t take much extra effort.
I have installed 32 bit versions of openNI, sensorKinect and NITE on my 64 bit windows7 laptop. I shall walk you through the steps that I had followed to install OpenNI drivers successfully.
Step1: Go to http://www.openni.org/Downloads/OpenNIModules.aspx . Select unstable and select windows 32 version. Download and install it.
Step 2: Go to https://github.com/avin2/SensorKinect , download the zip file and extract it. Navigate to the Bin folder , find SensorKinect093-Bin-Win32-v18.104.22.168.msi and install it. Sample path where the above sensor kinect installation file would be located is C:\Users\Sanmarino\Downloads\avin2-SensorKinect-v0.93-22.214.171.124-0-g15f1975\avin2-SensorKinect-15f1975\Bin.
Step 3: Go to http://www.openni.org/Downloads/OpenNIModules.aspx. Select openNI compliant middleware binaries, unstable , windows 32 version then download and install it.
Step 4: Now replace the file SamplesConfig.xml in C:\Program Files (x86)\OpenNI\Data with the SamplesConfig.xml that is present in avin2-SensorKinect-15f1975\OpenNI\Data folder that you downloaded in step2.
Here you may get “access denied” when you try to replace in C:\Program Files (x86)\OpenNI\Data folder. So right click on the Data folder present in C:\Program Files (x86)\OpenNI\ , then select properties –> select security tab –>click edit. Under “Group or user names” select “users(your-computer_name\Users)” , eg: ”users(Sanmarino-THINK\Users)” in my case. Now under “Permissions for users” click to allow full control , then click apply and ok. After this you can replace without any problem. See the picture below if you have any confusion.
Step5: Download KinectXML’s.zip from https://www.dropbox.com/s/tpl9wtx96xbe6rr/KinectXMLs.zip and navigate to the NITE folder inside the unzipped KinectXMLs folder. Copy the three files Sample-Scene,Sample-Tracking & Sample-user from the NITE folder in KinectXMLS and replace the files in C:\Program Files (x86)\PrimeSense\NITE\Data with these three files. If you encounter “access denied “ problem do the same procedure explained in the step4 to the Data folder inside NITE.
Now restart your system , plugin Kinect and wait for the drivers to be installed. Once the drivers are installed properly open device manager[Click windows icon and search for device manager] in your system . You should be able to see Kinect Audio,Camera & Motor when you expand PrimeSense. If you are unable to see this then refer the Errors encountered section below.
Testing the installation:
Try out some samples to ensure that your installation is working perfectly. Double click on NiViewer in C:\Program Files (x86)\OpenNI\Samples\Bin\Release to see the following output. Here is the output with my kinect -
Also try Sample-SceneAnalysis in C:\Program Files (x86)\PrimeSense\NITE\Samples\Bin\Release to see if the NITE installation is working properly. Here is the output with my kinect -
If everything is working properly then you are done with the installation. If you encountered errors refer to the section below and see if it helps. Comment if you encounter any problems. I shall offer the help I can.
1) The procedure entry point xnloggetfilename could not be located…..
2) Device: PrimeSense/SensorKinect/126.96.36.199: The device is not connected!
3) A blank screen appears and dissapears immediately when you try to run the samples in NITE or OpenNI.
In my case all the above errors have been caused because of the conflict between Microsoft driver and OpenNI driver. When I first connected the Kinect to my laptop Microsoft driver has been automatically installed without my knowledge and it kept causing errors like the ones mentioned above. To remove, open Device Manager and find Microsoft Kinect. Expand it to find Microsoft Kinect camera , right click and choose uninstall. A windows pops out and make sure you check the box Delete the driver software for this device so that the Microsoft Driver is not installed again the next time when you unplug and plug in kinect. Then click ok to uninstall. Now uninstall the existing openNI drivers and install them newly again(i.e, Start from Step1 again). The problem should be solved. The following image clarifies the steps mentioned.