Merge pull request #499 from dakotabenjamin/tone-mapping-param

Tone mapping param
pull/501/head
Stephen Mather 2017-02-28 14:41:12 -05:00 zatwierdzone przez GitHub
commit da22dd2051
3 zmienionych plików z 15 dodań i 3 usunięć

Wyświetl plik

@ -266,6 +266,14 @@ def config():
help=('Keep faces in the mesh that are not seen in any camera. '
'Default: %(default)s'))
parser.add_argument('--texturing-tone-mapping',
metavar='<string>',
choices=['none', 'gamma'],
default='none',
help='Turn on gamma tone mapping or none for no tone '
'mapping. Choices are \'gamma\' or \'none\'. '
'Default: %(default)s ')
parser.add_argument('--gcp',
metavar='<path string>',
default=None,

Wyświetl plik

@ -16,6 +16,7 @@ class ODMMvsTexCell(ecto.Cell):
params.declare("skip_loc_seam_leveling", 'Skip local seam leveling (Poisson editing).', False)
params.declare("skip_hole_fill", 'Skip hole filling.', False)
params.declare("keep_unseen_faces", 'Keep unseen faces.', False)
params.declare("tone_mapping", 'Type of tone mapping: [none, gamma]. Default: gamma', "gamma")
def declare_io(self, params, inputs, outputs):
inputs.declare("tree", "Struct with paths", [])
@ -68,7 +69,7 @@ class ODMMvsTexCell(ecto.Cell):
skipHoleFilling = "--skip_hole_filling"
if (self.params.keep_unseen_faces):
keepUnseenFaces = "--keep_unseen_faces"
# mvstex definitions
kwargs = {
'bin': context.mvstex_path,
@ -82,7 +83,8 @@ class ODMMvsTexCell(ecto.Cell):
'skipGlobalSeamLeveling': skipGlobalSeamLeveling,
'skipLocalSeamLeveling': skipLocalSeamLeveling,
'skipHoleFilling': skipHoleFilling,
'keepUnseenFaces': keepUnseenFaces
'keepUnseenFaces': keepUnseenFaces,
'toneMapping': self.params.tone_mapping
}
if not args.use_pmvs:
@ -99,6 +101,7 @@ class ODMMvsTexCell(ecto.Cell):
# run texturing binary
system.run('{bin} {nvm_file} {model} {out_dir} '
'-d {dataTerm} -o {outlierRemovalType} '
'-t {toneMapping} '
'{skipGeometricVisibilityTest} '
'{skipGlobalSeamLeveling} '
'{skipLocalSeamLeveling} '

Wyświetl plik

@ -66,7 +66,8 @@ class ODMApp(ecto.BlackBox):
skip_glob_seam_leveling=p.args.texturing_skip_global_seam_leveling,
skip_loc_seam_leveling=p.args.texturing_skip_local_seam_leveling,
skip_hole_fill=p.args.texturing_skip_hole_filling,
keep_unseen_faces=p.args.texturing_keep_unseen_faces),
keep_unseen_faces=p.args.texturing_keep_unseen_faces,
tone_mapping=p.args.texturing_tone_mapping),
'georeferencing': ODMGeoreferencingCell(img_size=p.args.resize_to,
gcp_file=p.args.gcp,
use_exif=p.args.use_exif,