dji-sdk / Mobile-SDK-iOS

DJI Mobile SDK for iOS: http://developer.dji.com/mobile-sdk/
Other
576 stars 255 forks source link

DJICameraThermalAreaTemperatureAggregations min and max temperature points #465

Open YaroTs opened 3 years ago

YaroTs commented 3 years ago

Drone: Mavic 2 Enterprise Dual Mobile SDK: 4.14

I want to draw min and max temperature points inside an area and currently I do the following:

  1. call camera.setThermalMeasurementMode(.areaMetering)
  2. create view for measurement area and add it inside fpvViewController.fpvView
  3. call camera.setThermalMeteringArea(CGrect(x, y, width, height) where x = view.x / fpvView.width, y = view.y / fpvView.height, width = view.width / fpvView.width, height = view.height / fpvView.height
  4. Listen to func camera(_ camera: DJICamera, didUpdate temperatureAggregations: DJICameraThermalAreaTemperatureAggregations)
  5. Receive temperatureAggregations.minPoint and temperatureAggregations.maxPoint which have x and y between 0.0 and 1.0

I've tried this way, but always get an offset, when drawing points, so I have the following questions:

  1. Am i doing everything correct for setting measurement area?
  2. What coordinate system is used in DJICameraThermalAreaTemperatureAggregations min and max points? Is it relative to whole scene or just a measurement area?
  3. How to get an absolute position for max and min points inside fpvView?
dji-dev commented 3 years ago

Agent comment from Luce Luo in Zendesk ticket #48425:

Dear Customer,

Thank you for contacting DJI. I need to confirm it with the engineer first. It will cost some time and we will contact you again once any progress.

Thanks,

Luce Luo DJI Developer Support

°°°

dji-dev commented 3 years ago

Agent comment from Luce Luo in Zendesk ticket #48425:

Dear Customer,

Thank you for contacting DJI. The engineer reply that needs to use the below DJIVideoPreviewer's methods to convert the point. ​ Please check if any help for you.

Thanks,

Luce Luo DJI Developer Support
inline-2017362368.png

°°°