diff --git a/opendm/config.py b/opendm/config.py index 694e27f7..99c8fe86 100644 --- a/opendm/config.py +++ b/opendm/config.py @@ -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 ' diff --git a/scripts/mvstex.py b/scripts/mvstex.py index 2d9f4df0..7e4b3ee9 100644 --- a/scripts/mvstex.py +++ b/scripts/mvstex.py @@ -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: diff --git a/scripts/odm_app.py b/scripts/odm_app.py index 66b04e05..dd7c1ba7 100644 --- a/scripts/odm_app.py +++ b/scripts/odm_app.py @@ -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'], diff --git a/scripts/odm_georeferencing.py b/scripts/odm_georeferencing.py index affcdd99..e76c08c0 100644 --- a/scripts/odm_georeferencing.py +++ b/scripts/odm_georeferencing.py @@ -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 diff --git a/scripts/odm_meshing.py b/scripts/odm_meshing.py index 0d26a8b7..b02b4c7c 100644 --- a/scripts/odm_meshing.py +++ b/scripts/odm_meshing.py @@ -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 diff --git a/scripts/opensfm.py b/scripts/opensfm.py index 4f99f539..3a1afc91 100644 --- a/scripts/opensfm.py +++ b/scripts/opensfm.py @@ -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