diff --git a/opendm/config.py b/opendm/config.py index bf5fd2d8..7b51974b 100755 --- a/opendm/config.py +++ b/opendm/config.py @@ -422,6 +422,13 @@ def config(argv=None, parser=None): default=False, help='Skip the blending of colors near seams. Default: %(default)s') + parser.add_argument('--texturing-keep-unseen-faces', + action=StoreTrue, + nargs=0, + default=False, + help=('Keep faces in the mesh that are not seen in any camera. ' + 'Default: %(default)s')) + parser.add_argument('--texturing-tone-mapping', metavar='', action=StoreValue, diff --git a/stages/mvstex.py b/stages/mvstex.py index c5be730d..1f1b7e0f 100644 --- a/stages/mvstex.py +++ b/stages/mvstex.py @@ -68,12 +68,15 @@ class ODMMvsTexStage(types.ODM_Stage): # Format arguments to fit Mvs-Texturing app skipGlobalSeamLeveling = "" skipLocalSeamLeveling = "" + keepUnseenFaces = "" nadir = "" if (self.params.get('skip_glob_seam_leveling')): skipGlobalSeamLeveling = "--skip_global_seam_leveling" if (self.params.get('skip_loc_seam_leveling')): skipLocalSeamLeveling = "--skip_local_seam_leveling" + if (self.params.get('keep_unseen_faces')): + keepUnseenFaces = "--keep_unseen_faces" if (r['nadir']): nadir = '--nadir_mode' @@ -86,6 +89,7 @@ class ODMMvsTexStage(types.ODM_Stage): 'outlierRemovalType': self.params.get('outlier_rem_type'), 'skipGlobalSeamLeveling': skipGlobalSeamLeveling, 'skipLocalSeamLeveling': skipLocalSeamLeveling, + 'keepUnseenFaces': keepUnseenFaces, 'toneMapping': self.params.get('tone_mapping'), 'nadirMode': nadir, 'nvm_file': r['nvm_file'], @@ -107,6 +111,7 @@ class ODMMvsTexStage(types.ODM_Stage): '{intermediate} ' '{skipGlobalSeamLeveling} ' '{skipLocalSeamLeveling} ' + '{keepUnseenFaces} ' '{nadirMode} ' '{labelingFile} '.format(**kwargs)) diff --git a/stages/odm_app.py b/stages/odm_app.py index 0ca50b86..c59220c4 100644 --- a/stages/odm_app.py +++ b/stages/odm_app.py @@ -46,6 +46,7 @@ class ODMApp: outlier_rem_type=args.texturing_outlier_removal_type, skip_glob_seam_leveling=args.texturing_skip_global_seam_leveling, skip_loc_seam_leveling=args.texturing_skip_local_seam_leveling, + keep_unseen_faces=args.texturing_keep_unseen_faces, tone_mapping=args.texturing_tone_mapping) georeferencing = ODMGeoreferencingStage('odm_georeferencing', args, progress=80.0, gcp_file=args.gcp,