Catch errors in cropping, handle image masks

pull/1172/head
Piero Toffanin 2020-11-02 11:13:23 -05:00
rodzic dc82bf8f27
commit 253d76314a
3 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -26,7 +26,6 @@ ExternalProject_Add(${_proj_name}
#--Configure step-------------
SOURCE_DIR ${SB_SOURCE_DIR}/${_proj_name}
CMAKE_ARGS
-DCERES_ROOT_DIR=${SB_INSTALL_DIR}
-DOpenCV_DIR=${SB_INSTALL_DIR}/lib/cmake/opencv4
-DVCG_ROOT=${SB_SOURCE_DIR}/vcg
-DCMAKE_BUILD_TYPE=Release

Wyświetl plik

@ -141,7 +141,7 @@ class ODMLoadDatasetStage(types.ODM_Stage):
has_mask = True
break
if has_mask and not args.use_opensfm_dense:
if has_mask and not args.use_opensfm_dense and not args.fast_orthophoto:
log.ODM_WARNING("Image masks found, will use OpenSfM for dense reconstruction")
args.use_opensfm_dense = True

Wyświetl plik

@ -131,9 +131,13 @@ class ODMGeoreferencingStage(types.ODM_Stage):
if not args.fast_orthophoto:
decimation_step *= int(len(reconstruction.photos) / 1000) + 1
cropper.create_bounds_gpkg(tree.odm_georeferencing_model_laz, args.crop,
decimation_step=decimation_step)
try:
cropper.create_bounds_gpkg(tree.odm_georeferencing_model_laz, args.crop,
decimation_step=decimation_step)
except:
log.ODM_WARNING("Cannot calculate crop bounds! We will skip cropping")
args.crop = 0
# Do not execute a second time, since
# We might be doing georeferencing for
# multiple models (3D, 2.5D, ...)