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

Use DCP by default if the database is set and create errors on missing DCP files #1863

Merged
merged 1 commit into from
Jan 14, 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
28 changes: 18 additions & 10 deletions meshroom/nodes/aliceVision/CameraInit.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,6 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode):
value='${ALICEVISION_SENSOR_DB}',
uid=[],
),
desc.File(
name='colorProfileDatabase',
label='Color Profile Database',
description='''Color Profile database directory path.''',
value='${ALICEVISION_COLOR_PROFILE_DB}',
uid=[],
),
desc.FloatParam(
name='defaultFieldOfView',
label='Default Field Of View',
Expand Down Expand Up @@ -207,17 +200,32 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode):
desc.ChoiceParam(
name='rawColorInterpretation',
label='RAW Color Interpretation',
description='Allows you to choose how raw data are color processed.',
value='LibRawWhiteBalancing',
description='Allows you to choose how raw data are color processed:\n'
'None: Debayering without any color processing.\n'
'LibRawNoWhiteBalancing: Simple neutralization.\n'
'LibRawWhiteBalancing: Use internal white balancing from libraw.\n'
'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'],
exclusive=True,
uid=[0],
),
desc.File(
name='colorProfileDatabase',
label='Color Profile Database',
description='''Color Profile database directory path.''',
value='${ALICEVISION_COLOR_PROFILE_DB}',
enabled=lambda node: node.rawColorInterpretation.value.startswith('DCP'),
uid=[],
),
desc.BoolParam(
name='errorOnMissingColorProfile',
label='Error On Missing DCP Color Profile',
description='If a color profile database is specified but no color profile is found for at least one image, then an error is thrown',
description='When enabled, if no color profile is found for at least one image, then an error is thrown.\n'
'When disabled, if no color profile is found for some images, it will fallback to libRawWhiteBalancing for those images.',
value=True,
enabled=lambda node: node.rawColorInterpretation.value.startswith('DCP'),
uid=[0],
),
desc.ChoiceParam(
Expand Down
11 changes: 11 additions & 0 deletions meshroom/nodes/aliceVision/LdrToHdrCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ class LdrToHdrCalibration(desc.AVCommandLineNode):
advanced=True,
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
),
desc.ChoiceParam(
name='workingColorSpace',
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'],
exclusive=True,
uid=[],
group='user', # not used directly on the command line
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
),
desc.IntParam(
name='maxTotalPoints',
label='Max Number of Points',
Expand Down
10 changes: 10 additions & 0 deletions meshroom/nodes/aliceVision/LdrToHdrMerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@ class LdrToHdrMerge(desc.AVCommandLineNode):
advanced=True,
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
),
desc.ChoiceParam(
name='workingColorSpace',
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'],
exclusive=True,
uid=[0],
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
),
desc.BoolParam(
name='enableHighlight',
label='Enable Highlight',
Expand Down
10 changes: 10 additions & 0 deletions meshroom/nodes/aliceVision/LdrToHdrSampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ class LdrToHdrSampling(desc.AVCommandLineNode):
advanced=True,
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
),
desc.ChoiceParam(
name='workingColorSpace',
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'],
exclusive=True,
uid=[0],
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
),
desc.IntParam(
name='blockSize',
label='Block Size',
Expand Down
6 changes: 4 additions & 2 deletions meshroom/pipelines/panoramaFisheyeHdr.mg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"byPass": "{LdrToHdrCalibration_1.byPass}",
"input": "{LdrToHdrCalibration_1.input}",
"userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}",
"response": "{LdrToHdrCalibration_1.response}"
"response": "{LdrToHdrCalibration_1.response}",
"workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}"
},
"nodeType": "LdrToHdrMerge",
"position": [
Expand Down Expand Up @@ -66,7 +67,8 @@
"channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}",
"byPass": "{LdrToHdrSampling_1.byPass}",
"input": "{LdrToHdrSampling_1.input}",
"userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}"
"userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}",
"workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}"
},
"nodeType": "LdrToHdrCalibration",
"position": [
Expand Down
6 changes: 4 additions & 2 deletions meshroom/pipelines/panoramaHdr.mg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"byPass": "{LdrToHdrCalibration_1.byPass}",
"input": "{LdrToHdrCalibration_1.input}",
"userNbBrackets": "{LdrToHdrCalibration_1.userNbBrackets}",
"response": "{LdrToHdrCalibration_1.response}"
"response": "{LdrToHdrCalibration_1.response}",
"workingColorSpace": "{LdrToHdrCalibration_1.workingColorSpace}"
},
"nodeType": "LdrToHdrMerge",
"position": [
Expand Down Expand Up @@ -66,7 +67,8 @@
"channelQuantizationPower": "{LdrToHdrSampling_1.channelQuantizationPower}",
"byPass": "{LdrToHdrSampling_1.byPass}",
"input": "{LdrToHdrSampling_1.input}",
"userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}"
"userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}",
"workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}"
},
"nodeType": "LdrToHdrCalibration",
"position": [
Expand Down