diff --git a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py index 5f53bae573..7ce76f3d2f 100644 --- a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py @@ -37,6 +37,34 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): value="", uid=[0], ), + desc.ChoiceParam( + name="correctionMethod", + label="Correction Level", + description="Level of correction:\n" + " - luminance: Ajust luminance level only.\n" + " - whiteBalance: Apply white balancing in addition to luminance adjustment.\n" + " - full: Full color correction." + " - bypass: Do nothing.", + value="luminance", + values=["luminance", "whiteBalance", "full", "bypass"], + exclusive=True, + uid=[0], + ), + desc.BoolParam( + name="useBestColorCheckerOnly", + label="Use Best Color Chart Only", + description="If checked, use only the color chart with the best orientation and size to compute the color correction model.\n" + "If unchecked, combine all detected color checkers.", + value=True, + uid=[0], + ), + desc.BoolParam( + name="keepImageName", + label="Keep Image Name", + description="Keep image names if different from the view Ids.", + value=True, + uid=[0], + ), desc.ChoiceParam( name="extension", label="Output File Extension", diff --git a/meshroom/nodes/aliceVision/ColorCheckerDetection.py b/meshroom/nodes/aliceVision/ColorCheckerDetection.py index d52379738d..7c1eb1946b 100644 --- a/meshroom/nodes/aliceVision/ColorCheckerDetection.py +++ b/meshroom/nodes/aliceVision/ColorCheckerDetection.py @@ -35,6 +35,25 @@ class ColorCheckerDetection(desc.AVCommandLineNode): value="", uid=[0], ), + desc.ChoiceParam( + name="ccType", + label="Colorchart Type", + description="Colorchart type:\n" + " - mcc24 classical macbeth 24 patches\n" + " - sg140 Digital SG 140 patches\n" + " - Vinyl18 DKK colorchart 12 patches + 6 rectangles)", + value="mcc24", + values=["mcc24", "sg140", "Vinyl18"], + exclusive=True, + uid=[0], + ), + desc.File( + name="modelFolder", + label="Model Folder", + description="DNN model directory path.", + value="${ALICEVISION_COLORCHARTDETECTION_MODEL_FOLDER}", + uid=[0], + ), desc.IntParam( name="maxCount", label="Max Count By Image", @@ -51,6 +70,22 @@ class ColorCheckerDetection(desc.AVCommandLineNode): value=False, uid=[0], ), + desc.BoolParam( + name="processAllImages", + label="Process All Images", + description="If checked, detection will be launched on all images.\n" + "If unchecked, only images with a name fitting a regular expression are considered.", + value=True, + uid=[0], + ), + desc.File( + name="filter", + label="Filter", + description="Regex to select the images on which the colorchecker detection will be computed.", + value="*_macbeth.*", + uid=[0], + enabled=lambda node: not node.processAllImages.value + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", diff --git a/meshroom/pipelines/panoramaHdr.mg b/meshroom/pipelines/panoramaHdr.mg index a7ee3247dc..b4c00ba792 100644 --- a/meshroom/pipelines/panoramaHdr.mg +++ b/meshroom/pipelines/panoramaHdr.mg @@ -17,7 +17,9 @@ "PanoramaWarping": "1.1", "PanoramaCompositing": "2.0", "PanoramaMerging": "1.0", - "LdrToHdrMerge": "4.1" + "LdrToHdrMerge": "4.1", + "ColorCheckerDetection": "1.0", + "ColorCheckerCorrection": "1.0" }, "releaseVersion": "2023.3.0-develop", "fileVersion": "1.1", @@ -42,7 +44,7 @@ "PanoramaWarping_1": { "nodeType": "PanoramaWarping", "position": [ - 2000, + 2400, 0 ], "inputs": { @@ -75,10 +77,31 @@ "input": "{PanoramaPrepareImages_1.output}" } }, + "ColorCheckerDetection_1": { + "nodeType": "ColorCheckerDetection", + "position": [ + 1000, + -58 + ], + "inputs": { + "input": "{LdrToHdrMerge_1.outSfMData}" + } + }, + "ColorCheckerCorrection_1": { + "nodeType": "ColorCheckerCorrection", + "position": [ + 1200, + 72 + ], + "inputs": { + "inputData": "{ColorCheckerDetection_1.outputData}", + "input": "{LdrToHdrMerge_1.outSfMData}" + } + }, "ImageMatching_1": { "nodeType": "ImageMatching", "position": [ - 1200, + 1600, 0 ], "inputs": { @@ -92,18 +115,18 @@ "FeatureExtraction_1": { "nodeType": "FeatureExtraction", "position": [ - 1000, + 1400, 70 ], "inputs": { - "input": "{LdrToHdrMerge_1.outSfMData}", + "input": "{ColorCheckerCorrection_1.outSfMData}", "describerQuality": "high" } }, "PanoramaMerging_1": { "nodeType": "PanoramaMerging", "position": [ - 2600, + 3000, 0 ], "inputs": { @@ -115,7 +138,7 @@ "PanoramaCompositing_1": { "nodeType": "PanoramaCompositing", "position": [ - 2400, + 2800, 0 ], "inputs": { @@ -146,7 +169,7 @@ "PanoramaPostProcessing_1": { "nodeType": "PanoramaPostProcessing", "position": [ - 2800, + 3200, 0 ], "inputs": { @@ -168,7 +191,7 @@ "SfMTransform_1": { "nodeType": "SfMTransform", "position": [ - 1800, + 2200, 0 ], "inputs": { @@ -179,7 +202,7 @@ "PanoramaSeams_1": { "nodeType": "PanoramaSeams", "position": [ - 2200, + 2600, 0 ], "inputs": { @@ -190,7 +213,7 @@ "PanoramaEstimation_1": { "nodeType": "PanoramaEstimation", "position": [ - 1600, + 2000, 0 ], "inputs": { @@ -205,17 +228,17 @@ "PanoramaInit_1": { "nodeType": "PanoramaInit", "position": [ - 1000, + 1400, -50 ], "inputs": { - "input": "{LdrToHdrMerge_1.outSfMData}" + "input": "{ColorCheckerCorrection_1.outSfMData}" } }, "FeatureMatching_1": { "nodeType": "FeatureMatching", "position": [ - 1400, + 1800, 0 ], "inputs": { @@ -228,7 +251,7 @@ "Publish_1": { "nodeType": "Publish", "position": [ - 3000, + 3400, 0 ], "inputs": {