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

Problem with set focus mode and thermal super resolution DJI Matrice 4T

Open Tin-moon opened this issue 6 months ago • 3 comments

Hi, I have problems switching modes for the camera.

SDK version: 5.14.0 Equipment: DJI Matrice 4T DJI RC Plus 2

  1. Problem with autofocus, during the mission. Photos are blurry when using the wide camera.

I did set Manual Focus on DJI pilot. Then on our app we can not reset the focus mode to AFC How can I lock autofocus? I try use KeyCameraFocusMode, set to CameraFocusMode.AFC. But value seems to change but this error is shown

Image

Can you tell me how to do this?

  1. I try set to false (infrared super resolution) .

I change the value of this key KeyThermalSuperResolution to False. Before this, as written, I switch the camera to infrared. But it return error:

error: ErrorImp{errorType='CORE', errorCode='REQUEST_HANDLER_NOT_FOUND', innerCode='CAMERA.IsShootingSuperResolutionPhoto:-1', description='null', hint='error code = -1'} Can you tell me what the problem might be?

Tin-moon avatar May 27 '25 08:05 Tin-moon

Agent comment from YIGUI LIU in Zendesk ticket #144225:

Dear Developer,

In the MSDK v5.14.0 sample APP, setting AFC for the wide-angle lens using KeyCameraFocusMode takes effect, and setting the Thermal lens to false using KeyThermalSuperResolution is also successful.

For details, you can refer to the images and videos in the link:https://pan-sec.djicorp.com/s/bb4nGiRXyXRGgN6

It should be noted that when creating keys for KeyCameraFocusMode and KeyThermalSuperResolution, you need to pass the corresponding payload position and lens type in the input parameters, similar to the following:

KeyTools.createKey(CameraKey.KeyCameraFocusMode, ComponentIndexType.LEFT_OR_MAIN, CameraLensType.CAMERA_LENS_WIDE);

KeyTools.createKey(CameraKey.KeyThermalSuperResolution, ComponentIndexType.LEFT_OR_MAIN, CameraLensType.CAMERA_LENS_THERMAL);

Best Regards, DJI Innovations SDK Technical Support Team

°°°

dji-dev avatar May 27 '25 10:05 dji-dev

Hi, it seems to me that there is no method (KeyTools.createKey) with such a set of parameters.

KeyTools.createKey(CameraKey.KeyThermalSuperResolution, ComponentIndexType.LEFT_OR_MAIN, CameraLensType.CAMERA_LENS_THERMAL);

Image

I try it this way (and it doesn't work, error above):

DJISDKModel.getInstance().setValue( KeyTools.createCameraKey(CameraKey.KeyThermalSuperResolution, ComponentIndexType.LEFT_OR_MAIN, CameraLensType.CAMERA_LENS_THERMAL), false )

Should I switch the camera feed first? You just didn't mention it. To use this function, please call KeyCameraVideoStreamSource to set the video source to INFRARED_CAMERA.

Tin-moon avatar May 28 '25 07:05 Tin-moon

Agent comment from YIGUI LIU in Zendesk ticket #144225:

Dear Developer,

You can set the camera source to the infrared lens first, as required by the API documentation. Specifically, you need to call KeyCameraVideoStreamSource to set the video source to INFRARED_CAMERA.

Best Regards, DJI Innovations SDK Technical Support Team

°°°

dji-dev avatar May 28 '25 08:05 dji-dev