Gazebo | Ignition | Community
Ask Your Question

Jiimmmbo's profile - activity

2016-09-11 18:46:00 -0600 asked a question .ONI file load using OpenNI2

I am programming in C++ and have been able to save a .oni depth file for testing purposes using OpenNI2.

I am now however unable to load this .ONI file back into a program to use. My code used is as follows:

Status rc_ = openni::STATUS_OK; Device

device_; rc_ = OpenNI::initialize();

char* fileaddress =

"C:\Users\James\DepthRecording1.oni";

rc_ = device_.open(fileaddress);

After the .open line has been executed, rc_ has the following status : STATUS_NO_DEVICE.

This is however the method of loading files as specified in the OpenNI2 documentation, and this code is proven to work if file address is switch for "openni::ANY_DEVICE", in which case it loads my 3D camera (Orbbec Astra). Does anyone know what needs to be changed/ added in order to be able to load the file?