[ANDROID][SOLVED] DEPTH Sensor not being able to return frames

Using the Orbbec Persee I have been trying to modify NiViewer Android App’s source code to capture depth maps from the depth sensor’s stream.
However, upon changing the source sensor of the stream to “Depth” the VideoStream does not return any frames and the status like reads “Waiting for frames” indefinitely. BUT, the when the source sensor is set to “IR” the frames are returned as and when the VideoStream object is polled.

Has anyone been able to get this basic source code working on Orbbec Persee in DEPTH mode? If so please guide me regarding the same.

I have the same problem with the Astra mini. I downloaded the NiViewer Android app from the Orbbec website, built it, and installed on my phone. I can see the color and iR, but not the depth stream. Let me know if anyone was able to see the depth stream on an Android phone.

PS: It works perfectly fine with the Linux sample app.

Thanks.

Hello,
We are stuck with this issue for couple of weeks now and cannot get the depth stream started with the Android app. Upon debugging the Android app, we get messages such as “W/OpenNI: Read: Depth Buffer is corrupt. Size is … (!= …)”. Tried with all video modes (thus all resolutions) and still does not work. The Astra mini claims to support VGA and QVGA (640 X 480), but selecting that video mode does not help in the Android app. Based on corrupt logs above, we estimated the resolution and added a new video mode in the code, but it fails in OpenNI saying that the new resolution is not supported.

I appreciate if anyone can comment on this issue.

Thank you,

Hi pkolan,

Thanks for asking. We have just released a new version of OpenNI SDK. Please visit our website from the link below and download the latest version to see if this will help with your development.

Hi Jackson,
Thank you and the team for the update.
The new SDK works perfectly and is able to return the frames from DepthSensor.

Thank you once again,
Best,
Kaunil Dhruv.

1 Like

Hi Jackson,
Thank you for a quick response. Yes, the new SDK and new app are working fine and we see the depth stream. Also, the old NiViewer.Android app was missing the orbbec.ini and PS1080.ini files. When I copied these two files from new Android app to the old NiViewer.Android app, the old app worked fine too.

A follow up question: Both the old and new apps have access (based on sensor selection in UI in old Android app) to either the depth or color stream at a given time. The frames are available in the onVideoModeSelected call back in StreamView (in old Android app). There are two different apps for color and depth capture with the new release. Is it possible to have both the color and depth frames available at the same time in one single app? We would like to synchronize the depth and color frames for our tasks.

Thank you.

Hi Jackson and All,
Just wanted to check if you have any suggestions for us. In all the Android apps, we create a VideoStream with a sensor type (depth or color) and then start it to get corresponding frames (looks like Java API only supports one VideoStream per device). We would like to have both the depth and color frames available inside the app. We tried creating two VideoStreams and starting them, but the OpenNI.waitForAnyStream (streams,timeout) still returns frames from only one sensor. There is also information about depth and color registration in the forums, but our understanding is that registration will help if there are already multiple streams. Can anyone suggest (or point us to any examples) how to get both depth and color streams inside the Android app, either through multiple VideoStreams, registration, or ini parameter configuration?

Thank you.

Can you share the code for your implementation. I was working to implement a astra Pro with my android tab. I am facing a lot of problem with it can you please send me the link of the code how you were able to get dept frames from camera. If you could help me out that could be great.

Thanks in Advance.

I made an example for the Astra Mini (S). Maybe this can help you: GitHub - Michael-List/Orbbec_Astra_Example_Android: Orbbec Astra example for Android

Thanks for reply, but I have looked into this repo and even tried it out but the problem is I need the dipay of the dept map not thee value. I got some implementation for the same but there was a problem of loading a driver in android.
Logs.
I/OpenNIJNI: enter JNI_OnLoad()
I/OpenNIJNI: JNI_OnLoad() complete!
I/OpenNI: New log started on 2018-04-27 14:17:56
I/OpenNI: — Filter Info — Minimum Severity: NONE
V/OpenNI: OpenNI 2.3.0 (Build 15)-Android-Arm (Jul 26 2015 20:12:55)
V/OpenNI: Loading device driver ‘libOniFile.so’…
V/OpenNI: Loading device driver ‘libPS1080.so’…
I/OpenNI: New log started on 2018-04-27 14:17:56
I/OpenNI: — Filter Info — Minimum Severity: VERBOSE
V/OpenNI: Initializing USB…
V/OpenNI: Couldn’t use file ‘libPS1080.so’ as a device driver
V/OpenNI: Loading device driver ‘libPSLink.so’…
I/OpenNI: New log started on 2018-04-27 14:17:56
I/OpenNI: — Filter Info — Minimum Severity: VERBOSE
V/OpenNI: Initializing USB…
V/OpenNI: Couldn’t use file ‘libPSLink.so’ as a device driver
V/OpenNI: Loading device driver ‘libSD.so’…
W/OpenNI: Couldn’t use file ‘libSD.so’ as a device driver

This is the exact problem that i am facing. Android Support · Issue #140 · occipital/OpenNI2 · GitHub
I tried rooting my android device but no luck.
So if you could help with it that would be great.

Thanks fro reply but i have tried this also but no success.

http://dl.orbbec3d.com/dist/openni2/OpenNI_2.3.0.55.zip

I tried this link also for creating android app but no luck.

These was the error when i was using java colorforopenni code:-

2019-09-30 12:54:05.510 6858-6858/com.orbbec.obColor2 V/OpenNI: Couldn’t use file ‘liborbbec.so’ as a device driver
2019-09-30 12:54:05.510 6858-6858/com.orbbec.obColor2 V/OpenNI: Loading device driver ‘libPSLink.so’…
2019-09-30 12:54:05.511 6858-6858/com.orbbec.obColor2 E/OpenNI: Failed to get path: /data/data/com.orbbec.obColor2/lib//libPSLink.so
2019-09-30 12:54:05.511 6858-6858/com.orbbec.obColor2 E/OpenNI: Failed to get path: /data/data/com.orbbec.obColor2/files//libPSLink.so
2019-09-30 12:54:05.511 6858-6858/com.orbbec.obColor2 E/OpenNI: Failed to get path libPSLink.so for lib: /system/lib/libPSLink.so
2019-09-30 12:54:05.511 6858-6858/com.orbbec.obColor2 W/OpenNI: Couldn’t use file ‘libPSLink.so’ as a device driver
2019-09-30 12:54:05.511 6858-6858/com.orbbec.obColor2 V/OpenNI: Loading device driver ‘libSD.so’…
2019-09-30 12:54:05.511 6858-6858/com.orbbec.obColor2 E/OpenNI: Failed to get path: /data/data/com.orbbec.obColor2/lib//libSD.so
2019-09-30 12:54:05.511 6858-6858/com.orbbec.obColor2 E/OpenNI: Failed to get path: /data/data/com.orbbec.obColor2/files//libSD.so
2019-09-30 12:54:05.511 6858-6858/com.orbbec.obColor2 E/OpenNI: Failed to get path libSD.so for lib: /system/lib/libSD.so

If you could help me out. That would be great.