Tone equalizer - cannot get the darkest part of the image the darkest part on the mask

Hello All,

I shot this picture earlier in the evening: http://tech.kovacs-telekes.org/files/darktable-tone-eq-2020-07-01/P1030720.RW2
I run darktable built from master, b581242ac.
The darkest part of the image is the far end of the yard, under the shadows.
In tone equalizer no matter how I tweak the masking, the mask does not get much darker than the much lighter top left corner, the underside of the foliage (depending on the settings, both come in at around -7 to -8 EV, despite the fact that by eye the deep shadows are much darker, and a colour picker gives a mean of 24,30,29 for the shades, but 40, 46, 23 for the underside of the leaves.

How would you go about masking this? Which parameter is key? The best I was able to get was around -7.2 for the leaves and -7.8 for the shade.

Thanks,
Kofa

In “masking” tab, adjust “mask exposure compensation” and “mask contrast compensation”, using the color picker if you don’t want to bother, or manually, to center and stretch the histogram as you need.

Keep in mind that the masking doesn’t need to reflect accurately the image exposure, in terms of values, it is only a trick to split the image into contiguous exposure regions to later assign specific exposure corrections to different regions. If you are not happy with the splitting, you can use other luminance estimators (again, in “masking” tab). Changing the luminance estimator will probably require to update mask exposure and contrast compensations.

If you need to isolate more accurately some details, you may need to refine the feathering diameter and the edges (always in masking tab).

Aurélien,

Thanks for the answer. I’m familiar with the module, use it quite often. My problem here was that I would have wanted to lift those deep shadows a bit more, but since in the mask they were not the darkest parts of the image, I ended up also lifting brighter parts as well (which had ended up with the same tonality in the mask). I’ve tried switching estimators and changing the blurring params as well. The colour picker’s ‘mean’ method (maybe a naïve approach) gives this (with no filmic or other curve, only demosaic, lens correction, WB etc. applied, plus exposure to compensate for the negative EV dialled into the camera).

No matter how I tweak the mask, usually the bottom left corner ends up darkest, with the deep shadow and the foliage coming in as 2nd and 3rd (in one order or the other, but usually within 0.5 EV of each-other), and the shadow under the building in mid-right being the brightest of them on the mask. Based on the picker, the order should be deep shadows, bottom-left (I don’t actually care about this area, actually), foliage, building shadow.

Obviously, it’s not an important shot, I was just wondering if there was a way to adjust the mask to agree with my eyes. :slight_smile:

Kofa

You can try using another setting for “preserve details”, either “no” or “average guided filter”. The default “guided filter” applies a very strong blur, so a large rather dark in the image can end up being darker than a small very dark area next to a bright area. So you can either lower the blur or use another method for “preserve details” (the differences are very visible when you show the mask).

And if nothing else works, you can of course use masks to protect parts of the image you don’t want to change

Tone equalizer behaves better for “natural” shapes, when you have smooth gradients. In this case, since you have artificial shapes with hard edges, it will be easier to use exposure module instances with drawn masks directly.

1 Like

Yep, thanks. I’m aware of the blur allowing ‘light to leak in’ from neighbouring bright areas. As explained by AP in his videos, the tone EQ is a means to create masks automatically, and apply adjustments that one could also do by using several instances of the exposure module. I was just hoping to find a setting for the edge detection that would separate the sunlit yard from the deep shadows better.

Also there is an algorithmic issue with the guided filter that blurs more heavily shadows than highlights. Still need to fix that.

Thanks, all.