Based on the Dragonboard 410c development board android platform to build kinect operating environment

Following the previous article "The config of the kinect tutorial based on the qualcomm platform", this article will next introduce the running environment of kinect built on the android platform based on qualcomm.

I. Overview

This tutorial is based on the qualcomm android platform to build kinect runtime environment, we use: OpenFramework+OpenNI+Kinect of android, where Kinect of android is a sub-project in the OpenFramework source code; the following is the specific construction steps.

Second, the hardware environment: Dragonboard 410c + Kinect

Figure 1 Dragonboard 410c

Figure 2 Kinect sensor

Third, the software environment

OpenFramework+OpenNI+Kinect of android, where Kinect of android is a sub-project of OpenFramework source code, my compilation environment is 64-bit ubuntu, the following describes the construction of each part in detail.

1.OpenNI

1.1. Building OpenNI 2.2:

1.1.1 Download the android ndk compilation tool:

Cd $HOME

Mkdir work

Cd work

Wget http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2

Tar -jxvf android-ndk-r8e-darwin-x86_64.tar.bz2

1.1.2. Download OpenNI2.2 from git:

Cd $HOME/work

Git clone https://github.com/OpenNI/OpenNI2.git

Cd OpenNI2

# Manually modify the PS1080.ini path

Vi ./Source/Drivers/PS1080/Sensor/XnSensor.cpp

#define XN_GLOBAL_CONFIG_FILE_NAME "PS1080.ini" -> #define XN_GLOBAL_CONFIG_FILE_NAME "/system/lib/PS1080.ini"

#Modify the OpenNI.ini path

Vi. /Source/Core/OniContext.cpp

staTIc const char* ONI_CONFIGURATION_FILE = "OpenNI.ini"->staTIc const char* ONI_CONFIGURATION_FILE = "/system/lib/OpenNI.ini";

Static const char* ONI_DEFAULT_DRIVERS_REPOSITORY = "OpenNI2" XN_FILE_DIR_SEP "Drivers" ->static const char* ONI_DEFAULT_DRIVERS_REPOSITORY = "/system/lib/";

1.1.3 Compiling OpenNI2.2:

Cd packaging

Python ReleaseVersion.py android

Cd Final

Tar -xvf OpenNI-android-2.2.tar

Cd OpenNI-android-2.2

Ls

EventBasedRead OpenNI.ini SimpleRead libOpenNI2.so libPSLink.so

MultipleStreamRead PS1080.ini libOniFile.so libPS1080.so libusb.so

# Push the following important library files to the Android directory

Adb push OpenNI.ini /system/lib/

Adb push PS1080.ini /system/lib/

Adb push libOpenNI2.so /system/lib/

Adb push libPS1080.so /system/lib/

Adb push libusb.so /system/lib/

Adb push libOniFile.so /system/lib/

Adb push libPSLink.so /system/lib/

Adb push SimpleRead /system/lib/

# Detect the operation of OpenNI:

Adb shell

Cd /system/lib/

SimpleRead

./SimpleRead

[00000000] 585

[00033369] 585

[00066738] 584

[00100107] 584

[00133477] 584

[00166846] 584

[00200215] 584

[00233584] 583

[00266954] 583

......

2.OpenFramework 8.1

2.1. Download the openframework source code and build the build environment. For details, refer to http://openframeworks.cc/setup/android-eclipse/ for download configuration.

2.2. Download android NDK

Cd $HOME/work

Wget http://dl.google.com/android/ndk/android-ndk-r9d-darwin-x86_64.tar.bz2

Tar -jxvf android-ndk-r8d-darwin-x86_64.tar.bz2

2.2 Setting OpenFramework's paths.make

Vi libs/openFrameworksCompiled/project/android/paths.make

SDK_ROOT=$HOME/work/

NDK_ROOT=$HOME/work/android-ndk-r9d

2.3 Setting the library fie and make file of OpenNI include

Modify the "libs/openFrameworksCompiled/project/android/config.android.default.mk" file

ABIS_TO_COMPILE_RELEASE = armv5 armv7 neon — > ABIS_TO_COMPILE_RELEASE = armv5 armv7 neon x86

< PLATFORM_LDFLAGS += –sysroot=$(SYSROOT) -nostdlib -L”$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(GCC_VERSION)/libs/$(ABI_PATH)” -L$HOME/work/ OpenNI2/Packaging/Final/OpenNI-android-2.2 — > PLATFORM_LDFLAGS += –sysroot=$(SYSROOT) -nostdlib -L”$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(GCC_VERSION)/libs/ $(ABI_PATH)"

PLATFORM_HEADER_SEARCH_PATHS += "$HOME/work/OpenNI2/Include"

PLATFORM_LIBRARIES += OpenNI2

PLATFORM_LIBRARIES += OniFile

PLATFORM_LIBRARIES += PS1080

3.android application

You can download the latest application test project and verify the results at http://OpenNIExample.tar.gz.

Steel Braided Tube

Flexible hose,oil delivery pipe,Steel braided hose

Chongqing LDJM Engine Parts Center , https://www.ckcummins.com

Posted on