OpenNI2 DS325 and Android ODROID 4.4.2 memo

Install Android 4.4.2 to ODROID U3 Community Edition($65), let’s try to use 3D point cloud with Depth Sense DS325. All environment is here.

ODROID U-3 Community Edition
OS : Android 4.4.2
Camera : DepthSense DS325
Software: OpenNI2 for DS325, openFrameworks 8.1

IMG_2642

Connection each others.

Application running result.

Android with OpenNI2 and DS325 can easy to use. In this case I use ODROID as Android, DS325 is verrry small and light weight. Capturing real-world 3D model using mobile devices(like a Google Tango project) is coming here.

OpenNI2 DS325 driver for Android and Arm Linux(Raspberry Pi)

SIProp.org develop OpenNI2 DS325(DepthSense) driver for Android and Arm Linux. There is no choice to use DepthSense 3D ToF sensor camera in embedded device(Arm, Android…), because of PrimeSense Xtion is discontinued and will be hard to get. Here is “How to build OpenNI2 DS325 driver for Android and Arm Linux Raspberry Pi”.

1.  Android Build

# Build OpenNI2 DS325 Driver for Android
wget http://dl.google.com/android/ndk/android-ndk-r8e-darwin-x86_64.tar.bz2
tar -jxvf android-ndk-r8e-darwin-x86_64.tar.bz2
cd android-ndk-r8e
export NDK_ROOT=$PWD
export PATH=$PATH:$PWD
cd ..
git clone https://github.com/SIProp/openni2ds325.git
cd openni2ds325/Packaging/
python ReleaseVersion.py android

# copy all shared libraries and ini file to Android
cd OpenNI-android-2.2
./adb push libusb.so /system/lib/
./adb push libOpenNI2.so /system/lib/
./adb push libOniFile.so /system/lib/
./adb push libDS325.so /system/lib/
./adb push libPSLink.so /system/lib/
./adb push libPS1080.so /system/lib/
./adb push OpenNI.ini /system/lib/
./adb push PS1080.ini /system/lib/
./adb push DS325.ini /system/lib/
./adb push SimpleRead /system/lib/

# Sample Application Build
cd openni2ds325/Samples/DS325Sample/jni/
ndk-build

# import DS325Sample Project on Eclipse and Run.

 

2. ARM Raspberry Pi

sudo apt-get update
sudo apt-get install g++ python libusb-1.0-0-dev freeglut3-dev \
                      doxygen graphviz openjdk-6-jdk libudev-dev
git clone https://github.com/SIProp/openni2ds325.git

# edit "ThirdParty/PSCommon/BuildSystem/Platform.Arm" file
------------------------------------------------
# change CFLAGS option.
CFLAGS += -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=softfp #-mcpu=cortex-a8
to
CFLAGS += -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard

# disable NEON option
DEFINES += XN_NEON
to
#DEFINES += XN_NEON
------------------------------------------------

# build OpenNI2
cd openni2ds325/Packaging
python ReleaseVersion.py Arm

# Run and check DS325
cd OpenNI-Linux-Arm-2.2/Samples/Bin
./SimpleRead