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

Highlights raster mask #16575

Merged
merged 1 commit into from
Apr 7, 2024

Conversation

jenshannoschwalm
Copy link
Collaborator

Adding support for the problem "What can we do with remaining color casts?".

Instead of

  1. trying to improve the algorithms of highlights "reconstruction" in raw space (tried to do some manually controlled color bias and a few more)
  2. offer some data about applied corrections as we do for details, that would enlarge the blending gui even further
  3. offer some sort of parametric mask for raw space modules (that would be something completely new)

This PR offers a simple raster mask generation of the highlights module. It works for all internal algorithms that increase clipped photosite channels like opposed, segmentation based or laplacian. Respects the used mask in HLR module and modifies it.

To check:

  1. Add a uniform mask to highlights
  2. As a simple example use that raster mask in "color equalizer" or "color balance rgb" to reduce saturation
  3. watch the provided mask via the module mask button in 2)

@jenshannoschwalm jenshannoschwalm added feature: new new features to add scope: image processing correcting pixels labels Apr 5, 2024
@TurboGit TurboGit added this to the 4.8 milestone Apr 6, 2024
@TurboGit TurboGit added priority: low core features work as expected, only secondary/optional features don't documentation-pending a documentation work is required release notes: pending labels Apr 6, 2024
@jenshannoschwalm jenshannoschwalm added the bug: wip someone is currently working on that, check with them before taking over label Apr 6, 2024
Copy link
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

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

Tested and working on my side, a minor improvement proposed. TIA.

src/develop/blend.c Outdated Show resolved Hide resolved
Make highlight "reconstruction" data available as a raster mask to be used at other parts
of the pipeline.

The mask used in highlight module - uniform or drawn - is modified by the process ratio of
output and input data of that module.

Works with all hightlights algorithms.

Mask is gaussian-blurred for less noise.
@jenshannoschwalm
Copy link
Collaborator Author

fixes as requested, squashed and force-pushed.

Comments: masking in pre-demosaic modules is broken for non-raws atm. Was also in master, will fix in another PR.

Copy link
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

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

Thanks!

@TurboGit TurboGit merged commit 98af893 into darktable-org:master Apr 7, 2024
6 checks passed
@TurboGit
Copy link
Member

TurboGit commented Apr 7, 2024

Comments: masking in pre-demosaic modules is broken for non-raws atm. Was also in master, will fix in another PR.

Ah, didn't notice that. Is that since a long time?

@jenshannoschwalm
Copy link
Collaborator Author

I simply don't know. I think we oversaw the colorspace default in one of the earlier modules in the pipe. Likely there was simply noone using masks in those modules on sraws. I just stumbled across this by chance.

@jenshannoschwalm jenshannoschwalm deleted the highlights_raster branch April 8, 2024 04:21
@jenshannoschwalm
Copy link
Collaborator Author

Reproducer: use an sraw file, define any mask in highlights, use -d pipe. Module csp is RAW for all modules early in the pipe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: wip someone is currently working on that, check with them before taking over documentation-pending a documentation work is required feature: new new features to add priority: low core features work as expected, only secondary/optional features don't scope: image processing correcting pixels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants