Adjusting Black Level Correction

I am trying to come to an understanding of “black level correction” in the darktable exposure module.

In my research, I found the instruction many times to “set it to 1.0”. That doesn’t make any sense at all to me.

The darktable manual says, “Adjust the black level point to unclip negative RGB values.” When I do that, the image becomes very washed out. When I use subsequent modules to make the image look good, I find that the black areas are back to being clipped, so I’m not sure I have accomplished anything.

I think I misunderstand at a fundamental level, so to speak.

1 Like

Hi Tim,

I’m not a darktable power user by any means, just a guy who refreshes the YouTube app a few times a day to see if a new Boris video has landed. So let me preface this by saying my contribution may be of limited value.

I typically use the Exposure module to set the midtones only. This usually results in either crushed blacks or blown out highlights. Suffice to say in most cases the tonal range is lacking. I then use Tone Equaliser to get the blacks where I want them (and also the highlights). I’ll occasionally use the perceptual brilliance sliders in Colour Balance RGB to fine tune the deepest blacks and brightest whites.

I must confess (somewhat unhelpfully) that I don’t really know what the typical use case for the black level correction slider is. I’ve found that the above steps work for me and get me to where I want my image to be. Apologies if this doesn’t really answer your question.

1 Like

For a fundamental understanding of black level “correction” may I recommend reading this a time or two:

If dt does it differently, I can not help, others here can.

1 Like

In a synthetic image of a gray ramp from 0-255 setting it to 1 will make that all black roughly I believe and is essentially equivalent to dragging the black point in the tone curve all the way over… Setting it to 0.5 or dragging the tone curve to 128 will give about the same as well…so its a black offset as I see it…also the global luminance seems to do roughly the same as well in the 4-way tab of rgb cb module…

And dragging up the black level in levels give you something similar as well…

I have memories of AP saying it should be set to -0.0002 to avoid getting negative numbers for blacks which can cause problems further down the pipeline. I personally leave this slider alone and I don’t understand any advantage of playing with it, but that probably is just my ignorance.

The screen shot below is the default exposure module setting, but if you make a second instance the black level correction for that instance is 0.000

2 Likes

One also need to reed the Note following that what you quoted from the manual about black level correction:

" Note: Do not use the black level correction to add more density in blacks as this can clip near-black colors out of gamut by generating negative RGB values. This can cause problems with some modules later in the pixelpipe. Instead, use a tone mapping curve to add density to the blacks. For example, you can use the relative black exposure slider on the scene tab of the filmic rgb module, or establish a deeper toe in the base curve module."

1 Like

Yes, that is not how I use it. Here is the one image where I have seen an advantage to using black level correction. Without it (i.e., leaving it at default), the right side bird’s tail feathers are crushed to the darkest black. But, setting it to -0.008 makes them visible with a range of tones:


SA700805_02.ARW.xmp (10.4 KB)

1 Like

Nice picture, Tim!

Which tone mapper do you use?
What about putting the raw file in a PlayRaw?

I noticed that you had the global luminance going the other way so you were sort of fighting yourself…it may be why you had to make that tweak…also some small tweaks to filmic could improve that as well…the white feathers were a little blown and you could relax that shadow a bit but all that aside… you moved black one way with one control and the other with the exposure… if I got your xmp right…

1 Like

I once made this note from AP:

“If we’re down to the maximum allowed of -14 EV, we are blocked to adjust further below, but it’s then possible to make a technical adjustment with the black level correction in Exposure module which will help increase the general black point. Try to stay away from this black point adjustment – only use in case of emergency – as it has the potential to wrack up the hole colorimetry system of dt.”

1 Like

I seem to recall AP saying black level correction was a non linear adjustment, thus best avoided if possible. It’s main purpose seems to be to avoid clipped or negative values.

I typically leave it at defaults, but if I check it at all, it’s like this. If I decrease exposure, I may need to brighten black level correction to ensure there is no clipping. If I increase exposure there may be some room to darken black level correction for deeper tonal range (though that can also be done with other modules like tone eq).

Whichever way I use it, it’s always with clipping indicators on.

1 Like

Does leaving the “clip negative RGB” box in Color Calibration protect from this nonetheless? I couldn’t break it (create negative values, at least as per the color picker) unless I unchecked the box and turned Filmic off. There may be some settings you can change elsewhere to make it easier, but I think you would have to be determined to screw things up.

I think the only thing is that this comes a bit later in the pipeline after the input profile so I guess you could generate them prior to the clipping there but again to what extent…

Where did you find it? I’ve never seen anything to that effect, and the scene-referred default is -0.0002. The commit that set that value had the comment “raise black level to anchor it to -12 EV and avoid filmic clipping”. So, I think it’s about input to some modules (like filmic), not about clipping in the processed output.

2 Likes

I use the FilmicRGB tone mapper.

I got the raw from someone else’s Play Raw topic. I will try to find it and update this post with a link to it.

Later: Cormorants in their courtship plumage

Yes. I tweaked things until I got the look I wanted. I probably fight against myself a lot. :wink:

2 Likes

I found that advice multiple times by running a search in this forum on the term “black level correction”.

I feel like also in some converstation this was to help filmic…if you use the autopicker for black it is still prone to be a bit wild at times but I think this was a small tweak to assist the mapping with relative black in filmic… maybe I am wrong…

If you look here the suggestion was made to try to force the whole image to black so that an observation about color picker values could be evaluated. I don’t think it was ever a suggested setting or it may have been a typo if you saw it somewhere else??

1 Like

Ok, that makes more sense. Thanks.

1 Like