Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!
.NET Zone is brought to you in partnership with:

Den works on awesome stuff. He is a sophomore in college, a Microsoft MVP, a Microsoft Student Insider, a technical writer for DZone and a contributing author for Coding4Fun on Channel9. He is maintaining a number of open-source projects on CodePlex and GitHub. Den is a DZone Zone Leader and has posted 388 posts at DZone. You can read more from them at their website. View Full User Profile

Kinect drivers can be inter-changed for experimentation purposes

05.30.2011
Email
Views: 1511
  • submit to reddit
The .NET Zone is presented by JNBridge to keep you updated on all the latest news, tips, and tools in the .NET community.  Check out today's top .NET content and read about JNBridge's innovative tools for .NET and Java interoperability.  

If you've tried developing Kinect-based applications on Windows, you probably know that you have some choices when it comes to development libraries. There is no lack in implementations for the unmanaged environment, but when it comes to managed (read: .NET), there might be some problems. Specifically with the fact that OpenNI - the most feature-full set of libraries, doesn't carry an implementation to handle the device motor in its .NET wrapper. And here comes the solution - use the older OpenKinect DLL. The thing is - it is not compatible with OpenNI since it relies on a different driver implementation and the default KinectMOD is not going to work for it.

There is a workaround to this, however. All you need is make sure that you have both the OpenKinect and OpenNI drivers installed at the same time. Once done, open Device Manager (devmgmt.msc from the Run dialog or the system console).

IMPORTANT NOTE: Make sure that Kinect is connected to the developer machine. Otherwise the Device Manager will be useless in this case.

Find the PrimeSense section (for OpenNI drivers) or Human Interface Devices (for OpenKinect drivers). Find your device (be it the Motor, Audio, or Camera) and double click on the item.  You should see the device properties dialog appear.

Click on the Driver tab and select Update Driver. You should now be able to see the Update Driver Software dialog. When prompted, select Browse my computer for driver software. You will be prompted to select the driver location.

If you know the location for the driver you want to switch, you can use it, or - if you have everything already installed, you can pick a driver from the local driver cache. For example, you could see this:

This is the complete list of available drivers, but most of them are not suitable for Kinect dev purposes. Make sure you select Show compatible hardware. Now you should see a more refined list, and that's exactly what's needed:

Xbox NUI Motor (I am using the motor for demo purposes) is the driver provided by OpenKinect. Kinect Motor is the driver that was installed as a part of the KinectMOD on top of OpenNI. Once you switch the drivers, you are able to use the appropriate libraries or wrappers without having to restart the PC or reinstall anything else.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

This content was brought to you in partnership with JNBridge.  JNBridge specializes in .NET and Java interoperability.  Be sure to view JNBridge's brief video series on accessing Java from .NET.