diff --git a/SuperBuild/cmake/External-OpenMVS.cmake b/SuperBuild/cmake/External-OpenMVS.cmake index b9abe3739..b0a43cf3c 100644 --- a/SuperBuild/cmake/External-OpenMVS.cmake +++ b/SuperBuild/cmake/External-OpenMVS.cmake @@ -20,7 +20,7 @@ ExternalProject_Add(${_proj_name} #--Download step-------------- DOWNLOAD_DIR ${SB_DOWNLOAD_DIR} GIT_REPOSITORY https://github.com/OpenDroneMap/openMVS - GIT_TAG 250 + GIT_TAG 256 #--Update/Patch step---------- UPDATE_COMMAND "" #--Configure step------------- diff --git a/SuperBuild/cmake/External-OpenSfM.cmake b/SuperBuild/cmake/External-OpenSfM.cmake index f9a79aaae..68e47d58c 100644 --- a/SuperBuild/cmake/External-OpenSfM.cmake +++ b/SuperBuild/cmake/External-OpenSfM.cmake @@ -19,7 +19,7 @@ ExternalProject_Add(${_proj_name} #--Download step-------------- DOWNLOAD_DIR ${SB_DOWNLOAD_DIR} GIT_REPOSITORY https://github.com/OpenDroneMap/OpenSfM/ - GIT_TAG 250 + GIT_TAG 256 #--Update/Patch step---------- UPDATE_COMMAND git submodule update --init --recursive #--Configure step------------- diff --git a/VERSION b/VERSION index 0cadbc1e3..da6b0a8f1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5.5 +2.5.6 diff --git a/opendm/config.py b/opendm/config.py index 96b05d4f3..c37e097c1 100755 --- a/opendm/config.py +++ b/opendm/config.py @@ -362,6 +362,13 @@ def config(argv=None, parser=None): help='Reduce the memory usage needed for depthmap fusion by splitting large scenes into tiles. Turn this on if your machine doesn\'t have much RAM and/or you\'ve set --pc-quality to high or ultra. Experimental. ' 'Default: %(default)s') + parser.add_argument('--pc-geometric', + action=StoreTrue, + nargs=0, + default=False, + help='Improve the accuracy of the point cloud by computing geometrically consistent depthmaps. This increases processing time, but can improve results in urban scenes. ' + 'Default: %(default)s') + parser.add_argument('--smrf-scalar', metavar='', action=StoreValue, diff --git a/stages/odm_filterpoints.py b/stages/odm_filterpoints.py index 98902e59c..8e1c316aa 100644 --- a/stages/odm_filterpoints.py +++ b/stages/odm_filterpoints.py @@ -31,5 +31,6 @@ def process(self, args, outputs): log.ODM_WARNING('Found a valid point cloud file in: %s' % tree.filtered_point_cloud) - if args.optimize_disk_space: - os.remove(inputPointCloud) + if args.optimize_disk_space and inputPointCloud: + if os.path.isfile(inputPointCloud): + os.remove(inputPointCloud) diff --git a/stages/openmvs.py b/stages/openmvs.py index d0f387991..422fe6657 100644 --- a/stages/openmvs.py +++ b/stages/openmvs.py @@ -72,6 +72,9 @@ def process(self, args, outputs): if args.pc_tile: config.append("--fusion-mode 1") + + if not args.pc_geometric: + config.append("--geometric-iters 0") system.run('%s "%s" %s' % (context.omvs_densify_path, openmvs_scene_file, diff --git a/stages/run_opensfm.py b/stages/run_opensfm.py index b69693065..835f23f9d 100644 --- a/stages/run_opensfm.py +++ b/stages/run_opensfm.py @@ -158,6 +158,7 @@ def align_to_primary_band(shot_id, image): # We finally restore the original files later added_shots_file = octx.path('added_shots_done.txt') + s2p, p2s = None, None if not io.file_exists(added_shots_file) or self.rerun(): primary_band_name = multispectral.get_primary_band_name(reconstruction.multi_camera, args.primary_band) @@ -213,12 +214,12 @@ def align_to_primary_band(shot_id, image): # Primary band maps to itself if band['name'] == primary_band_name: - img_map[fname + '.tif'] = fname + '.tif' + 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 + '.tif'] = band_filename + '.tif' + img_map[fname] = band_filename else: log.ODM_WARNING("Cannot find %s band equivalent for %s" % (band, fname))