explaingit

openkinect/libfreenect

3,794CAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

An open-source driver that lets your computer read depth images, color video, and audio from the original Xbox 360 Kinect sensor, with bindings for Python, Ruby, Java, and more.

Mindmap

mindmap
  root((libfreenect))
    What it does
      Reads depth frames
      Reads color video
      Reads microphone audio
      Controls motor and LED
    Tech used
      C core library
      Python bindings
      Java Ruby C# wrappers
    Use cases
      Gesture tracking
      3D scanning
      Computer vision
      Interactive installs
    Hardware
      Kinect v1 only
      Linux macOS Windows
    License
      Apache 2.0 or GPL v2
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Read real-time depth frames from a Kinect v1 sensor on Linux or macOS for a computer vision project

USE CASE 2

Record a Kinect depth and color session to disk and replay it later using fakenect without the physical hardware

USE CASE 3

Control the Kinect's tilt motor and LED from a Python script to build a custom interactive installation

USE CASE 4

Prototype a 3D scanning or gesture-tracking application using the Kinect's depth and color streams

Tech stack

CC++PythonRubyJavaC#

Getting it running

Difficulty · moderate Time to first run · 30min

Requires the original Kinect v1 hardware (model 1414), the newer Kinect v2 is not compatible and needs libfreenect2.

Use freely for any purpose including commercial projects, under either the Apache 2.0 or GPL v2 license, your choice.

In plain English

Libfreenect is an open-source driver that lets you access data from the original Xbox 360 Kinect sensor on a regular computer. The Kinect was a motion-sensing peripheral that used a combination of a color camera, an infrared depth sensor, and a microphone array to track body movement and capture 3D spatial data without requiring the user to hold a controller. Microsoft built it for the Xbox 360, but enthusiasts and researchers quickly found ways to tap into its data stream on PCs. This library provides that access on Linux, macOS, and Windows. Once connected and the driver installed, you can read the RGB color image from the camera, the depth image that shows how far each point in the scene is from the sensor, and audio from the microphone array. You can also control the motor that tilts the device, the indicator LED, and read values from the built-in accelerometer. The library is written in C with wrappers available for C++, C#, Python, Ruby, Java, and ActionScript. A tool called fakenect lets you record a session to disk and play it back later without needing the physical hardware, which is useful for testing and development. An important note: this library is for the original Kinect (model 1414 and similar). The newer Kinect v2 that shipped with the Xbox One uses a different and incompatible sensor design. A separate project, libfreenect2, exists for that device. The project is maintained by the OpenKinect community and is licensed under a dual Apache v2 and GPL v2 license. It originated as a reverse-engineering effort shortly after the Kinect was released in 2010.

Copy-paste prompts

Prompt 1
Using the libfreenect Python bindings, write code that reads depth frames from a Kinect v1 and displays them as a grayscale image using OpenCV.
Prompt 2
With libfreenect, how do I record a Kinect depth and color session to disk and replay it later using fakenect for offline testing?
Prompt 3
I want to tilt my Kinect motor from a C program using libfreenect. Show me the API calls needed to set the tilt angle.
Prompt 4
Set up libfreenect on Ubuntu and run the glview example to confirm my Kinect v1 sensor is working correctly.
Open on GitHub → Explain another repo

← openkinect on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.