Do not update osfm config on rerun

pull/992/head
Piero Toffanin 2019-06-05 12:18:22 -04:00
rodzic 3802c1ace2
commit 7c0af1d32c
2 zmienionych plików z 9 dodań i 4 usunięć

Wyświetl plik

@ -156,12 +156,14 @@ class OSFMContext:
True)
tools.apply_transformations(transformations)
with open(alignment_file, 'w') as fout:
fout.write("Alignment done!\n")
self.touch(alignment_file)
else:
log.ODM_WARNING('Found a alignment done progress file in: %s' % alignment_file)
def touch(self, file):
with open(file, 'w') as fout:
fout.write("Done!\n")
def path(self, *paths):
return os.path.join(self.opensfm_project_path, *paths)

Wyświetl plik

@ -42,7 +42,10 @@ class ODMOpenSfMStage(types.ODM_Stage):
else:
output_file = tree.opensfm_reconstruction
octx.update_config({'undistorted_image_max_size': gsd.image_max_size(photos, args.orthophoto_resolution, tree.opensfm_reconstruction, ignore_gsd=args.ignore_gsd)})
updated_config_flag_file = octx.path('updated_config.txt')
if not io.file_exists(updated_config_flag_file) or self.rerun():
octx.update_config({'undistorted_image_max_size': gsd.image_max_size(photos, args.orthophoto_resolution, tree.opensfm_reconstruction, ignore_gsd=args.ignore_gsd)})
octx.touch(updated_config_flag_file)
# These will be used for texturing
undistorted_images_path = octx.path("undistorted")