kopia lustrzana https://github.com/OpenDroneMap/ODM
Merge pull request #444 from OpenDroneMap/default-opensfm
Change OpenSfM to default for point clound densification
Former-commit-id: 6e55f053bf
pull/1161/head
commit
675a84ac9f
|
@ -129,7 +129,7 @@ def config():
|
|||
help=('The maximum number of processes to use in dense '
|
||||
'reconstruction. Default: %(default)s'))
|
||||
|
||||
parser.add_argument('--use-opensfm-pointcloud',
|
||||
parser.add_argument('--use-pmvs',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Use OpenSfM to compute the point cloud instead '
|
||||
|
|
|
@ -85,7 +85,7 @@ class ODMMvsTexCell(ecto.Cell):
|
|||
'keepUnseenFaces': keepUnseenFaces
|
||||
}
|
||||
|
||||
if args.use_opensfm_pointcloud:
|
||||
if not args.use_pmvs:
|
||||
kwargs['nvm_file'] = io.join_paths(tree.opensfm,
|
||||
"reconstruction.nvm")
|
||||
else:
|
||||
|
|
|
@ -112,7 +112,7 @@ class ODMApp(ecto.BlackBox):
|
|||
self.args[:] >> self.opensfm['args'],
|
||||
self.resize['photos'] >> self.opensfm['photos']]
|
||||
|
||||
if _p.args.use_opensfm_pointcloud:
|
||||
if not _p.args.use_pmvs:
|
||||
# create odm mesh from opensfm point cloud
|
||||
connections += [self.tree[:] >> self.meshing['tree'],
|
||||
self.args[:] >> self.meshing['args'],
|
||||
|
|
|
@ -107,7 +107,7 @@ class ODMGeoreferencingCell(ecto.Cell):
|
|||
'verbose': verbose
|
||||
|
||||
}
|
||||
if args.use_opensfm_pointcloud:
|
||||
if not args.use_pmvs:
|
||||
kwargs['pc'] = tree.opensfm_model
|
||||
else:
|
||||
kwargs['pc'] = tree.pmvs_model
|
||||
|
|
|
@ -62,7 +62,7 @@ class ODMeshingCell(ecto.Cell):
|
|||
'solver': self.params.solver,
|
||||
'verbose': verbose
|
||||
}
|
||||
if args.use_opensfm_pointcloud:
|
||||
if not args.use_pmvs:
|
||||
kwargs['infile'] = tree.opensfm_model
|
||||
else:
|
||||
kwargs['infile'] = tree.pmvs_model
|
||||
|
|
|
@ -48,7 +48,7 @@ class ODMOpenSfMCell(ecto.Cell):
|
|||
(args.rerun_from is not None and
|
||||
'opensfm' in args.rerun_from)
|
||||
|
||||
if args.use_opensfm_pointcloud:
|
||||
if not args.use_pmvs:
|
||||
output_file = tree.opensfm_model
|
||||
else:
|
||||
output_file = tree.opensfm_reconstruction
|
||||
|
@ -81,7 +81,7 @@ class ODMOpenSfMCell(ecto.Cell):
|
|||
# run OpenSfM reconstruction
|
||||
system.run('PYTHONPATH=%s %s/bin/run_all %s' %
|
||||
(context.pyopencv_path, context.opensfm_path, tree.opensfm))
|
||||
if args.use_opensfm_pointcloud:
|
||||
if not args.use_pmvs:
|
||||
system.run('PYTHONPATH=%s %s/bin/opensfm export_visualsfm %s' %
|
||||
(context.pyopencv_path, context.opensfm_path, tree.opensfm))
|
||||
system.run('PYTHONPATH=%s %s/bin/opensfm undistort %s' %
|
||||
|
@ -101,7 +101,7 @@ class ODMOpenSfMCell(ecto.Cell):
|
|||
log.ODM_WARNING('Found a valid Bundler file in: %s' %
|
||||
tree.opensfm_reconstruction)
|
||||
|
||||
if not args.use_opensfm_pointcloud:
|
||||
if args.use_pmvs:
|
||||
# check if reconstruction was exported to pmvs before
|
||||
if not io.file_exists(tree.pmvs_visdat) or rerun_cell:
|
||||
# run PMVS converter
|
||||
|
|
Ładowanie…
Reference in New Issue