大疆社区
大疆社区
lkandroid
大疆社区
已累计飞行 5481 米
发布于2020-5-27
浏览1.2k
相关分类
开发者
技术交流
0
0
2
0

2 条评论

最新
最早
大疆社区
快来评论吧
大疆社区

已累计飞行 5481 米

自己填坑: 1.首先设定为红外模式: Camera camera= ((Aircraft) FPVDemoApplication.getProductInstance()).getCameras().get(1); if(camera!=null){ camera.setDisplayMode(THERMAL_ONLY, new CommonCallbacks.CompletionCallback() { @Override public void onResult(DJIError djiError) { setResultToToast("Mode: " + (djiError == null ? "Successfully" : djiError.getDeion())); if (djiError == null) runOnUiThread(new Runnable() { @Override public void run() { camera_status.setText("模式:热成像"); } }); } }); }else setResultToToast("Mode:NotSupport " ); 2.设定为区域测温模式: Camera camera1= ((Aircraft) FPVDemoApplication.getProductInstance()).getCameras().get(1); if(camera1!=null) { camera1.setThermalMeasurementMode(ThermalMeasurementMode.AREA_METERING, new CommonCallbacks.CompletionCallback() { @Override public void onResult(DJIError djiError) { if (djiError == null) { showToast("success!! 11"); } else { showToast("filar!! " + djiError.getDeion()); } } }); } } 3.设定测温区域,获得数据反馈: Camera camera1= ((Aircraft) FPVDemoApplication.getProductInstance()).getCameras().get(1); if(camera1!=null) { camera1.setThermalMeteringArea(new RectF(0, 0, 0.8f, 0.8f), new CommonCallbacks.CompletionCallback() { @Override public void onResult(DJIError djiError) { if (djiError == null) { showToast("success22"); camera1.setThermalAreaTemperatureAggregationsCallback(new ThermalAreaTemperatureAggregations.Callback() { @Override public void onUpdate(ThermalAreaTemperatureAggregations thermalAreaTemperatureAggregations) { if (thermalAreaTemperatureAggregations.getMaxAreaTemperature() > 10) showToast("Mode:0 " + thermalAreaTemperatureAggregations.getMaxAreaTemperature() + " Mode:0 " + thermalAreaTemperatureAggregations.getMinAreaTemperature() + " Mode:0 " + thermalAreaTemperatureAggregations.getAverageAreaTemperature()); } }); } else showToast("failer22 " + djiError.getDeion()); } }); } 填坑完毕!

2020-5-28

大疆社区

已累计飞行 0 米

你是不是区域定义得太小啊?只测出了一个温度。

2020-5-27

暂无更多评论