dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
978 stars 580 forks source link

Camera Image in Bytes or ImageProxy format #1286

Open danilofariadutra opened 5 months ago

danilofariadutra commented 5 months ago

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

dji-dev commented 5 months ago

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.

°°°

danilofariadutra commented 5 months ago

live camera feed

dji-dev commented 5 months ago

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.

°°°

danilofariadutra commented 5 months ago

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

dji-dev commented 5 months ago

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.

°°°