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

[nodes] HDR Fusion: Do not send nbBrackets parameter to the command line when the bracket detection is automatic #2117

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions meshroom/nodes/aliceVision/LdrToHdrCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class LdrToHdrCalibration(desc.AVCommandLineNode):
value=0,
range=(0, 10, 1),
uid=[0],
group="bracketsParams"
),
desc.BoolParam(
name="byPass",
Expand Down Expand Up @@ -163,6 +164,12 @@ class LdrToHdrCalibration(desc.AVCommandLineNode):
def processChunk(self, chunk):
if chunk.node.nbBrackets.value == 1:
return
# Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic.
# Otherwise, the AliceVision executable has no way of determining whether the bracket detection was automatic
# or if it was hard-set by the user.
self.commandLine = "aliceVision_LdrToHdrCalibration {allParams}"
if chunk.node.userNbBrackets.value == chunk.node.nbBrackets.value:
self.commandLine += "{bracketsParams}"
super(LdrToHdrCalibration, self).processChunk(chunk)

@classmethod
Expand Down
10 changes: 10 additions & 0 deletions meshroom/nodes/aliceVision/LdrToHdrMerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class LdrToHdrMerge(desc.AVCommandLineNode):
value=0,
range=(0, 10, 1),
uid=[0],
group="bracketsParams"
),
desc.BoolParam(
name="offsetRefBracketIndexEnabled",
Expand Down Expand Up @@ -358,3 +359,12 @@ def update(cls, node):
node.nbBrackets.value = bestBracketSize
else:
node.nbBrackets.value = 0

def processChunk(self, chunk):
# Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic.
# Otherwise, the AliceVision executable has no way of determining whether the bracket detection was automatic
# or if it was hard-set by the user.
self.commandLine = "aliceVision_LdrToHdrMerge {allParams}"
if chunk.node.userNbBrackets.value == chunk.node.nbBrackets.value:
self.commandLine += "{bracketsParams}"
super(LdrToHdrMerge, self).processChunk(chunk)
7 changes: 7 additions & 0 deletions meshroom/nodes/aliceVision/LdrToHdrSampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class LdrToHdrSampling(desc.AVCommandLineNode):
value=0,
range=(0, 10, 1),
uid=[0],
group="bracketsParams"
),
desc.BoolParam(
name="byPass",
Expand Down Expand Up @@ -184,6 +185,12 @@ class LdrToHdrSampling(desc.AVCommandLineNode):
def processChunk(self, chunk):
if chunk.node.nbBrackets.value == 1:
return
# Trick to avoid sending --nbBrackets to the command line when the bracket detection is automatic.
# Otherwise, the AliceVision executable has no way of determining whether the bracket detection was automatic
# or if it was hard-set by the user.
self.commandLine = "aliceVision_LdrToHdrSampling {allParams}"
if chunk.node.userNbBrackets.value == chunk.node.nbBrackets.value:
self.commandLine += "{bracketsParams}"
super(LdrToHdrSampling, self).processChunk(chunk)

@classmethod
Expand Down