安装方法
安装依赖项
$ sudo apt-get install -y g++ python libusb-1.0-0-dev freeglut3-dev doxygen graphviz
$ sudo apt-get install libudev-dev
$ apt-cache search openni2
libopenni2-0 - framework for sensor-based 'Natural Interaction'
libopenni2-dev - headers for OpenNI 'Natural Interaction' frameworks
openni2-doc - developer documentation for OpenNI frameworks
openni2-utils - debug and test utilities OpenNI2 framework
$ sudo apt-get install libopenni2-dev
测试是否成功,成功的话会出现 2.2.0.0
pkg-config --modversion libopenni2
问题
在之后的连接kinect过程中有这样的一个错误
DeviceOpen using default: no devices found
参考这里解决的ubuntu16.04 编译和配置openni2 opencv2 libfreenect2(OpenKinect)
* step one
sudo ln -s /lib/x86_64-linux-gnu/libudev.so.1.6.4 /lib/x86_64-linux-gnu/libudev.so.0
* step two
需要将libfreenect2/build/lib中的libfreenect2-openni2.so 和 libfreenect2-openni2.so.0放置在OpenNI2\Tools\OpenNI2\Drivers中
然后运行OpenNI2\Tools\NiViewer