kopia lustrzana https://github.com/OpenDroneMap/ODM
Added for support DJI H20T camera
rodzic
dae70b32ae
commit
9c64f8fdcc
|
@ -725,8 +725,11 @@ class ODM_Photo:
|
|||
|
||||
def is_thermal(self):
|
||||
#Added for support M2EA camera sensor
|
||||
if(self.camera_make == "DJI"):
|
||||
return self.camera_model == "MAVIC2-ENTERPRISE-ADVANCED" and self.width == 640 and self.height == 512
|
||||
if(self.camera_make == "DJI" and self.camera_model == "MAVIC2-ENTERPRISE-ADVANCED" and self.width == 640 and self.height == 512):
|
||||
return True
|
||||
#Added for support DJI H20T camera sensor
|
||||
if(self.camera_make == "DJI" and self.camera_model == "ZH20T" and self.width == 640 and self.height == 512):
|
||||
return True
|
||||
return self.band_name.upper() in ["LWIR"] # TODO: more?
|
||||
|
||||
def camera_id(self):
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from opendm import log
|
||||
from opendm.thermal_tools import dji_unpack
|
||||
import cv2
|
||||
import os
|
||||
|
||||
def resize_to_match(image, match_photo = None):
|
||||
"""
|
||||
|
@ -39,6 +40,16 @@ def dn_to_temperature(photo, image, dataset_tree):
|
|||
image -= (273.15 * 100.0) # Convert Kelvin to Celsius
|
||||
image *= 0.01
|
||||
return image
|
||||
elif photo.camera_make == "DJI" and photo.camera_model == "ZH20T":
|
||||
filename, file_extension = os.path.splitext(photo.filename)
|
||||
# DJI H20T high gain mode supports measurement of -40~150 celsius degrees
|
||||
if file_extension.lower() in ["tif", "tiff"] and image.min() >= 23315: # Calibrated grayscale tif
|
||||
image = image.astype("float32")
|
||||
image -= (273.15 * 100.0) # Convert Kelvin to Celsius
|
||||
image *= 0.01
|
||||
return image
|
||||
else:
|
||||
return image
|
||||
elif photo.camera_make == "DJI" and photo.camera_model == "MAVIC2-ENTERPRISE-ADVANCED":
|
||||
image = dji_unpack.extract_temperatures_dji(photo, image, dataset_tree)
|
||||
image = image.astype("float32")
|
||||
|
|
Ładowanie…
Reference in New Issue