This post will get you up and running apps for Kinect connected to PC using open source libraries. Mine is running on Windows 7. We’ll assume that you don’t know what you’re doing, and you couldn’t care less about what libraries you’ll use to run this. (You can learn that later). You just want to follow the instructions, run that demo, and start to impress your friends, right? Obviously you need to have the Kinect sensor device with the power adapter for this.
The bulk of the steps are taken here. However it wasn’t as straightforward when I followed it (yes, I am that slow ), so I’ll just use the same steps taken from that blog, with some extra info (in italics) to help you along.
1. First, uninstall all previous driver (NUI or libfreenect). CHRIS: In my case this wasn’t relevant because I was starting from scratch.
2. Then install drivers from https://github.com/avin2/SensorKinect use manual install from ‘PlatformWin32Driver’, after correct install you will have ‘Kinect Motor’ and ‘Kinect Camera’ under ‘PrimeSensor’
CHRIS: Woah slow down pro, let’s break this down further. So first go to https://github.com/avin2/SensorKinect, and then click that “Downloads” button on the right side of the page. After downloading, unzip the folder somewhere and check the files inside the extracted package.
CHRIS: The file to install would be the correct .exe file, depending on whether you’re using 32-bit or 64-bit Windows 7. In my case is was 32-bit, so I double-clicked “dpinst-x86.exe”. After running this install, you’ll see the driver installed under Device Manager (Start->type in “Device Manager” in Search Box), as depicted in the picture with Prime Sensor, Kinect Camera, Kinect Motor above. Interestingly enough, I only saw Kinect Motor in my case. I went ahead and it turned out to be fine.
3. Install OpenNI and NITE.
CHRIS: Ok this got me in a bit of trouble and went through a couple of uninstall/install rounds. You see, it goes straight to some page with no direct download links. So let me save you the trouble and point you directly to what exactly you need to install:
Yes you read that right, the UNSTABLE version. Don’t ask, just install it. If you’re running 64-bit Windows, download this instead.
b. OpenNI – http://www.openni.org/downloadfiles/opennimodules/openni-binaries/latest-unstable/108-openni-unstable-build-for-windows-x86-32-bit-v1-1-0 . (64-bit here)
Just make sure to install these two, and you’re done with step 3.
4. Run SensorKinect-Win32-5.0.0.exe from ‘Bin’ folder in package you get on step 2.
CHRIS: The naming has changed, it is now “SensorKinect-Win-OpenSource32-5.0.1.msi”. Depending on when you’re reading this, it might different. The important point here is that it is the .msi file inside the folder being indicated in this step.
5. put this into ‘NITE/Data/Sample-User.xml’ file
<OpenNI>
< Licenses>
< License vendor=”PrimeSense” key=”0KOIk2JeIBYClPWVnMoRKn5cdY4=”/>
< /Licenses>
< Log writeToConsole=”false” writeToFile=”false”>
< !– 0 – Verbose, 1 – Info, 2 – Warning, 3 – Error (default) –>
<LogLevel value=”3″/>
< Masks>
< Mask name=”ALL” on=”true”/>
< /Masks>
< Dumps>
< /Dumps>
< /Log>
< ProductionNodes>
< Node type=”Image” name=”Image1″>
< Configuration>
< MapOutputMode xRes=”640″ yRes=”480″ FPS=”30″/>
< Mirror on=”true”/>
< /Configuration>
< /Node>
< Node type=”Depth” name=”Depth1″>
< Configuration>
< MapOutputMode xRes=”640″ yRes=”480″ FPS=”30″/>
< Mirror on=”true”/>
< /Configuration>
< /Node>
< Node type=”User” name=”User1″/>
< !–
<Node type=”Audio” name=”Audio1″>
< /Node>
–>
< /ProductionNodes>
< /OpenNI>
Also uncomment add fill all License nodes inside Sample-Scene.xml and Sample-Tracking.xml
CHRIS: First things first, the complete folder directory referred to here is “C:Program FilesPrimeSenseNITEData” . Inside that folder, there are three xml files that you need to modify (ignore the “Working versions” I manually created that to keep the original copies):
For Sample-User.xml, it’s a total copy-paste job from top to bottom. For the other 2 files, you just need to update the License tags. What was not mentioned is that you can use this key, no need to get your own key.
Then run samples.
CHRIS: I hit another *facepalm* moment here because I’m not sure what “samples” he was referring to. It turns out, it’s the exe files at C:Program FilesPrimeSenseNITESamplesBinDebug
It’s also accessible from the Start->All Programs menu
And of course, there this very important step where you plug in your Kinect Sensor device to your USB port, and wait for it to pick up the drivers. On my laptop it took about 3 – 5 mins. After that, you can start clicking on the exe’s above just to make sure your setup is working.
You’ll get bored after a while because these samples are meant to be templates that you can build on top of. But you don’t have time for that don’t you. So here’s one link to an application that you can just run (exe) and start playing with – http://code.google.com/p/kinect-kamehameha/ It will transform you into a Super Saiyan!
(Warning: Make sure that you’re around like-minded geek folks when you do this, ok?)
—
Now what we didn’t cover here is that Microsoft has released the official KinectSDK beta. This means you can now use your .NET skills to build Kinect applications. The install is straightforward – just click “Download the SDK” and click OK all the way If you intend to try out the KinectSDK, do note that it might not run side-by-side with the open source libraries you installed above. In my case it didn’t, but some claim it did, so experiment at your own risk. What’s good though is that in my case, I didn’t have to uninstall the open source drivers. The KinectSDK will just “override” those drivers, and you can start playing with the samples that came with the KinectSDK. If I want to try out the apps based on my open source drivers, I simply had to uninstall the KinectSDK, and I’ll be back with the old setup.
But moving forward, we will begin to see a lot of cool projects based on the official KinectSDK. Just look at what some of these developers came up with in just 24-hours of getting access to the SDK – http://channel9.msdn.com/Events/KinectSDK/BetaLaunch
Enjoy! If you have questions post them below.