Merge patchmatch

pull/1464/head
Piero Toffanin 2022-05-26 17:08:27 +00:00
commit 732205910b
3 zmienionych plików z 29 dodań i 4 usunięć
SuperBuild/cmake
opendm

Wyświetl plik

@ -3,7 +3,7 @@ set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}")
externalproject_add(vcg
GIT_REPOSITORY https://github.com/OpenDroneMap/VCG.git
GIT_TAG 280
GIT_TAG 285
UPDATE_COMMAND ""
SOURCE_DIR ${SB_SOURCE_DIR}/vcg
CONFIGURE_COMMAND ""
@ -52,7 +52,7 @@ ExternalProject_Add(${_proj_name}
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/OpenDroneMap/openMVS
GIT_TAG 270
GIT_TAG 285
#--Update/Patch step----------
UPDATE_COMMAND ""
#--Configure step-------------

Wyświetl plik

@ -401,6 +401,21 @@ def config(argv=None, parser=None):
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('--pc-sharp',
action=StoreTrue,
nargs=0,
default=False,
help='Improve the accuracy of the point cloud by applying filters to sharpen the pointcloud, but reduces the completeness of the reconstruction. '
'Default: %(default)s')
parser.add_argument('--pc-subreslevel',
metavar='<positive integer>',
action=StoreValue,
default=2,
type=int,
help=('The number of lower resolutions to process before estimating output resolution depthmap. '
'Default: %(default)s'))
parser.add_argument('--smrf-scalar',
metavar='<positive float>',
action=StoreValue,

Wyświetl plik

@ -59,13 +59,16 @@ class ODMOpenMVSStage(types.ODM_Stage):
log.ODM_INFO("Estimating depthmaps")
number_views_fuse = 2
densify_ini_file = os.path.join(tree.openmvs, 'Densify.ini')
config = [
" --resolution-level %s" % int(resolution_level),
'--dense-config-file "%s"' % densify_ini_file,
"--min-resolution %s" % depthmap_resolution,
"--max-resolution %s" % int(outputs['undist_image_max_size']),
"--max-threads %s" % args.max_concurrency,
"--number-views-fuse %s" % number_views_fuse,
"--sub-resolution-levels %s" % args.pc_subreslevel,
'-w "%s"' % depthmaps_dir,
"-v 0"
]
@ -73,7 +76,7 @@ class ODMOpenMVSStage(types.ODM_Stage):
gpu_config = []
if not has_gpu():
gpu_config.append("--cuda-device -1")
gpu_config.append("--cuda-device -2")
if args.pc_tile:
config.append("--fusion-mode 1")
@ -81,6 +84,13 @@ class ODMOpenMVSStage(types.ODM_Stage):
if not args.pc_geometric:
config.append("--geometric-iters 0")
if args.pc_sharp:
with open(densify_ini_file, 'w+') as f:
f.write("Optimize = 7\n")
else:
with open(densify_ini_file, 'w+') as f:
f.write("Optimize = 3\n")
def run_densify():
system.run('"%s" "%s" %s' % (context.omvs_densify_path,
openmvs_scene_file,
@ -93,7 +103,7 @@ class ODMOpenMVSStage(types.ODM_Stage):
# try to run it again without GPU
if e.errorCode == 1 and len(gpu_config) == 0:
log.ODM_WARNING("OpenMVS failed with GPU, is your graphics card driver up to date? Falling back to CPU.")
gpu_config.append("--cuda-device -1")
gpu_config.append("--cuda-device -2")
run_densify()
else:
raise e