Step 0: DependenciesInstall the following packages:
sudo apt-get install cmake git libusb-dev freeglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev libgtk2.0-dev python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev
Step 1: libFreeNect, the device driver for KinectGet libfreenect https://github.com/OpenKinect/libfreenect
Clone it. Then follow instructions on their wiki page to install: http://openkinect.org/wiki/Getting_Started#Ubuntu_Manual_Install
Be sure to set libfreenect into the LD_LIBRARY_PATH. What I did was adding the line below into my
Step 2: OpenNI2, the software foundationGet OpenNI2 at http://www.openni.org/openni-sdk/ and install by executing the script
install.sh. You have to be root/sudo to do that.
Step 3: NiTE2, the PrimeSense middleware that calculates the skeletonDownload it from http://www.openni.org/files/nite/ You will be asked to register or log in before you can download. After downloading, extract the files and run the
Now, run the test app
NiTE-Linux-x64-2.2/Samples/Bin/to see whether you can get your skeleton extracted.
Step 5: OpenCV
Option 1: Using apt-get
sudo apt-get install libopencv-dev
It will install all needed packages for you.
Option 2: Compiling from sourceDownload OpenCV from http://opencv.org/downloads.html and follow instructions at http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation
You do not have to set
/usr/local. It can be any where other than the directory where you will run
Also, do not forget to append LD_LIBRARY_PATH with installed OpenCV's
This link might help: https://help.ubuntu.com/community/OpenCV
TroubleshootingIf you get OpenNI initialization failure error like this: http://stackoverflow.com/questions/14383759, make sure that you have
libfreenectDriver.so(the bridge between OpenNI2 and libfreenect, NOT libfreenect itself) in place and
libfreenect.sois pointed by