Merge pull request #1273 from charnesp/patch-1

Avoid bug when `resize-to=-1` in WebODM lead to `feature_process_size=1` in OpenSFM
pull/1275/head
Piero Toffanin 2021-04-22 14:36:09 -04:00 zatwierdzone przez GitHub
commit 8cd9671904
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -157,7 +157,7 @@ class OSFMContext:
# Compute feature_process_size
feature_process_size = 2048 # default
if 'resize_to_is_set' in args:
if ('resize_to_is_set' in args) and (int(args.resize_to) != -1):
# Legacy
log.ODM_WARNING("Legacy option --resize-to (this might be removed in a future version). Use --feature-quality instead.")
feature_process_size = int(args.resize_to)
@ -175,6 +175,7 @@ class OSFMContext:
if max_dim > 0:
log.ODM_INFO("Maximum photo dimensions: %spx" % str(max_dim))
feature_process_size = int(max_dim * feature_quality_scale[args.feature_quality])
log.ODM_INFO("Photo dimensions for feature phase process: %i px" % feature_process_size)
else:
log.ODM_WARNING("Cannot compute max image dimensions, going with defaults")