Mobile-SDK-Android icon indicating copy to clipboard operation
Mobile-SDK-Android copied to clipboard

Camera Image in Bytes or ImageProxy format

Open danilofariadutra opened this issue 10 months ago • 5 comments

How can I receive byte or ImageProxy data from the camera?

danilofariadutra avatar Apr 09 '24 00:04 danilofariadutra

Agent comment from yating.liao in Zendesk ticket #104527:

Could you please clarify if the camera images you are referring to are pictures from the camera's SD card or live camera feed?

Thank you.

°°°

dji-dev avatar Apr 09 '24 11:04 dji-dev

live camera feed

danilofariadutra avatar Apr 09 '24 11:04 danilofariadutra

Agent comment from yating.liao in Zendesk ticket #104527:

The SDK can obtain the byte stream of the real-time camera image, which is video data in H264 format. You can refer to this article for the acquisition method, as it provides a detailed description:https://sdk-forum.dji.net/hc/en-us/articles/30040327006233-How-to-obtain-the-video-stream-data-of-the-camera-and-display-the-camera-image?source=search&auth_token=eyJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50X2lkIjo5Nzg4MTcsInVzZXJfaWQiOjExNjI5Nzc2MDEyNTY5LCJ0aWNrZXRfaWQiOjEwNDUyNywiY2hhbm5lbF9pZCI6NjMsInR5cGUiOiJTRUFSQ0giLCJleHAiOjE3MTUzMjg1MzV9.Vmt5auGxsL7O2ZbcTTjbUpmQ5SFqDbRQsO4gzjAwNeM

Thank you.

°°°

dji-dev avatar Apr 10 '24 08:04 dji-dev

What if I get the bitmap through the "getBitmap" method of a TextureView object. Is it a valid operation?

danilofariadutra avatar Apr 18 '24 12:04 danilofariadutra

Agent comment from yating.liao in Zendesk ticket #104527:

If you have successfully displayed the camera image on TextureView, I think that is effective. If you need to obtain continuous video frame data multiple times, I think using callback to push YUV data and then converting it to a bitmap may be a better way.

°°°

dji-dev avatar Apr 19 '24 06:04 dji-dev