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

Non monotonic HDR bracketing pattern support #1832

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

demoulinv
Copy link
Contributor

Description

This PR aims at supporting a specific pattern of LDR images when building a HDR image. The pattern is given by the set of image exposures when the LDR image set is sorted according to the alphabetic order.
Up to now, only monotonic patterns was supported. However, it appears that in some cases the middle exposure is delivered at the first position, followed by the darker images in the increasing order and by the brighter images also in the increasing order. For a set of 7 LDR images here is this pattern's exposures: 0, -3, -2, -1, 1, 2, 3. Currently, the HDR image is built without using the reference exposure which appears at the first position, focusing only on the monotonic part of the image set and considering the middle exposition as an outlier.
A check for a non coherent case has been added to detect that the total number of LDR images used for building the HDR images is not higher than the original number of LDR images.

Features list

Implementation remarks

@demoulinv demoulinv added this to the 3.3.0 milestone Feb 17, 2025
for (int idref = 1; idref < monotonics.size(); ++idref)
// In some cases (some Nikon cameras for instance) the medium exposure is at the first position of the ldr images group.
// Check that case and try to insert the resulting luminanceInfos seen as outliers at the mid index in the correponding groups.
if ((luminanceInfos.size() - monotonics.size() * monotonics[0].size() >= monotonics.size()) && // at least as many remaining outliers as groups
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

monotonics[0].size() <--> bestBracketCount ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same think because above in the code, all groups with different size from bestBracketCount are removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants