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 OpenNI and OpenKinect. But don't know their relation/differences. PS. I am using Ubuntu or Mac.
4 Answers
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.

- 668
- 5
- 6
-
3To add more: OpenNI is primarly developed by PrimeSence, which is the company behind Kinect's depth sensor's technology. Which is making it kindof "official". Also to mention that OpenNI is designed to work with broader range of sensors, as well as future NUI devices. – Artium May 24 '11 at 19:19
-
Correction: libfreenect **does** access/use the Kinect's image and depth registration. – mankoff Mar 17 '12 at 00:53
-
Mankoff: nice -- it appears that this capability (FREENECT_DEPTH_REGISTERED depth format) was introduced to libfreenect in October 2011. Answer edited. – David Scherba Mar 18 '12 at 05:19
-
Can libfreenect and OpenNI perform rich processing like segmentation and skeleton tracking? What is NITE for? – Shashwat May 10 '14 at 02:24
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.

- 5,653
- 5
- 36
- 45
-
This is no longer the case: libfreenect comes with a bridge that makes it work as an [OpenNI2 driver](https://github.com/OpenKinect/libfreenect/tree/master/OpenNI2-FreenectDriver). – piedar Mar 18 '14 at 02:36
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

- 583
- 1
- 8
- 19
At this time of writing, OpenNi is compatible with Kinect for Windows, libfreenect is not.

- 31
- 1
-
OpenNI's Kinect for Windows support is very unstable on Linux and OS X. – Cat Zimmermann Jun 30 '12 at 02:19