Skip to content

Commit 5ba2e38

Browse files
authored
Merge pull request #1073 from alicevision/dev/ldr2hdrBypass
ldr2hdr: fix bypass option
2 parents 1168464 + 38d8858 commit 5ba2e38

File tree

4 files changed

+39
-13
lines changed

4 files changed

+39
-13
lines changed

meshroom/nodes/aliceVision/LdrToHdrCalibration.py

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.0"
1+
__version__ = "3.0"
22

33
import json
44

@@ -49,6 +49,15 @@ class LdrToHdrCalibration(desc.CommandLineNode):
4949
value=desc.Node.internalFolder,
5050
uid=[0],
5151
),
52+
desc.BoolParam(
53+
name='byPass',
54+
label='Bypass',
55+
description="Bypass HDR creation and use the medium bracket as the source for the next steps",
56+
value=False,
57+
uid=[0],
58+
group='internal',
59+
enabled= lambda node: node.nbBrackets.value != 1,
60+
),
5261
desc.ChoiceParam(
5362
name='calibrationMethod',
5463
label='Calibration Method',
@@ -62,6 +71,7 @@ class LdrToHdrCalibration(desc.CommandLineNode):
6271
value='debevec',
6372
exclusive=True,
6473
uid=[0],
74+
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
6575
),
6676
desc.ChoiceParam(
6777
name='calibrationWeight',
@@ -75,14 +85,15 @@ class LdrToHdrCalibration(desc.CommandLineNode):
7585
values=['default', 'gaussian', 'triangle', 'plateau'],
7686
exclusive=True,
7787
uid=[0],
88+
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
7889
),
7990
desc.IntParam(
8091
name='userNbBrackets',
8192
label='Number of Brackets',
8293
description='Number of exposure brackets per HDR image (0 for automatic detection).',
8394
value=0,
8495
range=(0, 15, 1),
85-
uid=[0],
96+
uid=[],
8697
group='user', # not used directly on the command line
8798
),
8899
desc.IntParam(
@@ -91,7 +102,7 @@ class LdrToHdrCalibration(desc.CommandLineNode):
91102
description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".',
92103
value=0,
93104
range=(0, 10, 1),
94-
uid=[],
105+
uid=[0],
95106
),
96107
desc.IntParam(
97108
name='channelQuantizationPower',
@@ -101,17 +112,18 @@ class LdrToHdrCalibration(desc.CommandLineNode):
101112
range=(8, 14, 1),
102113
uid=[0],
103114
advanced=True,
115+
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
104116
),
105117
desc.IntParam(
106118
name='maxTotalPoints',
107119
label='Max Number of Points',
108-
description='Max number of points selected by the sampling strategy.\n'
109-
'This ensures that this sampling step will extract a number of pixels values\n'
110-
'that the calibration step can manage (in term of computation time and memory usage).',
120+
description='Max number of points used from the sampling. This ensures that the number of pixels values extracted by the sampling\n'
121+
'can be managed by the calibration step (in term of computation time and memory usage).',
111122
value=1000000,
112123
range=(8, 10000000, 1000),
113124
uid=[0],
114125
advanced=True,
126+
enabled= lambda node: node.byPass.enabled and not node.byPass.value,
115127
),
116128
desc.ChoiceParam(
117129
name='verboseLevel',
@@ -134,6 +146,11 @@ class LdrToHdrCalibration(desc.CommandLineNode):
134146
)
135147
]
136148

149+
def processChunk(self, chunk):
150+
if chunk.node.nbBrackets.value == 1 or chunk.node.byPass.value:
151+
return
152+
super(LdrToHdrCalibration, self).processChunk(chunk)
153+
137154
@classmethod
138155
def update(cls, node):
139156
if not isinstance(node.nodeDesc, cls):

meshroom/nodes/aliceVision/LdrToHdrMerge.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.0"
1+
__version__ = "4.0"
22

33
import json
44

@@ -53,7 +53,7 @@ class LdrToHdrMerge(desc.CommandLineNode):
5353
description='Number of exposure brackets per HDR image (0 for automatic detection).',
5454
value=0,
5555
range=(0, 15, 1),
56-
uid=[0],
56+
uid=[],
5757
group='user', # not used directly on the command line
5858
),
5959
desc.IntParam(
@@ -62,7 +62,7 @@ class LdrToHdrMerge(desc.CommandLineNode):
6262
description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".',
6363
value=0,
6464
range=(0, 10, 1),
65-
uid=[],
65+
uid=[0],
6666
),
6767
desc.IntParam(
6868
name='offsetRefBracketIndex',

meshroom/nodes/aliceVision/LdrToHdrSampling.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.0"
1+
__version__ = "4.0"
22

33
import json
44

@@ -63,7 +63,7 @@ class LdrToHdrSampling(desc.CommandLineNode):
6363
description='Number of exposure brackets per HDR image (0 for automatic detection).',
6464
value=0,
6565
range=(0, 15, 1),
66-
uid=[0],
66+
uid=[],
6767
group='user', # not used directly on the command line
6868
),
6969
desc.IntParam(
@@ -72,7 +72,7 @@ class LdrToHdrSampling(desc.CommandLineNode):
7272
description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".',
7373
value=0,
7474
range=(0, 10, 1),
75-
uid=[],
75+
uid=[0],
7676
),
7777
desc.BoolParam(
7878
name='byPass',

meshroom/nodes/aliceVision/PanoramaWarping.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,20 @@ class PanoramaWarping(desc.CommandLineNode):
5151
' * 0: all pixels will be downscaled\n'
5252
' * 50: on average the input resolution is kept (optimal to reduce over/under-sampling)\n'
5353
' * 100: all pixels will be upscaled\n',
54-
value=30,
54+
value=50,
5555
range=(0, 100, 1),
5656
enabled=lambda node: (node.estimateResolution.value),
5757
uid=[0]
5858
),
59+
desc.IntParam(
60+
name='maxPanoramaWidth',
61+
label='Max Panorama Width',
62+
description='Choose the maximal output panorama width (in pixels). Zero means no limit.',
63+
value=35000,
64+
range=(0, 100000, 1000),
65+
uid=[0],
66+
enabled=lambda node: (node.estimateResolution.value),
67+
),
5968
desc.ChoiceParam(
6069
name='storageDataType',
6170
label='Storage Data Type',

0 commit comments

Comments
 (0)