I am considering using Kinect in one my projects, but I am totally lost between all the libraries. Don't know what is what exactly. Most importantly I am reading stuff about O开发者_如何学JAVApenNI and OpenKinect. But don't know their relation/differences. PS. I am using Ubuntu or Mac.
OpenKinect is a community of people, not a library. The OpenKinect community releases the libfreenect Kinect driver. libfreenect and OpenNI+SensorKinect are two competing, opensource libraries/drivers. libfreenect (Apache 2.0 or GPLv2) derives from the initial, reverse-engineered/hacked Kinect driver whereas OpenNI+SensorKinect is derived from open sourced (LGPL) PrimeSense code.
Both projects work on Windows, Linux (Ubuntu), and Mac OS X. Both projects allow you to access color and depth images from the camera. The projects are not compatible and they can not be used simultaneously.
Differences between the libraries are motor control (libfreenect has it, OpenNI+SensorKinect doesn't), and integration with the NITE middleware for higher-level NUI support (OpenNI+SensorKinect only). These differences tend to drive projects towards one of the libraries.
I should add that OpenNI 2 renders OpenNI unusable to anything else other than Windows.
OpenNI 1.x with Kinect was not oficially supported in other platforms, until a guy named avin2 created the SensorKinect project, which sits on top of OpenNI and exposes the interface of the Kinect to OpenNI. OpenNI 2.0 is a major refactoring, and does not oficially support anything else other than Windows for the Kinect. http://social.msdn.microsoft.com/Forums/en-US/kinectsdk/thread/a11ff6d9-7fbe-4636-8ff0-92d6220ac3f8/ . At the time of this writing, OpenKinect has a problem with the newest kinect (model 1473) , which renders the device unusable. I don't know if a fix is underway.
Therefore, to sum up: -- If the problem with the device model 1473 is solved, then OpenKinect is the way to go. And, frankly, I wouldn't trust anything else which targets a specific platform. -- Until this problem is solved, your only option is to use OpenNI 1.5 + SensorKinect, which is obsolete, and development on it has halted, but it's the only thing that works with all kinect models, actually.
Although this question is years ago, I would like to add something I know.
I am pretty amateur, therefore getting Kinect to work on Mac was always difficult for me. I downloaded the code from github and followed multiple instructions but I couldn't get it to work properly. I remember, around 10 months ago, I got the Kinect, OpenNI work on Mac, but it was very unstable. The glview sample program did show depth and color images from Kinect, but it failed every now and then.
Recently, I found out a guy created a homebrew formula for openni (1 and 2), together with NiTE and libfreenect. I tried and it worked flawlessly on Mavericks 10.9.2 + 10.9.3, so if you haven't got the Kinect working properly, have a look at: https://github.com/totakke/homebrew-openni
At this time of writing, OpenNi is compatible with Kinect for Windows, libfreenect is not.
精彩评论