Based on @heckflosse idea, @hannoschwalm has implemented a new masking option that is hard to beat!
Soon in new darktable version 3.6 we will have an additional option to refine the mask by targeting the areas with higher or lower detail density and strength.
When this new slider appeared today and I started playing with it, I almost fell out of my chair!
There are now countless uses that are now open with this option.
I will not go into detail here, but after an hour of playing, just touch on the surface, what I came up with what you can achieve with it.
Strengthen depth of field.
Lowering coarse part of local contrast on low contrast area with contrast equalizer.
Masked areas with low details:
before:
after:
Sharpen
Boost local contrast only on the already detailed areas with high frequency details. Also with contrast equalizer.
Masked only high frequency details:
before:
after:
This is an excellent way to sharpen only what should actually be sharpened.
Local contrast boost on the areas that look very flat. These are often house walls, snow, sky, etc.
Masked areas with very low details:
before:
after:
Reverse to sharpening, this way you avoid increasing the local contrast in the areas that already have a strong local contrast.
Soft focus
Especially in landscape shots and portraits, one often struggles with too strong, rough textures in the photo.
With the detail mask you now have a nice way to weaken the areas with strong textures a bit by lowering the local contrast in these areas.
The areas with strong texture are masked here:
before:
after:
Here is another example with soft focus:
I can think of a lot of other applications (portraits etc.) but to raise curiosity, this should be enough for now.
In any case, great work @hannoschwalm, @heckflosse and all the others involved!
Thanks a lot for that!