I am currently capturing data as .oni files from an android build of OpenNI 2.2.0 build 33, the same that is currently used by PCL. My problem is that when I try to use these .oni files with an PCL tools I receive various errors. These errors do not occur when I use .oni files found online. Additionally, I am able to view the .oni files I have gathered with NiViewer. All of this is rather confusing to me as I am not sure where I am introducing incompatibility. If anyone has advice it would be much appreciated. The source for my OpenNI build is from github.com/occipital/openni2.
For good measure I just tried to use the source found at github.com/OpenNI/OpenNI2 and have found the same problem. In both cases I receive the below error when trying to use pcl_oni_viewer or, for that mater, any pcl command.
$ pcl_oni_viewer datanew.oni
terminate called after throwing an instance of 'openni_wrapper::OpenNIException'
what(): void openni_wrapper::OpenNIDevice::Init() @ /home/aanunez/pcl-trunk/io/src/openni_camera/openni_device.cpp @ 384 : reading the value for pixels in shadow regions failed. Reason: No match found
Aborted (core dumped)
It seems that pcl_openni2_viewer is not installed with pcl. How can I download it?
In particular I am interested in converting oni files (recorded with OpenNI2) in pcd. The pcl_oni2pcd program seems to work only with OpenNI1. Is there a version for OpenNI2?
You will need to download and compile the PCL trunk from github for pcl_openni2_viewer. I am trying to do the same thing. I have concluded that my problem is with the structure sensor I am using. If you are not using that then you can simply download the trunk, compile all items, use the viewer to check data and kinfu to assemble it into a large PCD.
For me, pcl_openni2_viewer does not work with data I have recorded. It gives no helpful error message, just a driver crash. The program works fine with other data found online.
I am still working to resolve this issue. I am fairly certain that the problem is with values that are left unset by the structure sensor somehow. If I find a fix I will be sure to post it.
Modifications to the ini file are not needed for android (according to the structure sensor forums). I am still trying to find the problem, but I have not been able to spend a good amount of time on it. When something comes up I'll be sure to post.