Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAW advanced processing #1918

Merged
merged 8 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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',
Copy link
Member

@fabiencastan fabiencastan Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the description for each code or an enum.
No need for "\n" if there is only one line.

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