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

Color checker detection and correction update #2186

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from
26 changes: 26 additions & 0 deletions meshroom/nodes/aliceVision/ColorCheckerCorrection.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,32 @@ 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.",
value="luminance",
values=["luminance", "whiteBalance", "full", "bypass"],
exclusive=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.",
demoulinv marked this conversation as resolved.
Show resolved Hide resolved
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",
Expand Down
16 changes: 16 additions & 0 deletions meshroom/nodes/aliceVision/ColorCheckerDetection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
demoulinv marked this conversation as resolved.
Show resolved Hide resolved
value="*_macbeth.*",
uid=[0],
enabled=lambda node: not node.processAllImages.value
),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
Expand Down
53 changes: 38 additions & 15 deletions meshroom/pipelines/panoramaHdr.mg
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -42,7 +44,7 @@
"PanoramaWarping_1": {
"nodeType": "PanoramaWarping",
"position": [
2000,
2400,
0
],
"inputs": {
Expand Down Expand Up @@ -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": {
Expand All @@ -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": {
Expand All @@ -115,7 +138,7 @@
"PanoramaCompositing_1": {
"nodeType": "PanoramaCompositing",
"position": [
2400,
2800,
0
],
"inputs": {
Expand Down Expand Up @@ -146,7 +169,7 @@
"PanoramaPostProcessing_1": {
"nodeType": "PanoramaPostProcessing",
"position": [
2800,
3200,
0
],
"inputs": {
Expand All @@ -168,7 +191,7 @@
"SfMTransform_1": {
"nodeType": "SfMTransform",
"position": [
1800,
2200,
0
],
"inputs": {
Expand All @@ -179,7 +202,7 @@
"PanoramaSeams_1": {
"nodeType": "PanoramaSeams",
"position": [
2200,
2600,
0
],
"inputs": {
Expand All @@ -190,7 +213,7 @@
"PanoramaEstimation_1": {
"nodeType": "PanoramaEstimation",
"position": [
1600,
2000,
0
],
"inputs": {
Expand All @@ -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": {
Expand All @@ -228,7 +251,7 @@
"Publish_1": {
"nodeType": "Publish",
"position": [
3000,
3400,
0
],
"inputs": {
Expand Down