Skip to content

Commit

Permalink
Merge pull request #1304 from pierotofy/256
Browse files Browse the repository at this point in the history
Update OpenMVS, OpenSfM
  • Loading branch information
pierotofy committed Jun 16, 2021
2 parents c20ac4c + 70e07e5 commit e7e5986
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion SuperBuild/cmake/External-OpenMVS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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-------------
Expand Down
2 changes: 1 addition & 1 deletion SuperBuild/cmake/External-OpenSfM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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-------------
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.5
2.5.6
7 changes: 7 additions & 0 deletions opendm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='<positive float>',
action=StoreValue,
Expand Down
5 changes: 3 additions & 2 deletions stages/odm_filterpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 3 additions & 0 deletions stages/openmvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions stages/run_opensfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))

Expand Down

0 comments on commit e7e5986

Please sign in to comment.