OpenNI2 SDK  v2.3.0.66
Installation
OS Requirements Details
Windows 1、Windows 7, 8 and 10, 32-bit and 64-bit
2、x86-based processor @ 1.8+ ghz
3、USB 2.0
4、4 gigabytes of RAM
Supports development with Visual Studio 2013/2015/2017/2019. Visual Studio 2017/2019 use the same package with Visual Studio 2015.
Linux 1、Ubuntu 14.04 or later(Ubuntu 20.04), x86_64, arm, arm64
2、amd64-based processor @ 1.8+ ghz
3、USB 2.0
4、1 gigabyte of RAM
GCC 4.9 and Clang 3.5 have both been extensively tested, but any compiler with support for C++11 should be compatible,including GCC 4.9 or better, Clang 3.1 or better, and Android NDK r9e or better.
Android 1、Android OS 4.4.2 (KitKat) +
2、ARMv7a/ARM64v8a processor @ 1.5 ghz+
3、USB 2.0 host support (OTG-capable)
4、512 megabytes of RAM
GCC 4.9 and Clang 3.5 have both been extensively tested, but any compiler with support for C++11 should be compatible,including GCC 4.9 or better, Clang 3.1 or better, and Android NDK r9e or better.

Windows Installation

Installing the Driver

First, download the latest Orbbec Sensor Driver for Windows, then run the installer:

1.Click install to start install process.

install_driver_01.png

2.While in the dirver installer wizard window, click next.

install_driver_02.png

3.If you see panel like this, the dirver installed right.

install_driver_03.png

4.After install finished, click finish to complete

install_driver_04.png

5.When you complete install the driver, you can connect the device to your PC, then in your device manager, you will see the new orbbec deivce.

install_driver_05.png

Download the SDK

We provide SDK versions list blow:

Download the corresponding version SDK.

Setup for Visual Studio

1.Copy OpenNI2 SDK sdk/windows to a folder, for example called $OpenNI_SDK_HOME.

2.Open a new project or an existing one.

3.In the Visual Studio menu, open the Project menu and choose Project properties.

installation_vs_project_properties_en.png

4.In the C/C++ section, under the General node, find the "Additional Include Directories" and add "$(OpenNI_SDK_HOME)\include".

installation_vs_include.png

5.In the Linker section, under the General node, find the "Additional Library Directories" and add "$(OpenNI_SDK_HOME)\x64-Release".

installation_vs_lib_dir.png

6.In the Linker section, under the Input node, find the "Additional Dependencies" and add OpenNI2.lib。

installation_vs_libs.png

Run the NiViewer.exe

In the -Release\ folder,run the NiViewer.exe, you will see below:

nivewer_demo_res.png

Linux Installation

Installing the Driver

Devices under the Linux platform are loaded as common CMOS cameras. Currently, the popular Linux platforms have built-in corresponding drivers, and no additional installation is required.

But installation prerequisites are required:

freeglut3

Configure the OpenNI2 SDK in the Makefile

Library files

Configuration files

Configuration in the Makefile

Run Sample and NiViewer

1.First, connect the camera and computer, and check the device through the following command line:

username@ubuntu:~$ lsusb

At this point, you can view the PID/VID of the camera device, and then use the OpenNI SDK to view the depth image.

2.Obtain the SDK packet of the corresponding platform in the official developer community. Website: OpenNI SDK for Linux This topic selects the Linux-x64 platform. Decompresses it after downloading. For more information about how to use the SDK, see Readme in the folder.

username@ubuntu:~/OpenNI-Linux-x64-2.3.0.65$ vi Readme

3.Next, install the Sample runtime environment. Follow the steps in the Readme document to install the necessary libraries, and then install and configure the environment. The command line is as follows:

username@ubuntu:~/OpenNI-Linux-x64-2.3.0.65$ sudo apt-get install build-essential freeglut3 freeglut3-dev
username@ubuntu:~/OpenNI-Linux-x64-2.3.0.65$ sudo ./install.sh
username@ubuntu:~/OpenNI-Linux-x64-2.3.0.65$ source OpenNIDevEnvironment

Note: You may need to modify the file permissions to run install.sh. You can use "ll" to view the permissions and "chmod" to modify the permissions, as follows:

username@ubuntu:~/OpenNI-Linux-x64-2.3.0.65$ ll
username@ubuntu:~/OpenNI-Linux-x64-2.3.0.65$ chmod 777 install.sh

4.Next, run provided Sample executable files in the Bin folder under the Sample path. Similarly, you need to use "chmod" to modify file permissions. Take SimpleViewer as an example. Run the "sudo" command to run the program. The command line is as follows:

username@ubuntu:~/OpenNI-Linux-x64-2.3.0.65/Sample/Bin$ chmod 777 SimpleViewer
username@ubuntu:~/OpenNI-Linux-x64-2.3.0.65/Sample/Bin$ sudo ./SimpleViewer

5.At the same time, there is a NiViewer executable file in the Tools Directory. Run the NiViewer by running the following command at the command line terminal:

username@ubuntu:~/OpenNI-Linux-x64-2.3.0.65/Tools$ ./NiViewer

You will see the following display:

nivewer_demo_res.png

Android Installation

Installing the Driver

Under the Android platform, since the underlying layer is based on the Linux platform, the corresponding driver of the camera has been built in, so no additional installation is required.

Setup for Android Studio

Library files

The libraries provided by the OpenNI2 SDK for Android users include two parts, five so dynamic library files and one jar file:

ini files

Two ini configuration files

Configure the OpenNI2 SDK in the Android Studio project

Run Android Sample

Comming soon.