Change OpenSfM to default for point clound densification

pull/444/head
Dakota Benjamin 2016-12-27 13:44:48 -05:00
rodzic 45f0317a75
commit 93df6fbcb1
6 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -118,7 +118,7 @@ def config():
'images based on GPS exif data. Set to 0 to skip '
'pre-matching. 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 '

Wyświetl plik

@ -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:

Wyświetl plik

@ -117,7 +117,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'],

Wyświetl plik

@ -98,7 +98,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

Wyświetl plik

@ -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

Wyświetl plik

@ -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