diff --git a/SuperBuild/CMakeLists.txt b/SuperBuild/CMakeLists.txt index 940ff9dd..388df989 100644 --- a/SuperBuild/CMakeLists.txt +++ b/SuperBuild/CMakeLists.txt @@ -132,7 +132,7 @@ endforeach() externalproject_add(mve GIT_REPOSITORY https://github.com/simonfuhrmann/mve.git - GIT_TAG 2106a5b0aef61a7f744551510b1b4c5d8e3be594 + GIT_TAG fb942b4458dbf8490c9a4c6b81b9b9f57c593c0f UPDATE_COMMAND "" SOURCE_DIR ${SB_SOURCE_DIR}/elibs/mve CONFIGURE_COMMAND "" diff --git a/opendm/config.py b/opendm/config.py index a1c0947a..5f84f168 100644 --- a/opendm/config.py +++ b/opendm/config.py @@ -423,14 +423,6 @@ def config(): help='DSM/DTM resolution in cm / pixel.' '\nDefault: %(default)s') - parser.add_argument('--dem-maxangle', - metavar='', - type=float, - default=20, - help='Points that are more than maxangle degrees off-nadir are discarded. ' - '\nDefault: ' - '%(default)s') - parser.add_argument('--dem-maxsd', metavar='', type=float, diff --git a/opendm/dem/commands.py b/opendm/dem/commands.py index 097425fb..1070488d 100644 --- a/opendm/dem/commands.py +++ b/opendm/dem/commands.py @@ -60,7 +60,7 @@ def create_dems(filenames, demtype, radius=['0.56'], gapfill=False, def create_dem(filenames, demtype, radius, decimation=None, - maxsd=None, maxz=None, maxangle=None, returnnum=None, + maxsd=None, maxz=None, products=['idw'], outdir='', suffix='', verbose=False, resolution=0.1): """ Create DEM from collection of LAS files """ start = datetime.now() @@ -77,7 +77,7 @@ def create_dem(filenames, demtype, radius, decimation=None, # A DSM for meshing does not use additional filters if demtype != 'mesh_dsm': - json = pdal.json_add_filters(json, maxsd, maxz, maxangle, returnnum) + json = pdal.json_add_filters(json, maxsd, maxz) if demtype == 'dsm': json = pdal.json_add_classification_filter(json, 2, equality='max') diff --git a/scripts/odm_dem.py b/scripts/odm_dem.py index 3e692c53..8592f8e5 100644 --- a/scripts/odm_dem.py +++ b/scripts/odm_dem.py @@ -106,7 +106,6 @@ class ODMDEMCell(ecto.Cell): outdir=odm_dem_root, resolution=resolution / 100.0, maxsd=args.dem_maxsd, - maxangle=args.dem_maxangle, decimation=args.dem_decimation, verbose=args.verbose, max_workers=get_max_concurrency_for_dem(args.max_concurrency,tree.odm_georeferencing_model_laz) diff --git a/scripts/run_opensfm.py b/scripts/run_opensfm.py index 9746eb3b..d12c4baa 100644 --- a/scripts/run_opensfm.py +++ b/scripts/run_opensfm.py @@ -1,4 +1,5 @@ import ecto +import sys from opendm import log from opendm import io @@ -135,6 +136,17 @@ class ODMOpenSfMCell(ecto.Cell): log.ODM_WARNING('Found a valid OpenSfM reconstruction file in: %s' % tree.opensfm_reconstruction) + # Check that a reconstruction file has been created + if not io.file_exists(tree.opensfm_reconstruction): + log.ODM_ERROR("The program could not process this dataset using the current settings. " + "Check that the images have enough overlap, " + "that there are enough recognizable features " + "and that the images are in focus. " + "You could also try to increase the --min-num-features parameter." + "The program will now exit.") + sys.exit(1) + + # Always export VisualSFM's reconstruction and undistort images # as we'll use these for texturing (after GSD estimation and resizing) if not args.ignore_gsd: