Bug Report of ODM2.5.6 (ODM2.5.5 has no problem)

ODM 2.5.6 fails to process.

This bug looks come from the modifications at Line 215-224 of “run_opensfm.py”.
Editing 2 lines, remove " + ‘tif’ ", then ODM 2.5.6 run successfully.

Dr. Chihiro KATO

== ODM 2.5.5, run successfully ======

Primary band maps to itself

if band[‘name’] == primary_band_name:
img_map[fname + ‘.tif’] = fname + ‘.tif’
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'] = fname + '.tif'
else:
    log.ODM_WARNING("Cannot find %s band equivalent for %s" % (band, fname))

== ODM 2.5.6, stops processing ======

Primary band maps to itself

if band[‘name’] == primary_band_name:
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] = fname
else:
    log.ODM_WARNING("Cannot find %s band equivalent for %s" % (band, fname))

=================

<<ODM 2.5.6 Error Log>>=================================
e[39m[INFO] running /code/SuperBuild/install/bin/opensfm/bin/opensfm export_visualsfm --points "/code/opensfm"e[0m
e[39m[INFO] Multiple bands founde[0m
e[93m[WARNING] Cannot find IMG_200911_055715_0020_GRE.TIF.tif in image map for /code/opensfm/undistorted/reconstruction_green.nvme[0m
e[93m[WARNING] Cannot find IMG_200911_055712_0018_GRE.TIF.tif in image map for /code/opensfm/undistorted/reconstruction_green.nvme[0m
e[93m[WARNING] Cannot find IMG_200911_055713_0019_GRE.TIF.tif in image map for /code/opensfm/undistorted/reconstruction_green.nvme[0m
e[93m[WARNING] Cannot find IMG_200911_055710_0017_GRE.TIF.tif in image map for /code/opensfm/undistorted/reconstruction_green.nvme[0m
e[93m[WARNING] Cannot find IMG_200911_055709_0016_GRE.TIF.tif in image map for /code/opensfm/undistorted/reconstruction_green.nvme[0m
Traceback (most recent call last):
File “/code/run.py”, line 54, in
retcode = app.execute()
File “/code/stages/odm_app.py”, line 125, in execute
raise e
File “/code/stages/odm_app.py”, line 89, in execute
self.first_stage.run()
File “/code/opendm/types.py”, line 340, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 340, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 340, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 321, in run
self.process(self.args, outputs)
File “/code/stages/run_opensfm.py”, line 226, in process
nvm.replace_nvm_images(tree.opensfm_reconstruction_nvm, img_map, nvm_file)
File “/code/opendm/nvm.py”, line 35, in replace_nvm_images
raise Exception(“Cannot write %s, not all band images have been matched” % dst_nvm_file)
Exception: Cannot write /code/opensfm/undistorted/reconstruction_green.nvm, not all band images have been matched

1 Like

Thanks for surfacing this!

To be clear, you’re only noticing this problem with multi-band imagery, correct?

Yes.

I have tested Multiband images only (Green, Red, Red Edge and Near-IR) taken by Sequoia Camera.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.