dji-sdk / Mobile-SDK-Android-V5

MSDK V5 Sample
Other
247 stars 127 forks source link

Thermal Side-by-Side handled differently #298

Closed tkocik92 closed 3 months ago

tkocik92 commented 3 months ago

Drone: Mavic 3 Thermal SDK: 5.8.0

Thermal camera's side-by-side Aspect Ratio appears to be different in the my app compared to DJI Pilot. How do I make my Side-by-side feed look like DJI Pilot's?

My app:

Screenshot 2023-11-10 at 4 16 19 PM

DJI Pilot:

Screenshot 2024-03-27 at 2 36 31 PM
dji-dev commented 3 months ago

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

f you want to achieve the same effect as Pilot 2, you may need to implement the display of video data by yourself. Could you please first explain how you are displaying the images on your end? From the images you provided to us, it seems like your application is displaying a lot of black. Does the sample code also produce the same effect?

°°°

tkocik92 commented 3 months ago

Camera feed is implemented utilizing the recommended 5.8.0 classes:

MediaDataCenter.getInstance().cameraStreamManager?.putCameraStreamSurface()

Sample code does not implement Side-by-side so I cannot verify (most thermal camera keys are not in the sample code)

dji-dev commented 3 months ago

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

You can use the Key/Value tool in the testing tool to call different keys to achieve camera output of side-by-side video streams. Then switch to the default layout page to see the display effect of the sample code.

Here is a reference article for achieving side-by-side output:https://sdk-forum.dji.net/hc/en-us/articles/16408994343577-How-do-I-display-both-the-visible-and-infrared-camera-feeds?source=search&auth_token=eyJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50X2lkIjo5Nzg4MTcsInVzZXJfaWQiOjEwMjgxOTM0NDg3OTYxLCJ0aWNrZXRfaWQiOjEwMzc0MCwiY2hhbm5lbF9pZCI6NjMsInR5cGUiOiJTRUFSQ0giLCJleHAiOjE3MTQyNzYyNDl9.DXfwbUCUlOS-r4DwFSoE6kiwLC7pSJ0kXO4Q1sAgLVE

°°°

tkocik92 commented 3 months ago

It appears the sample app mirrors my app:

Screenshot 2024-03-29 at 8 19 23 AM
dji-dev commented 3 months ago

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

If the sample code and the effect of your app are the same, then the ScaleType provided by the SDK cannot achieve the same effect as Pilot 2.

If you can accept some loss of the screen, you can set the ScaleType to CENTER_CROP; if you can accept stretching of the screen, you can set the ScaleType to FIT_XY, both of these modes can reduce the black areas.

°°°

tkocik92 commented 3 months ago

Thank you for this. For anyone looking at this in the future, implementing ICameraStreamManager.ScaleType.CENTER_CROP makes the Side-By-Side match DJI Pilot.

dji-dev commented 3 months ago

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

Thank you for sharing.

°°°