-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I just get the data from realsense device on android : depth sensor, rgb camera . I have requirement of those resources in my background service. I dont want any container for rendering image on UI. Just I want data I will decrypt it on other way if required. Is there any API which solves this #8551
Comments
Hi @bjain409 The librealsense Android wrapper's example program capture may meet your needs with some modification to disable visual rendering, as it makes use of depth and RGB streams. My understanding is that the visual rendering is handled by the OpenGL GLRsSurfaceView elements of the script. So you could try removing or commenting-out these parts out or removing them until the program meets your needs of displayless streaming. The case in the link below about the Android capture example includes an image of the unmodified program running on a phone, to provide you with an illustration of the captured data: |
Thanks.. |
|
|
My understanding from your description earlier is that the Android app will be streaming depth and color continuously. You wish to be able to trigger a capture, which will save depth and color images. Is that correct, please? If it is, the links below provide examples of scripting references for converting an Android frame to a bitmap and then saving it as an image. These could possibly be used to program the desired feature in your Android application yourself. |
|
Hi @bjain409 Your new comment above just quotes my previous comment from 7 days ago. Do you require further assistance please? Thanks! |
@MartyG-RealSense I am not getting proper support for my requirement. Thanks. |
Hi again @bjain409 Is there anything more that I can do for you, bearing in mind that Intel cannot quickly create an Android feature to meet your needs. |
@MartyG-RealSense |
A feature request can be made but the process can take a significant period of time to complete and does not necessarily result in the feature request being approved for creation. This is why the preferable option is to develop your own solution based upon advice provided on this forum. |
@MartyG-RealSense |
@bjain409 In your opening message of this discussion, you stated the requirement for depth and RGB data on Android but with no UI rendering. As the Android Capture example provides simultaneous depth and RGB streaming, I suggested using that example's code but disabling the visual rendering elements so that your application could access the live stream data without needing to render it on-screen. After that suggestion, you added the following requirement: "I am building an Android apk with RealSense 4351i, wherein I will create an trigger from Android end for capture. The apk will be a background process running continuously. After capture is triggered I need object of RGB camera and depth camera. Is there any API defined which returns just the object of bitmaps". The Capture code with rendering disabled would seem to meet your needs for a background process running continuously. Am I correct in thinking that you also require a trigger mechanism in the Android app that will export a depth image and RGB image of the frame that was captured when the trigger was activated, please? And if that is correct, would the trigger be automatic (for example, a capture every 5 minutes) or would it be manually activated by a button press on the app? In link #8551 (comment) I pointed to examples of code for converting an Android frame to a bitmap and capturing it as a image. If that code is suitable for creating an image capture mechanism, then the only part of the project that would seem to be missing is the trigger mechanism. |
Hi @bjain409 Could you provide feedback about the advice provided in the comment above please? Thanks! |
@MartyG-RealSense |
@MartyG-RealSense Can you check |
It looks as though in this example, the dependency code mentioned in the above link is located in the build.gradle file in the folder examples/java_example/app/ |
Hello @MartyG-RealSense |
@MartyG-RealSense |
It looks as though the Android example has been cloned to your GitHub so it is mostly the same except for the MainActivity.java file. Did the program run okay on your GitHub in its original form before you began adapting MainActivity.java? |
|
|
My Android programming knowledge is limited, so I will seek advice about your case. |
@MartyG-RealSense |
I am not able to test Android programs myself unfortunately. I have sent a message to Intel for programming advice about your case. |
@MartyG-RealSense |
I have talked about your case with Intel. Another RealSense team member will join this discussion. |
@MartyG-RealSense |
If you are referring to Pull Requests, then you could edit a change into the source code version of librealsense and build it. Because it is a private custom version of librealsense though, only your librealsense build would have it and the change would not be a part of the public master branch of librealsense. Some RealSense users make a custom version by cloning a fork of librealsense from the librealsense GitHub to their own GitHub and then using that version. |
@MartyG-RealSense |
The other RealSense team member will work with you on your case when they join it. Please work with them. Thanks very much. |
@MartyG-RealSense |
As it is Saturday at the time of writing this, it may be after the weekend now. |
@MartyG-RealSense |
@MartyG-RealSense |
@bjain409 Sorry I didn't follow your requirement. If for the requirement in the ticket title, I think MartyG has replied the good solution. #8551 (comment) Or could you please clarify more about your requirements? Or anything missing in MartyG's reply? Thanks! And for your issue mentioned later, I saw you created another ticket #8728 We'll look into the later issue in that ticket. |
@RealSenseSupport |
@bjain409 Okay. Please clarify you detailed requirement in this ticket #8551. |
@RealSenseSupport |
@RealSenseSupport |
@bjain409 I think MartyG has provided some reference to you in this ticket. Could you please check if these examples help you ? #8551 (comment) |
@MartyG-RealSense |
Hi @bjain409 Your case is being handled by @RealSenseSupport now. Thank you. |
@bjain409 The value got from frame.getHeight, getWidth are constant which are the resolution you configure or default value if not configured. They will not change during streaming. |
@bjain409 Any other questions for this ticket? Thanks for your update! |
@bjain409 Anything else we can help on this ticket? Looking forward to your update. Please note that this ticket will be closed if we don't hear from you for another 7 days. Thanks! |
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
<Describe your issue / question / feature request / etc..>
The text was updated successfully, but these errors were encountered: