[nodes] HDR Fusion: Do not send nbBrackets
parameter to the command line when the bracket detection is automatic
#2117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the command line for the HDR Fusion nodes (
LdrToHdrSampling
,LdrToHdrCalibration
andLdrToHdrMerge
) with or without thenbBrackets
parameters depending on whether the number of brackets is detected automatically or provided by the user.If the user provides it, it is added to the command line as
--nbBrackets x
. If the detection is automatic, thenbBrackets
parameter is not part of the command line, and the brackets will be automatically detected on the AliceVision side.The goal is to be able to distinguish, from the AliceVision side, cases where the number of brackets is determined automatically or set by the user; up until now, Meshroom always sent a fixed number of brackets (either automatically detected or provided by the user), without any way to distinguish where it came from.
The number of brackets that is displayed in the Image Gallery remains unchanged, and the automatic detection will still occur if needed.
Implementation remarks
The
nbBrackets
parameter is excluded from the "allParams" group, withdrawing it by default from the command line. When the chunks are being processed, the command line is updated with it if the number of brackets has been provided by the user. If it has not, the command line is reset (at every iteration) to ensure that there are no--nbBrackets
leftovers when we are switching between the automatic bracket detection and the manually-specified brackets number.Rather than dynamically modifying the command line, the
nbBrackets
anduserNbBrackets
logic could be reversed for this to be done automatically. This however involves a lot of code modification that needs to be carried out throughout all the HDR Fusion nodes, and will thus be the focus of an ulterior pull request.