diff --git a/stages/run_opensfm.py b/stages/run_opensfm.py index b6969306..835f23f9 100644 --- a/stages/run_opensfm.py +++ b/stages/run_opensfm.py @@ -158,6 +158,7 @@ class ODMOpenSfMStage(types.ODM_Stage): # We finally restore the original files later added_shots_file = octx.path('added_shots_done.txt') + s2p, p2s = None, None if not io.file_exists(added_shots_file) or self.rerun(): primary_band_name = multispectral.get_primary_band_name(reconstruction.multi_camera, args.primary_band) @@ -213,12 +214,12 @@ class ODMOpenSfMStage(types.ODM_Stage): # Primary band maps to itself if band['name'] == primary_band_name: - img_map[fname + '.tif'] = fname + '.tif' + img_map[fname] = fname else: band_filename = next((p.filename for p in p2s[fname] if p.band_name == band['name']), None) if band_filename is not None: - img_map[fname + '.tif'] = band_filename + '.tif' + img_map[fname] = band_filename else: log.ODM_WARNING("Cannot find %s band equivalent for %s" % (band, fname))