From cbef8f667036e36dcb9dcaf016622f3698eed426 Mon Sep 17 00:00:00 2001 From: demoulinv Date: Tue, 29 Aug 2023 08:55:36 +0200 Subject: [PATCH] [Nodes] HDR: Add "auto" option for calibration method and working color space in sampling, calibration and merging nodes. --- meshroom/nodes/aliceVision/LdrToHdrCalibration.py | 9 +++++---- meshroom/nodes/aliceVision/LdrToHdrMerge.py | 4 ++-- meshroom/nodes/aliceVision/LdrToHdrSampling.py | 9 +++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/meshroom/nodes/aliceVision/LdrToHdrCalibration.py b/meshroom/nodes/aliceVision/LdrToHdrCalibration.py index 296fc2b1..8bae2b9e 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/nodes/aliceVision/LdrToHdrCalibration.py @@ -86,12 +86,13 @@ Calibrate LDR to HDR response curve from samples. name="calibrationMethod", label="Calibration Method", description="Method used for camera calibration:\n" + " - AUTO: If RAW images are detected then Linear behavior is selected else Debevec calibration method is enabled.\n" " - Linear: Disables 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.", - values=["linear", "debevec", "grossberg", "laguerre"], - value="debevec", + values=["AUTO", "linear", "debevec", "grossberg", "laguerre"], + value="AUTO", exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, @@ -124,8 +125,8 @@ Calibrate LDR to HDR response curve from samples. 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"], + value="AUTO", + values=["AUTO", "sRGB", "Linear", "ACES2065-1", "ACEScg"], exclusive=True, uid=[], group="user", # not used directly on the command line diff --git a/meshroom/nodes/aliceVision/LdrToHdrMerge.py b/meshroom/nodes/aliceVision/LdrToHdrMerge.py index 2f127a98..9dae0035 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrMerge.py +++ b/meshroom/nodes/aliceVision/LdrToHdrMerge.py @@ -168,8 +168,8 @@ Merge LDR images into HDR images. 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", "no_conversion"], + value="AUTO", + values=["AUTO", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, diff --git a/meshroom/nodes/aliceVision/LdrToHdrSampling.py b/meshroom/nodes/aliceVision/LdrToHdrSampling.py index f2766bd1..cc04f8c8 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrSampling.py +++ b/meshroom/nodes/aliceVision/LdrToHdrSampling.py @@ -100,12 +100,13 @@ Sample pixels from Low range images for HDR creation. name="calibrationMethod", label="Calibration Method", description="Method used for camera calibration:\n" + " - AUTO: If RAW images are detected then Linear behavior is selected else Debevec calibration method is enabled.\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.", - values=["linear", "debevec", "grossberg", "laguerre"], - value="debevec", + values=["AUTO", "linear", "debevec", "grossberg", "laguerre"], + value="AUTO", exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, @@ -124,8 +125,8 @@ Sample pixels from Low range images for HDR creation. 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", "no_conversion"], + value="AUTO", + values=["AUTO", "sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value,