Skip to content

Commit

Permalink
Merge pull request #1918 from alicevision/dev/rawAdvancedProcessing
Browse files Browse the repository at this point in the history
RAW advanced processing
  • Loading branch information
fabiencastan authored Mar 9, 2023
2 parents 33def1d + 7c7259b commit 393ab5e
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 4 deletions.
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/CameraInit.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode):
'DCPLinearProcessing: Use DCP color profile.\n'
'DCPMetadata: Same as None with DCP info added in metadata.\n',
value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing',
values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata'],
values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing'],
exclusive=True,
uid=[0],
),
Expand Down
43 changes: 42 additions & 1 deletion meshroom/nodes/aliceVision/ImageProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,14 @@ class ImageProcessing(desc.AVCommandLineNode):
values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'],
exclusive=True,
uid=[0],
enabled=lambda node: not node.applyDcpMetadata.value,
),

desc.ChoiceParam(
name='rawColorInterpretation',
label='RAW Color Interpretation',
description='Allows you to choose how raw data are color processed.',
value='LibRawWhiteBalancing',
value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing',
values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata', 'Auto'],
exclusive=True,
uid=[0],
Expand All @@ -388,6 +389,7 @@ class ImageProcessing(desc.AVCommandLineNode):
description='''Color Profile database directory path.''',
value='${ALICEVISION_COLOR_PROFILE_DB}',
uid=[],
enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'),
),

desc.BoolParam(
Expand All @@ -396,6 +398,45 @@ class ImageProcessing(desc.AVCommandLineNode):
description='If a color profile database is specified but no color profile is found for at least one image, then an error is thrown',
value=True,
uid=[0],
enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'),
),

desc.BoolParam(
name='useDCPColorMatrixOnly',
label='Use DCP Color Matrix Only',
description='Use only the Color Matrix information from the DCP and ignore the Forward Matrix.',
value=True,
uid=[0],
enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'),
),

desc.BoolParam(
name='doWBAfterDemosaicing',
label='WB after demosaicing',
description='Do White Balance after demosaicing, just before DCP profile application',
value=False,
uid=[0],
enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'),
),

desc.ChoiceParam(
name='demosaicingAlgo',
label='Demosaicing Algorithm',
description='LibRaw Demosaicing Algorithm\n',
value='AHD',
values=['linear', 'VNG', 'PPG', 'AHD', 'DCB', 'AHD-Mod', 'AFD', 'VCD', 'Mixed', 'LMMSE', 'AMaZE', 'DHT', 'AAHD', 'none'],
exclusive=True,
uid=[0],
),

desc.ChoiceParam(
name='highlightMode',
label='Highlight mode',
description='LibRaw highlight mode\n',
value=0,
values=[0, 1, 2, 3, 4, 5, 6, 7, 8],
exclusive=True,
uid=[0],
),

desc.ChoiceParam(
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/LdrToHdrMerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode):
label='Working Color Space',
description='Allows you to choose the color space in which the data are processed.',
value='sRGB',
values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'],
values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'],
exclusive=True,
uid=[0],
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/LdrToHdrSampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode):
label='Working Color Space',
description='Allows you to choose the color space in which the data are processed.',
value='sRGB',
values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'],
values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'],
exclusive=True,
uid=[0],
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
Expand Down
9 changes: 9 additions & 0 deletions meshroom/nodes/aliceVision/PanoramaPostProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ class PanoramaPostProcessing(desc.CommandLineNode):
value=False,
uid=[0],
),
desc.ChoiceParam(
name='outputColorSpace',
label='Output Color Space',
description='Allows you to choose the color space of the output image.',
value='Linear',
values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'],
exclusive=True,
uid=[0],
),
desc.ChoiceParam(
name='verboseLevel',
label='Verbose Level',
Expand Down

0 comments on commit 393ab5e

Please sign in to comment.