[HDR sampling and calib nodes]

Add calibrationMethod as parameter at sampling.
Link calibrationMethod parameter of calib node to sampling node's calibrationMethod parameter in both HDR pipelines.
This commit is contained in:
demoulinv 2023-01-20 15:32:11 +01:00
parent 281991901d
commit 4a8232f23e
3 changed files with 20 additions and 4 deletions

View file

@ -81,9 +81,23 @@ class LdrToHdrSampling(desc.AVCommandLineNode):
description="Bypass HDR creation and use the medium bracket as the source for the next steps", description="Bypass HDR creation and use the medium bracket as the source for the next steps",
value=False, value=False,
uid=[0], uid=[0],
group='internal',
enabled= lambda node: node.nbBrackets.value != 1, enabled= lambda node: node.nbBrackets.value != 1,
), ),
desc.ChoiceParam(
name='calibrationMethod',
label='Calibration Method',
description="Method used for camera calibration \n"
" * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n"
" * Debevec: This is the standard method for HDR calibration. \n"
" * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n"
" * Laguerre: Simple but robust method estimating the minimal number of parameters. \n"
" * Robertson: First method for HDR calibration in the literature. \n",
values=['linear', 'debevec', 'grossberg', 'laguerre'],
value='debevec',
exclusive=True,
uid=[0],
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
),
desc.IntParam( desc.IntParam(
name='channelQuantizationPower', name='channelQuantizationPower',
label='Channel Quantization Power', label='Channel Quantization Power',
@ -164,7 +178,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode):
] ]
def processChunk(self, chunk): def processChunk(self, chunk):
if chunk.node.nbBrackets.value == 1 or chunk.node.byPass.value: if chunk.node.nbBrackets.value == 1:
return return
super(LdrToHdrSampling, self).processChunk(chunk) super(LdrToHdrSampling, self).processChunk(chunk)

View file

@ -68,7 +68,8 @@
"byPass": "{LdrToHdrSampling_1.byPass}", "byPass": "{LdrToHdrSampling_1.byPass}",
"input": "{LdrToHdrSampling_1.input}", "input": "{LdrToHdrSampling_1.input}",
"userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}", "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}",
"workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}",
"calibrationMethod": "{LdrToHdrSampling_1.calibrationMethod}"
}, },
"nodeType": "LdrToHdrCalibration", "nodeType": "LdrToHdrCalibration",
"position": [ "position": [

View file

@ -68,7 +68,8 @@
"byPass": "{LdrToHdrSampling_1.byPass}", "byPass": "{LdrToHdrSampling_1.byPass}",
"input": "{LdrToHdrSampling_1.input}", "input": "{LdrToHdrSampling_1.input}",
"userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}", "userNbBrackets": "{LdrToHdrSampling_1.userNbBrackets}",
"workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}" "workingColorSpace": "{LdrToHdrSampling_1.workingColorSpace}",
"calibrationMethod": "{LdrToHdrSampling_1.calibrationMethod}"
}, },
"nodeType": "LdrToHdrCalibration", "nodeType": "LdrToHdrCalibration",
"position": [ "position": [