Hi Folks, I’m working with a Micasense dual camera with 10 bands.
I was able to process the data from the two cameras separately (5 bands each), (Specifying the primary-band). The 10 bands together, however, do not seem to work with WebODM, even when I specify the primary-band parameter. Webodom will run the orthophoto but will not recognize it as a multi-band dataset.
def detect_multi_camera(self):
“”"
Looks at the reconstruction photos and determines if this
is a single or multi-camera setup.
band_photos = {}
band_indexes = {}
for p in self.photos:
if not p.band_name in band_photos:
band_photos[p.band_name] = []
if not p.band_name in band_indexes:
band_indexes[p.band_name] = p.band_index
band_photos[p.band_name].append(p)
bands_count = len(band_photos)
*if bands_count >= 2 and bands_count <= 8:*
# Validate that all bands have the same number of images,
# otherwise this is not a multi-camera setup
img_per_band = len(band_photos[p.band_name])
for band in band_photos:
if len(band_photos[band]) != img_per_band:
log.ODM_ERROR("Multi-camera setup detected, but band \"%s\" (identified from \"%s\") has only %s images (instead of %s), perhaps images are missing or are corrupted. Please include all necessary files to process all bands and try again." % (band, band_photos[band][0].filename, len(band_photos[band]), img_per_band))
raise RuntimeError("Invalid multi-camera images")
mc = []
for band_name in band_indexes:
mc.append({'name': band_name, 'photos': band_photos[band_name]})
# Sort by band index
mc.sort(key=lambda x: band_indexes[x['name']])
return mc
return None
is there a good reason for: “if bands_count >= 2 and bands_count <= 8:”?