-
Notifications
You must be signed in to change notification settings - Fork 3
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.
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.
- 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 likeC:\lib\AstraSDK-0.5.0-20160426T103143Z-vs2013-win64\include;%(AdditionalIncludeDirectories)
. In the Linker menu configureAdditional 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/
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 theInclude
directory which contains the OpenNI2 headers. - Set up an environment variable
OPENNI2_LIB32
that points to theLib
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 theAdditional 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 theAdditional Library Directories
and put the name of the static library in theAdditional Dependencies
setting.