From 681ee189251ded99bb2b55919e87dada0cf8fd34 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 3 Oct 2023 13:06:36 -0400 Subject: [PATCH] Adds support for Altum-PT --- opendm/thermal.py | 4 ++-- opendm/types.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/opendm/thermal.py b/opendm/thermal.py index 315df60a..f0ad2099 100644 --- a/opendm/thermal.py +++ b/opendm/thermal.py @@ -35,12 +35,12 @@ def dn_to_temperature(photo, image, images_path): # Every camera stores thermal information differently # The following will work for MicaSense Altum cameras # but not necessarily for others - if photo.camera_make == "MicaSense" and photo.camera_model == "Altum": + if photo.camera_make == "MicaSense" and photo.camera_model[:5] == "Altum": image = image.astype("float32") image -= (273.15 * 100.0) # Convert Kelvin to Celsius image *= 0.01 return image - elif photo.camera_make == "DJI" and photo.camera_model == "ZH20T": + 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 diff --git a/opendm/types.py b/opendm/types.py index 64f061a9..ccab5ede 100644 --- a/opendm/types.py +++ b/opendm/types.py @@ -79,8 +79,10 @@ class ODM_Reconstruction(object): 'REDEDGE': '5', 'RE': '5', - 'LWIR': '6', - 'L': '6', + 'PANCHRO': '6', + + 'LWIR': '7', + 'L': '7', } for band_name in band_indexes: