From 88446b78c5cbc15db40546a1768652d0db5168fa Mon Sep 17 00:00:00 2001 From: demoulinv Date: Wed, 6 Sep 2023 17:48:00 +0200 Subject: [PATCH 1/8] [nodes] ColorCheckerCorrection: Add options to correct the luminance only and to use the best oriented color chart if several are detected --- .../nodes/aliceVision/ColorCheckerCorrection.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py index 5f53bae573..62697d820b 100644 --- a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py @@ -37,6 +37,20 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): value="", uid=[0], ), + desc.BoolParam( + name="luminanceOnly", + label="Luminance Correction Only", + description="Only correct the luminance level.", + value=True, + uid=[0], + ), + desc.BoolParam( + name="useBestColorCheckerOnly", + label="Use Best Color Chart Only", + description="Use only the color chart with the best orientation and size to compute the color correction model.", + value=True, + uid=[0], + ), desc.ChoiceParam( name="extension", label="Output File Extension", From 5e51a55a475472c4b90f0886089507ccc55b6fa7 Mon Sep 17 00:00:00 2001 From: demoulinv Date: Thu, 7 Sep 2023 15:20:12 +0200 Subject: [PATCH 2/8] [node] colorCheckerCorrection: add a correction method choice parameter and add white balancing method. --- .../nodes/aliceVision/ColorCheckerCorrection.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py index 62697d820b..b68f44d911 100644 --- a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py @@ -37,11 +37,16 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): value="", uid=[0], ), - desc.BoolParam( - name="luminanceOnly", - label="Luminance Correction Only", - description="Only correct the luminance level.", - value=True, + 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.", + value="luminance", + values=["luminance", "whiteBalance", "full"], + exclusive=True, uid=[0], ), desc.BoolParam( From 7e7e45cc872518fc93a9fa64367ac978ad0cb36d Mon Sep 17 00:00:00 2001 From: demoulinv Date: Sat, 9 Sep 2023 17:00:00 +0200 Subject: [PATCH 3/8] [Node] colorCheckerDetection: Add options to launch detection process only on images with a name matching a filter. --- .../nodes/aliceVision/ColorCheckerDetection.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meshroom/nodes/aliceVision/ColorCheckerDetection.py b/meshroom/nodes/aliceVision/ColorCheckerDetection.py index d52379738d..054db432a1 100644 --- a/meshroom/nodes/aliceVision/ColorCheckerDetection.py +++ b/meshroom/nodes/aliceVision/ColorCheckerDetection.py @@ -51,6 +51,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 filter images on which he detection will be launched.", + value="*_macbeth.*", + uid=[0], + enabled=lambda node: not node.processAllImages.value + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", From 751ac9226f0ab49f6570fc0ad350fcb9831a1929 Mon Sep 17 00:00:00 2001 From: demoulinv Date: Mon, 11 Sep 2023 14:32:25 +0200 Subject: [PATCH 4/8] [Pipelines] panoramaHdr: add colorChecker detection and correction nodes. --- meshroom/pipelines/panoramaHdr.mg | 53 ++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 15 deletions(-) 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": { From 584f12cb1c350566171ebc02edb544e1effa57a6 Mon Sep 17 00:00:00 2001 From: demoulinv Date: Mon, 18 Sep 2023 11:10:45 +0200 Subject: [PATCH 5/8] [Nodes] colorCheckerCorrection: Add option to keep image names if different from view Ids. --- meshroom/nodes/aliceVision/ColorCheckerCorrection.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py index b68f44d911..39fcdbe6b8 100644 --- a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py @@ -56,6 +56,13 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): 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", From ba9576ff79abca89c3c9c22009281f3dcf58e244 Mon Sep 17 00:00:00 2001 From: demoulinv Date: Tue, 19 Sep 2023 20:52:31 +0200 Subject: [PATCH 6/8] [nodes] colorCheckerCorrection: Add bypass option in correction method list. --- meshroom/nodes/aliceVision/ColorCheckerCorrection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py index 39fcdbe6b8..7a3eea33ae 100644 --- a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py @@ -45,7 +45,7 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): " - whiteBalance: Apply white balancing in addition to luminance adjustment.\n" " - full: Full color correction.", value="luminance", - values=["luminance", "whiteBalance", "full"], + values=["luminance", "whiteBalance", "full", "bypass"], exclusive=True, uid=[0], ), From 75422c7c276e949af7bf56ba2dd9ebcd7913ab36 Mon Sep 17 00:00:00 2001 From: demoulinv Date: Wed, 20 Sep 2023 17:50:05 +0200 Subject: [PATCH 7/8] [nodes] colorCheckerDetection and correction: Update description --- meshroom/nodes/aliceVision/ColorCheckerCorrection.py | 6 ++++-- meshroom/nodes/aliceVision/ColorCheckerDetection.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py index 7a3eea33ae..7ce76f3d2f 100644 --- a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py @@ -43,7 +43,8 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): 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.", + " - full: Full color correction." + " - bypass: Do nothing.", value="luminance", values=["luminance", "whiteBalance", "full", "bypass"], exclusive=True, @@ -52,7 +53,8 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): desc.BoolParam( name="useBestColorCheckerOnly", label="Use Best Color Chart Only", - description="Use only the color chart with the best orientation and size to compute the color correction model.", + 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], ), diff --git a/meshroom/nodes/aliceVision/ColorCheckerDetection.py b/meshroom/nodes/aliceVision/ColorCheckerDetection.py index 054db432a1..e81960c41d 100644 --- a/meshroom/nodes/aliceVision/ColorCheckerDetection.py +++ b/meshroom/nodes/aliceVision/ColorCheckerDetection.py @@ -62,7 +62,7 @@ class ColorCheckerDetection(desc.AVCommandLineNode): desc.File( name="filter", label="Filter", - description="Regex to filter images on which he detection will be launched.", + 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 From d8362c1517fe72834cebe9e8ec2fd06b1375bfed Mon Sep 17 00:00:00 2001 From: demoulinv Date: Wed, 27 Sep 2023 10:23:20 +0200 Subject: [PATCH 8/8] [Nodes] ColorCheckerDetection: Add color chart type option and add cnn model folder setting. --- .../aliceVision/ColorCheckerDetection.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/meshroom/nodes/aliceVision/ColorCheckerDetection.py b/meshroom/nodes/aliceVision/ColorCheckerDetection.py index e81960c41d..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",