How to install Kinect drivers
Here you will find instructions to install the required dependencies (OpenNI and Kinect drivers) to be able to use the OpenCV interface to get access to Kinect streams.
Installing OpenNI
Get the OpenNI source from the Git repository, it is convenient to create a directory to store the source code and the build files
mkdir $KINECT
cd $KINECT
git clone git://github.com/OpenNI/OpenNI.git
Install the OpenNI dependencies
apt-get install g++ python libusb-1.0-0-dev freeglut3-dev
and optionally
apt-get install doxygen graphviz mono-complete
You will also need to install a JDK. The OpenNI authors suggest to install OpenJDK
apt-get install openjdk-6-jdk
however, I have some reasons to prefer installing Oracle JDK. Feel free to install whatever you prefer.
Compile the sources
cd $KINECT/OpenNI/Platform/Linux/CreateRedist
./RedistMaker
and install them
cd $KINECT/OpenNI/Platform/Linux/Redist/OpenNI-Bin-Dev-Linux-x64-v*
sudo ./install.sh
Installing the Kinect driver
You should try installing the Kinect driver repository. The sources can be cloned from GitHub cd $KINECT git clone git://github.com/avin2/SensorKinect.git However, in my installation this version failed to compile with error: usr/include/ni/XnOS.h:327:49: error: cannot allocate an object of abstract type 'XnSensorDepthGenerator' therefore, I used this version instead git clone git://github.com/ph4m/SensorKinect.git
Build the Kinect drivers
cd $KINECT/SensorKinect/Platform/Linux/CreateRedist
./RedistMaker
and install them
cd $KINECT/SensorKinect/Platform/Linux/Redist/Sensor-Bin-Linux-x64-v*
sudo ./install.sh