- Notifications
You must be signed in to change notification settings - Fork1.2k
Drivers and libraries for the Xbox Kinect device on Windows, Linux, and OS X
OpenKinect/libfreenect
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
libfreenect is a userspace driver for the Microsoft Kinect.It runs on Linux, OSX, and Windows and supports
- RGB and Depth Images
- Motors
- Accelerometer
- LED
- Audio
Notice: If you have the newer Kinect v2 (XBox One), useOpenKinect/libfreenect2 instead.
To build libfreenect, you'll need
- libusb >= 1.0.18 (Windows needs >= 1.0.22)
- CMake >= 3.12.4
- python >= 2.7 or >= 3.3 (only if BUILD_PYTHON=ON or BUILD_PYTHON2=ON or BUILD_PYTHON3=ON or BUILD_REDIST_PACKAGE=OFF)
For the examples, you'll need
- OpenGL (included with OSX)
- glut (included with OSX)
- pthreads-win32 (Windows)
git clone https://github.com/OpenKinect/libfreenectcd libfreenectmkdir buildcd buildcmake -L .. # -L lists all the project optionsmake# if you don't have `make` or don't want color output# cmake --build .Use CMake options to control what gets built.For example, to build the Python wrapper (defaults to system Python):
cmake .. -DBUILD_PYTHON=ONmakeOr the Python 3 wrapper:
cmake .. -DBUILD_PYTHON3=ONmakeYou can specify a build with debug symbols:
cmake .. -DCMAKE_BUILD_TYPE=debug# or with optimizations# cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfoYou can build .deb, .rpm, and/or .tgz packages withcpack:
cmake .. -DBUILD_CPACK_DEB=ON -DBUILD_CPACK_RPM=ON -DBUILD_CPACK_TGZ=ONcpackFor audio support, you must upload firmware to the device.Newer Kinect models may require audio firmware for motor and LED support.The best method is toinsert firmware at runtime just after callingfreenect_init().
Alternately, firmware for Kinect model 1414 can be downloaded automatically by specifying:
cmake .. -DBUILD_REDIST_PACKAGE=OFFNote that firmware may not be legal to redistribute in your jurisdiction!
If you don't have a package manager, installHomebrew.For a manual build, seethe wiki.
brew install libfreenect# or get the very latest:# brew install --HEAD libfreenectsudo port install git-core cmake libusb libtoolContinue withFetch & Build.
Remember to install theudev rules.For a manual build, seethe wiki.
The version packaged in Ubuntu may be very old.To install newer packaged builds, seethe wiki.Continue with this section for a manual build.
sudo apt-get install git cmake build-essential libusb-1.0-0-dev# only if you are building the examples:sudo apt-get install freeglut3-dev libxmu-dev libxi-devContinue withFetch & Build.
There is also adebian branch for packaging purposes.
There aredev-libs/libfreenect ebuilds in theoverboard repo.
There is alibfreenect PKGBUILD in the AUR.Alternately, thelibfreenect-git PKGBUILD builds the very latest.
As of libusb 1.0.22,libusbK isochronous transfers are now supported natively. There is no longer a need to compile a custom version of libusb.
UseZadig to install the libusbK driver for each device you wish to use.FollowFetch & Build or use Github and CMake GUI tools.Remember to supply paths to CMake so it can find dependencies.For example:
cmake .. -DLIBUSB_1_INCLUDE_DIR="C:\path\to\libusb\include" -DLIBUSB_1_LIBRARY="C:\path\to\libusb\libusb.lib"Interfaces to various languages are provided inwrappers/.Wrappers are not guaranteed to be API stable or up to date.
- C (using a synchronous API)
- C++
- C#
- python
- ruby
- actionscript
- Java (JNA)
Using fakenect, you can record a session to a directory and play it back later.
mkdir sessionfakenect-record ./sessionTo use a fakenect recorded stream, just provide the fakenect lib as a pre loaded library withLD_PRELOAD and indicates the recorded files directory withFAKENECT_PATH.
- Sample with python wrappers :
LD_PRELOAD="/usr/local/lib/fakenect/libfakenect.so" FAKENECT_PATH="./session" python ./wrappers/python/demo_cv_sync.py
- Sample with C bin :
LD_PRELOAD="/usr/local/lib/fakenect/libfakenect.so" FAKENECT_PATH="./session" freenect-glview
In order of importance:
- Make sure to sign commits:
git commit -s - Use afeature branch in your own fork and target master with pull requests
- Tab indentation, no trailing whitespace
Ongoing Development and Maintenance by the OpenKinect Community
- Original Code and Engineering: Hector Martin (marcan)
- Community Lead: Josh Blake (JoshB)
- Integration: Kyle Machulis (qDot)
The libfreenect project is covered under a dual Apache v2/GPL v2license. The licensing criteria are listed below, as well as at thetop of each source file in the repo.
This file is part of the OpenKinect Project. http://www.openkinect.orgCopyright (c) 2010 individual OpenKinect contributors. See the CONTRIBfile for details.This code is licensed to you under the terms of the Apache License,version 2.0, or, at your option, the terms of the GNU General PublicLicense, version 2.0. See the APACHE20 and GPL2 files for the text ofthe licenses, or the following URLs:http://www.apache.org/licenses/LICENSE-2.0http://www.gnu.org/licenses/gpl-2.0.txtIf you redistribute this file in source form, modified or unmodified,you may:- Leave this header intact and distribute it under the same terms, accompanying it with the APACHE20 and GPL2 files, or- Delete the Apache 2.0 clause and accompany it with the GPL2 file, or- Delete the GPL v2 clause and accompany it with the APACHE20 fileIn all cases you must keep the copyright notice intact and include acopy of the CONTRIB file.Binary distributions must follow the binary distribution requirementsof either License.Information about the OpenKinect project can be found athttp://www.openkinect.org
For questions, support, and discussion, check out the google groups mailing list athttp://groups.google.com/group/openkinect
Or the IRC channel at #openkinect onFreenode
We are also on twitter athttp://twitter.com/openkinect
About
Drivers and libraries for the Xbox Kinect device on Windows, Linux, and OS X
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.