Take photo with the drone's camera in MSDK-v5.9
已完成Hi everyone
I want to take a photo via code using the Mavic 3E drone camera and then get the bitmap of that photo taken, how can I do this? Please send me the code if possible. I know there is a way to get the bitmap using YUV data but my intention was to take the photo using the drone's camera and get the bitmap of that photo taken.
Any ideas of how can i do that?
Best regards!
-
You can try the three interfaces: pullThumbnailFromCamera, pullPreviewFromCamera, and pullOriginalMediaFileFromCamera. The first two interfaces allow you to directly obtain a bitmap, while the last interface retrieves the data stream of the original image, so you will need to convert it to a bitmap yourself. Additionally, you can refer to this article to learn about some aspects of media file management, which will help you understand how to use them:Chapter 10: Media playback (https://sdk-forum.dji.net/hc/en-us/articles/9882782794777-Chapter-10-Media-playback) -
In our sample, we have provided example code that includes all functionalities. These three interfaces are utilized on the media manager test page. https://github.com/dji-sdk/Mobile-SDK-Android-V5/blob/dev-sdk-main/SampleCode-V5/android-sdk-v5-sample/src/main/java/dji/sampleV5/aircraft/pages/MediaFragment.kt Take the photo:https://github.com/dji-sdk/Mobile-SDK-Android-V5/blob/dev-sdk-main/SampleCode-V5/android-sdk-v5-sample/src/main/java/dji/sampleV5/aircraft/pages/MediaFragment.kt#L189 -
What would these "mediaCountIndex" and "count" parameters be? -->You can find the answer in our API documentation:https://developer.dji.com/api-reference-v5/android-api/Components/IMediaDataCenter/IMediaManager_PullMediaFileListParam.html#imediamanager_pullmediafilelistparam_getmediafileindex_inline The MediaFileIndex requires a value for MediaFile.index to be filled in.
请先登录再写评论。
评论
5 条评论