Jetson tk1 安装OpenNI 1 +Xtion Pro +NiTE
参考:
1
|
http://blog.csdn.net/xiabodan/article/details/44496871
|
序:
由于第三方库 NiTE2.0 不支持 arm 架构的处理器,因此需要安装OpenNI 1.x +NiTE 1.x 版本
1. 安装OpenNI 1.x
1.1 准备工作
1
2
|
sudo
apt-get update
sudo
apt-get
install
git g++ python libusb-1.0-0-dev freeglut3-dev openjdk-6-jdk doxygen graphviz
|
1.2 下载稳定版本的OpenNI和PrimeSense
1
2
3
|
Git clone https:
//github
.com
/OpenNI/OpenNI
.git
git clone git:
//github
.com
/avin2/SensorKinect
.git (如果你的是kinect 下载此项)
git clone https:
//github
.com
/PrimeSense/Sensor
.git (如果你的是xtion下载此项)
|
1.3 修改文件
1
2
|
cd
OpenNI
/Platform/Linux/Build/Common
gedit Platform.Arm
|
将
1
2
|
CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
#-mcpu=cortex-a8
_to
|
改为:
1
|
CFLAGS += -march=armv7-a -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
保存
1.4. 安装
1
2
3
4
|
cd
~
/OpenNI/Platform/Linux/CreateRedist/
.
/RedistMaker
.Arm
cd
~
/OpenNI/Platform/Linux/Redist/OpenNI-Bin-Dev-Linux-Arm-v1
.5.2.23
sudo
.
/install
.sh
|
OK,OpenNI 1.x 安装完毕
2. Xtion Pro 驱动安装
2.1 修改文件
1
2
3
4
|
cd
~
/Sensor/Platform/Linux/Build/Common/
(xtion)
gedit Platform.Arm
cd
~
/SensorKinect/Platform/Linux/Build/Common/
(kinect)
gedit Platform.Arm
|
将
1
|
CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
#-mcpu=cortex-a8
|
改为:
1
|
CFLAGS += -march=armv7-a -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
2.2 开始安装
1
2
3
4
|
cd
~
/Sensor/Platform/Linux/CreateRedist/
.
/RedistMaker
Arm
cd
~
/Sensor/Platform/Linux/Redist/Sensor-Bin-Linux-Arm-v5
.1.0.41
sudo
.
/install
.sh
|
2.3 运行例子
1
2
3
4
|
cd
~
/OpenNI/Platform/Linux/Bin/Arm-Release
sudo
.
/Sample-NiCRead
sudo
.
/Sample-NiBackRecorder
time
1 depth vga
sudo
.
/Sample-NiSimpleRead
|
OK,完工!