Install OpenNi2 and Nite2 on Linux

Neriman Arif picture Neriman Arif · Sep 5, 2015 · Viewed 7.1k times · Source

Im not able to find the website and instructions how to install openni2 and nite2 on linux. Does anyone know where i can find these libs and how to install them?

Answer

jackie tom picture jackie tom · Aug 21, 2018

http://www.linuxdiyf.com/linux/25349.html

This link Have showed how to install Openni2 & NiTE2 in ubuntu 16.04

I reorganized it as follows

sudo apt-get install git g++ cmake libxi-dev libxmu-dev libusb-1.0-0-dev pkg-config freeglut3-dev build-essential

mkdir -p HandTrack/src
cd HandTrack/src
#install libfreenect
git clone https://github.com/OpenKinect/libfreenect.git
cd libfreenect
mkdir build; cd build
cmake .. -DBUILD_OPENNI2_DRIVER=ON
make
sudo make install

sudo mkdir -p /etc/udev/rules.d/
sudo cp ../platform/linux/udev/51-kinect.rules /etc/udev/rules.d/

#install Openni2
cd PATHTO/HandTrack/src
wget https://s3.amazonaws.com/com.occipital.openni/OpenNI-Linux-x64-2.2.0.33.tar.bz2

tar -xjvf OpenNI-Linux-x64-2.2.0.33.tar.bz2 && rm OpenNI-Linux-x64-2.2.0.33.tar.bz2
cd OpenNI-Linux-x64-2.2
sudo ./install.sh
#Test installation of Openni2
cd PATHTO/HandTrack/src
cp libfreenect/build/lib/OpenNI2-FreenectDriver/libFreenectDriver.so OpenNI-Linux-x64-2.2/Redist/OpenNI2/Drivers/

cp libfreenect/build/lib/OpenNI2-FreenectDriver/libFreenectDriver.so OpenNI-Linux-x64-2.2/Tools/OpenNI2/Drivers/

sudo apt-get install usbutils
lsusb #You should see kinect devices

cd OpenNI-Linux-x64-2.2/Tools
./NiViewer

#Install NiTE2
cd PATHTO/HandTrack/src

wget http://jaist.dl.sourceforge.net/project/roboticslab/External/nite/NiTE-Linux-x64-2.2.tar.bz2

tar xjvf NiTE-Linux-x64-2.2.tar.bz2 && rm NiTE-Linux-x64-2.2.tar.bz2

cd NiTE-Linux-x64-2.2
sudo ./install.sh

cd  ..
cp libfreenect/build/lib/OpenNI2-FreenectDriver/libFreenectDriver.so NiTE-Linux-x64-2.2/Samples/Bin/OpenNI2/Drivers/

cp OpenNI-Linux-x64-2.2/Redist/libOpenNI2.so NiTE-Linux-x64-2.2/Samples/Bin

cd NiTE-Linux-x64-2.2/Samples/Bin
./UserViewer