kopia lustrzana https://github.com/OpenDroneMap/ODM
Remove confidence points before using odm_filterpoints (faster)
Former-commit-id: a15256943d
pull/1161/head
rodzic
76bb6f5e13
commit
dc60419adc
|
@ -128,8 +128,8 @@ endforeach()
|
|||
## Add mve Build
|
||||
|
||||
externalproject_add(mve
|
||||
GIT_REPOSITORY https://github.com/simonfuhrmann/mve.git
|
||||
GIT_TAG 55eb94f34f82694e0f25a7f235c25a06acc0bfae
|
||||
GIT_REPOSITORY https://github.com/OpenDroneMap/mve.git
|
||||
GIT_TAG 070
|
||||
UPDATE_COMMAND ""
|
||||
SOURCE_DIR ${SB_SOURCE_DIR}/elibs/mve
|
||||
CONFIGURE_COMMAND ""
|
||||
|
|
|
@ -26,6 +26,7 @@ orb_slam2_path = os.path.join(superbuild_path, "src/orb_slam2")
|
|||
makescene_path = os.path.join(superbuild_path, 'src', 'elibs', 'mve', 'apps', 'makescene', 'makescene') #TODO: don't install in source
|
||||
dmrecon_path = os.path.join(superbuild_path, 'src', 'elibs', 'mve', 'apps', 'dmrecon', 'dmrecon')
|
||||
scene2pset_path = os.path.join(superbuild_path, 'src', 'elibs', 'mve', 'apps', 'scene2pset', 'scene2pset')
|
||||
meshclean_path = os.path.join(superbuild_path, 'src', 'elibs', 'mve', 'apps', 'meshclean', 'meshclean')
|
||||
|
||||
poisson_recon_path = os.path.join(superbuild_path, 'src', 'PoissonRecon', 'Bin', 'Linux', 'PoissonRecon')
|
||||
dem2mesh_path = os.path.join(superbuild_path, 'src', 'dem2mesh', 'dem2mesh')
|
||||
|
|
|
@ -64,7 +64,7 @@ class ODMMveStage(types.ODM_Stage):
|
|||
"-s%s" % mve_output_scale,
|
||||
"--progress=silent",
|
||||
"--local-neighbors=2",
|
||||
"--filter-width=3",
|
||||
# "--filter-width=3",
|
||||
]
|
||||
|
||||
# Run MVE's dmrecon
|
||||
|
@ -136,6 +136,17 @@ class ODMMveStage(types.ODM_Stage):
|
|||
|
||||
# run scene2pset
|
||||
system.run('%s %s "%s" "%s"' % (context.scene2pset_path, ' '.join(scene2pset_config), tree.mve, tree.mve_model), env_vars={'OMP_NUM_THREADS': args.max_concurrency})
|
||||
|
||||
# run cleanmesh (filter points by MVE confidence threshold)
|
||||
if args.mve_confidence > 0:
|
||||
mve_filtered_model = io.related_file_path(tree.mve_model, postfix=".filtered")
|
||||
system.run('%s -t%s --no-clean --component-size=0 "%s" "%s"' % (context.meshclean_path, min(1.0, args.mve_confidence), tree.mve_model, mve_filtered_model), env_vars={'OMP_NUM_THREADS': args.max_concurrency})
|
||||
|
||||
if io.file_exists(mve_filtered_model):
|
||||
os.remove(tree.mve_model)
|
||||
os.rename(mve_filtered_model, tree.mve_model)
|
||||
else:
|
||||
log.ODM_WARNING("Couldn't filter MVE model (%s does not exist)." % mve_filtered_model)
|
||||
else:
|
||||
log.ODM_WARNING('Found a valid MVE reconstruction file in: %s' %
|
||||
tree.mve_model)
|
||||
|
|
|
@ -23,11 +23,7 @@ class ODMFilterPoints(types.ODM_Stage):
|
|||
else:
|
||||
inputPointCloud = tree.mve_model
|
||||
|
||||
confidence = None
|
||||
if not args.use_opensfm_dense and not args.fast_orthophoto:
|
||||
confidence = args.mve_confidence
|
||||
|
||||
point_cloud.filter(inputPointCloud, tree.filtered_point_cloud, standard_deviation=args.pc_filter, confidence=confidence, verbose=args.verbose)
|
||||
point_cloud.filter(inputPointCloud, tree.filtered_point_cloud, standard_deviation=args.pc_filter, confidence=None, verbose=args.verbose)
|
||||
else:
|
||||
log.ODM_WARNING('Found a valid point cloud file in: %s' %
|
||||
tree.filtered_point_cloud)
|
||||
|
|
Ładowanie…
Reference in New Issue