Skip to content

Orbbec Astra Instructions

btlorch edited this page Jul 4, 2017 · 6 revisions

Note that MetriCam contains two projects Orbbec and OrbbecOpenNI to connect to Orbbec's Astra cameras. Project Orbbec is based on Astra SDK provided by the manufacturer, which is build on top of OpenNI2 to simplify development. In contrast, OrbbecOpenNI is directly based on OpenNI2 and has more possibilities to interact with the camera.

Project Orbbec

Prerequisites

Please note that this set of steps is not meant to replace the install instructions provided the manufacturer.

  • Download and install the Astra driver from orbbec3d.com
  • Download the latest Astra SDK for Visual Studio from the same website
  • After extracting the Astra SDK, you should be able to run the provided samples in the bin directory.

Running the Orbbec Astra camera with MetriCam

  • To compile your project, you will have to set additional library and include directories pointing to the Astra SDK. In Visual Studio, right click on the Orbbec project. In the C/C++ section configure the Additional Include Directories to something like C:\lib\AstraSDK-0.5.0-20160426T103143Z-vs2013-win64\include;%(AdditionalIncludeDirectories). In the Linker menu configure Additional Library Dependencies similarly, e.g. C:\lib\AstraSDK-0.5.0-20160426T103143Z-vs2013-win64\lib;%(AdditionalLibraryDirectories).
  • After building your project, copy the following files and folders from the AstraSDK's bin directory next to your compiled binary:
astra.dll
astra_core.dll
astra_core_api.dll
OpenNI.dll
OpenNI2.dll
OpenNI2/
Plugins/

Project OrbbecOpenNI

To compile this project, you need to make sure that the compiler and linker can find the OpenNI2 headers und library, respectively. The project file is configured to determine the location of these files from environment variables.

  • Set up an environment variable OPENNI2_INCLUDE32 that points to the Include directory which contains the OpenNI2 headers.
  • Set up an environment variable OPENNI2_LIB32 that points to the Lib directory which contains the static 32-bit OpenNI2 library.

In addition, you need XnLib which comes with OpenNI2.

  • Clone the OpenNI2 repository.
  • Open OpenNI.sln and compile the XnLib project. This should output a static library.
  • Open the properties of the OrbbecOpenNI project. In the C/C++ tab, adjust the Additional Include Directories setting to include the path to the XnLib's header files. In the Linker tab, append the path to your compiled static library in the Additional Library Directories and put the name of the static library in the Additional Dependencies setting.
Clone this wiki locally