kopia lustrzana https://github.com/OpenDroneMap/ODM
Porównaj commity
4 Commity
8ece0e8457
...
0603f6fd14
Autor | SHA1 | Data |
---|---|---|
Piero Toffanin | 0603f6fd14 | |
Piero Toffanin | 424d9e28a0 | |
Andrew Harvey | a0fbd71d41 | |
Piero Toffanin | c7ada3668c |
|
@ -2,6 +2,7 @@ import json
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import base64
|
import base64
|
||||||
|
import numpy as np
|
||||||
from rasterio.io import MemoryFile
|
from rasterio.io import MemoryFile
|
||||||
from opendm.system import run
|
from opendm.system import run
|
||||||
from opendm import log
|
from opendm import log
|
||||||
|
@ -36,7 +37,12 @@ def extract_raw_thermal_image_data(image_path):
|
||||||
img = img[0][:,:,None]
|
img = img[0][:,:,None]
|
||||||
|
|
||||||
del j["RawThermalImage"]
|
del j["RawThermalImage"]
|
||||||
|
elif "ThermalData" in j:
|
||||||
|
thermal_data = base64.b64decode(j["ThermalData"][len("base64:"):])
|
||||||
|
thermal_buf = np.frombuffer(thermal_data, dtype=np.int16)
|
||||||
|
# TODO: how to interpret these?
|
||||||
|
# https://exiftool.org/forum/index.php?topic=11401.45
|
||||||
|
|
||||||
return extract_temperature_params_from(j), img
|
return extract_temperature_params_from(j), img
|
||||||
else:
|
else:
|
||||||
raise Exception("Invalid JSON (not a list)")
|
raise Exception("Invalid JSON (not a list)")
|
||||||
|
@ -68,6 +74,7 @@ def unit(unit):
|
||||||
|
|
||||||
def extract_temperature_params_from(tags):
|
def extract_temperature_params_from(tags):
|
||||||
# Defaults
|
# Defaults
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
"Emissivity": float,
|
"Emissivity": float,
|
||||||
"ObjectDistance": unit("m"),
|
"ObjectDistance": unit("m"),
|
||||||
|
|
|
@ -187,7 +187,7 @@ def screened_poisson_reconstruction(inPointCloud, outMesh, depth = 8, samples =
|
||||||
if threads < 1:
|
if threads < 1:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
log.ODM_WARNING("PoissonRecon failed with %s threads, let's retry with %s..." % (threads, threads // 2))
|
log.ODM_WARNING("PoissonRecon failed with %s threads, let's retry with %s..." % (threads * 2, threads))
|
||||||
|
|
||||||
|
|
||||||
# Cleanup and reduce vertex count if necessary
|
# Cleanup and reduce vertex count if necessary
|
||||||
|
|
|
@ -482,6 +482,12 @@ class ODM_Photo:
|
||||||
self.capture_uuid = matches.group(1)
|
self.capture_uuid = matches.group(1)
|
||||||
self.band_name = band_aliases.get(matches.group(2), matches.group(2))
|
self.band_name = band_aliases.get(matches.group(2), matches.group(2))
|
||||||
|
|
||||||
|
# Some DJI models do not have a band name but have an image source field
|
||||||
|
if self.camera_make.lower() == 'dji':
|
||||||
|
image_source = self.get_xmp_tag(xtags, '@drone-dji:ImageSource')
|
||||||
|
if self.band_name == 'RGB' and isinstance(image_source, str) and image_source.lower() == "infraredcamera":
|
||||||
|
self.band_name = 'LWIR'
|
||||||
|
|
||||||
# Sanitize band name since we use it in folder paths
|
# Sanitize band name since we use it in folder paths
|
||||||
self.band_name = re.sub('[^A-Za-z0-9]+', '', self.band_name)
|
self.band_name = re.sub('[^A-Za-z0-9]+', '', self.band_name)
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue