We’ve recently been working on utilising the Microsoft Kinect with the SynergyNet project at TEL in Durham. I’m currently working on several publications concerning this work which I will post updates about when they’re finished. In the meantime I thought I would post a small application I wrote when I was getting to grips with the Kinect.
The application works by ignoring hands a certain distance away from the Kinect. Once a hand moves into range it triggers a touch down event then touch movement events until it moves out of range again, where it triggers a touch up event.
My original intention for triggering the touch down and up events was for a user to open and close their hands respectively. However, limitations of the Kinect drivers used made implementing this too time consuming, so distance was used instead.
Because of the indirectness of this setup of sending touch events, controlling multi-touch software can be challenging. The real fun/frustration begins when the application is used with a TUIO bridging software like TUIO_Mouse.
A compiled version which can be run once all the relevant Kinect drivers are installed is available here.
You can view the source code for this application on the Hand-To-TUIO-Java repository.
This wiki page on the Hand-To-TUIO-Java repository explains the executables needed to install the OpenNI, NITE and PrimeSense drivers/libraries which the application requires. Pay attention to the version numbers, I have had issues trying to get the application to work with more recent versions of these pieces of software.
I’ve managed to get this application working both on Windows XP and 7. Though the java element of the code is platform independent its functioning does depend on the OpenNI/NITE /PrimeSense executables built for Windows.
The application can use two hands but with NITE multiple hands is often not activated by default. To enable multiple hand you need to find the NITE.ini file. Under windows file can be found at C:\Program File…\Prime Sense\NITE\Hands*\Data\Nite.ini (there may be multiple Hands* sub-folders, you will have to make the same changes in each. Once found you need to uncomment the following the two lines from NITE.ini:
Please note that this was just a quick little application which I compiled to familiarise myself with the Kinect, I won’t be providing any further support.
I will hopefully be able to post more news on our current work with the Kinect soon.
Note: The source and compiled binary were originally hosted on the SynergyNet repository but since this article was first posted I’ve moved it to its own repository so its easier to check out if anyone wants to develop it.