Kinect with Linux
OpenKinect and OpenNI
The Adafruit contest had been hosted on a GitHub site called libfreenect. Once the contest had been won, Josh Blake and some others founded a community called OpenKinect. From their Web site (see Resources):
OpenKinect is an open community of people interested in making use of the amazing Xbox Kinect hardware with our PCs and other devices. We are working on free, open-source libraries that will enable the Kinect to be used with Windows, Linux and Mac.
The OpenKinect community consists of over 2,000 members contributing their time and code to the Project. Our members have joined this Project with the mission of creating the best possible suite of applications for the Kinect. OpenKinect is a true "open source" community!
Our primary focus is currently the libfreenect software. Code contributed to OpenKinect where possible is made available under an Apache20[sic] or optional GPL2 license.
Around the same time, a number of companies with interests in commercializing natural interfaces formed a group called OpenNI. According to their Web site (see Resources):
The OpenNI organization is an industry-led, not-for-profit organization formed to certify and promote the compatibility and interoperability of Natural Interaction devices, applications and middleware. One of the OpenNI organization's goals is to accelerate the introduction of Natural Interaction applications into the marketplace.
OpenNI offers its software under several different licenses—LGPL for the open-source bits and just binaries for some proprietary parts (like skeletal identification). The founders of OpenNI include:
PrimeSense, Inc., the company that supplied Microsoft with the technology for "Project Natal", which became the Kinect.
Willow Garage, a company focused on hardware and software for personal robotics.
SideKick, a game software company that develops motion-based games.
ASUS, the computer OEM, who is selling a different 3-D depth sensor based on PrimeSense technology called X-tion Pro.
In general, OpenKinect appears to be approaching NUI from the bottom up, starting with the libfreenect driver and building on top of that, all strictly open source. OpenNI has more of an architectural vision for how NUI devices from different vendors can interoperate. There's plenty of room for the two organizations to work together.
Try It Yourself
The drivers and demo software for Kinect are readily available, both from OpenNI and from openkinect.org (see Resources). Installation on Ubuntu 10.10 is particularly easy, as both organizations provide prebuilt packages. If you're running a different Linux distro, RPMs and debs also are available, along with ample build instructions, so you shouldn't have a problem.
With the OpenKinect packages, you get some demo programs that show the depth perception and color image capability of the Kinect. Utilities are included to record the Kinect data stream and to emulate a Kinect so the software can be used without having the hardware connected. There also are language interfaces in various stages of development for the following:
Synchronous C interface (functions instead of callbacks).
The OpenNI package has similar capabilities, and it includes detailed documentation of the C/C++ interface to the underlying layers. The OpenNI documentation and sample code is oriented toward Visual Studio, but most of it also is applicable to gcc.
Okay, wrong movie, but there are some not-so-obvious realities to using Kinect with Linux. They might or might not affect your explorations:
The USB connector on the Kinect device is nonstandard. That's okay if you buy the Kinect as a standalone device. It comes with a power supply and an adapter to use standard USB. If you buy the Kinect as part of an Xbox bundle, you will need to buy the power supply/adapter separately.
The depth perception technology in Kinect works best at distances of 6–8 feet. It's not a mouse-and-keyboard distance interface, it's a stand-across-the-room-and-wave interface.
The Kinect software is able to determine body position and infer the positions of arms and legs, but it isn't able to do things like individual finger resolution. That makes it difficult to do things like sign-language interpretation.
Let the Games Begin
So, now for $150 you can have open-source access to hardware that would have cost you $30,000 a few years ago. What clever ideas can you come up with for NUI?
Kinect Teardown: http://www.technologyreview.com/video/?vid=644
Rick Rogers has been a professional embedded developer for more than 30 years. Now specializing in mobile application software, when Rick isn't writing software for a living, he's writing books and magazine articles like this one.
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
|Trying to Tame the Tablet||May 08, 2013|
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- New Products
- RSS Feeds
- Tech Tip: Really Simple HTTP Server with Python
1 hour 20 min ago
- Automatically updating Guest Additions
2 hours 29 min ago
- I like your topic on android
3 hours 15 min ago
- Reply to comment | Linux Journal
3 hours 37 min ago
- This is the easiest tutorial
9 hours 51 min ago
- Ahh, the Koolaid.
15 hours 30 min ago
- git-annex assistant
21 hours 29 min ago
- direct cable connection
21 hours 52 min ago
- Agreed on AirDroid. With my
22 hours 2 min ago
- I just learned this
22 hours 6 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.