kopia lustrzana https://github.com/OpenDroneMap/ODM
Up openmvs/opensfm, image masks dense fix
rodzic
be50747ff2
commit
e1fac6c395
|
@ -52,7 +52,7 @@ ExternalProject_Add(${_proj_name}
|
||||||
#--Download step--------------
|
#--Download step--------------
|
||||||
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
||||||
GIT_REPOSITORY https://github.com/OpenDroneMap/openMVS
|
GIT_REPOSITORY https://github.com/OpenDroneMap/openMVS
|
||||||
GIT_TAG 285
|
GIT_TAG 287
|
||||||
#--Update/Patch step----------
|
#--Update/Patch step----------
|
||||||
UPDATE_COMMAND ""
|
UPDATE_COMMAND ""
|
||||||
#--Configure step-------------
|
#--Configure step-------------
|
||||||
|
|
|
@ -19,7 +19,7 @@ ExternalProject_Add(${_proj_name}
|
||||||
#--Download step--------------
|
#--Download step--------------
|
||||||
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
||||||
GIT_REPOSITORY https://github.com/OpenDroneMap/OpenSfM/
|
GIT_REPOSITORY https://github.com/OpenDroneMap/OpenSfM/
|
||||||
GIT_TAG 286
|
GIT_TAG 287
|
||||||
#--Update/Patch step----------
|
#--Update/Patch step----------
|
||||||
UPDATE_COMMAND git submodule update --init --recursive
|
UPDATE_COMMAND git submodule update --init --recursive
|
||||||
#--Configure step-------------
|
#--Configure step-------------
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.8.6
|
2.8.7
|
||||||
|
|
|
@ -82,8 +82,14 @@ class ODMOpenMVSStage(types.ODM_Stage):
|
||||||
if args.pc_tile:
|
if args.pc_tile:
|
||||||
config.append("--fusion-mode 1")
|
config.append("--fusion-mode 1")
|
||||||
|
|
||||||
|
extra_config = []
|
||||||
|
|
||||||
if not args.pc_geometric:
|
if not args.pc_geometric:
|
||||||
config.append("--geometric-iters 0")
|
extra_config.append("--geometric-iters 0")
|
||||||
|
|
||||||
|
masks = len(os.listdir(os.path.join(tree.opensfm, "undistorted", "masks"))) > 0
|
||||||
|
if masks:
|
||||||
|
extra_config.append("--ignore-mask-label 0")
|
||||||
|
|
||||||
sharp = args.pc_geometric
|
sharp = args.pc_geometric
|
||||||
with open(densify_ini_file, 'w+') as f:
|
with open(densify_ini_file, 'w+') as f:
|
||||||
|
@ -92,7 +98,7 @@ class ODMOpenMVSStage(types.ODM_Stage):
|
||||||
def run_densify():
|
def run_densify():
|
||||||
system.run('"%s" "%s" %s' % (context.omvs_densify_path,
|
system.run('"%s" "%s" %s' % (context.omvs_densify_path,
|
||||||
openmvs_scene_file,
|
openmvs_scene_file,
|
||||||
' '.join(config + gpu_config)))
|
' '.join(config + gpu_config + extra_config)))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
run_densify()
|
run_densify()
|
||||||
|
@ -157,11 +163,8 @@ class ODMOpenMVSStage(types.ODM_Stage):
|
||||||
'-v 0',
|
'-v 0',
|
||||||
]
|
]
|
||||||
|
|
||||||
if not args.pc_geometric:
|
|
||||||
config.append("--geometric-iters 0")
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
system.run('"%s" "%s" %s' % (context.omvs_densify_path, sf, ' '.join(config + gpu_config)))
|
system.run('"%s" "%s" %s' % (context.omvs_densify_path, sf, ' '.join(config + gpu_config + extra_config)))
|
||||||
|
|
||||||
# Filter
|
# Filter
|
||||||
if args.pc_filter > 0:
|
if args.pc_filter > 0:
|
||||||
|
@ -199,7 +202,7 @@ class ODMOpenMVSStage(types.ODM_Stage):
|
||||||
'-i "%s"' % scene_dense,
|
'-i "%s"' % scene_dense,
|
||||||
"-v 0"
|
"-v 0"
|
||||||
]
|
]
|
||||||
system.run('"%s" %s' % (context.omvs_densify_path, ' '.join(config + gpu_config)))
|
system.run('"%s" %s' % (context.omvs_densify_path, ' '.join(config + gpu_config + extra_config)))
|
||||||
else:
|
else:
|
||||||
raise system.ExitException("Cannot find scene_dense.mvs, dense reconstruction probably failed. Exiting...")
|
raise system.ExitException("Cannot find scene_dense.mvs, dense reconstruction probably failed. Exiting...")
|
||||||
else:
|
else:
|
||||||
|
@ -208,8 +211,6 @@ class ODMOpenMVSStage(types.ODM_Stage):
|
||||||
log.ODM_INFO("Skipped filtering, %s --> %s" % (scene_dense_ply, tree.openmvs_model))
|
log.ODM_INFO("Skipped filtering, %s --> %s" % (scene_dense_ply, tree.openmvs_model))
|
||||||
os.rename(scene_dense_ply, tree.openmvs_model)
|
os.rename(scene_dense_ply, tree.openmvs_model)
|
||||||
|
|
||||||
# TODO: add support for image masks
|
|
||||||
|
|
||||||
self.update_progress(95)
|
self.update_progress(95)
|
||||||
|
|
||||||
if args.optimize_disk_space:
|
if args.optimize_disk_space:
|
||||||
|
|
Ładowanie…
Reference in New Issue