Skip to content

Commit

Permalink
Add new parameters in ImageProcessing node
Browse files Browse the repository at this point in the history
  • Loading branch information
Stella TAN committed Aug 10, 2022
1 parent 92e77e7 commit aaa8504
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions meshroom/nodes/aliceVision/ImageProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,51 @@ class ImageProcessing(desc.CommandLineNode):
enabled=lambda node: node.noiseFilter.noiseEnabled.value,
),
]),
desc.GroupAttribute(name="nlmFilter", label="NL Means Denoising", description="NL Means Denoising Parameters.", joinChar=":", groupDesc=[
desc.BoolParam(
name='denoiseEnabled',
label='Enable',
description='Use Non-local Mean Denoising from OpenCV to denoise images',
value=False,
uid=[0],
),
desc.FloatParam(
name='filteringParamH',
label='H',
description='Parameter regulating filter strength. Bigger H value perfectly removes noise but also removes image details, smaller H value preserves details but also preserves some noise.',
value=5,
range=(1, 1000, 0.01),
uid=[0],
enabled=lambda node: node.nlmFilter.denoiseEnabled.value,
),
desc.FloatParam(
name='filteringParamHForColorComponents',
label='HColor',
description='Parameter regulating filter strength for color images only. Normally same as Filtering Parameter H. Not necessary for grayscale images',
value=5,
range=(0, 1000, 0.01),
uid=[0],
enabled=lambda node: node.nlmFilter.denoiseEnabled.value,
),
desc.IntParam(
name='templateWindowSize',
label='Template Window Size',
description='Size in pixels of the template patch that is used to compute weights. Should be odd.',
value=7,
range=(1, 101, 2),
uid=[0],
enabled=lambda node: node.nlmFilter.denoiseEnabled.value,
),
desc.IntParam(
name='searchWindowSize',
label='Search Window Size',
description='Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time.',
value=21,
range=(1, 1001, 2),
uid=[0],
enabled=lambda node: node.nlmFilter.denoiseEnabled.value,
),
]),
desc.ChoiceParam(
name='outputFormat',
label='Output Image Format',
Expand Down

0 comments on commit aaa8504

Please sign in to comment.