[nodes] HDR Fusion: Correctly detect the number of brackets when there are several intrinsics #2104
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 relates to alicevision/AliceVision#1484.
The detection of the number of brackets used to only work in a case where there was a single dataset / a single camera intrinsics. If two datasets with the same number of brackets were provided, the detection was failing because we expected the exposure levels to be uniform across all the images.
If more than one dataset is provided, there is no guarantee that the exposure groups will be identical although the number of brackets is the same.
The inputs are however sorted, and the shutter speeds are expected to be decreasing, meaning that a shutter speed N superior to a shutter speed N-1 indicates a new group. In the same manner, ISO or aperture values that change from one input to the next one indicate a new group.
For the comparison between exposure levels to be valid, the aperture, shutter speed and ISO values need to be stored in tuples as floats instead of strings.
This method is used for the following nodes:
LdrToHdrSampling
LdrToHdrCalibration
LdrToHdrMerge