Where would Tone Equalizer fit in my (scene-referred) workflow for B&W conversion?

I’m more than satisfied, and would even say I’m delighted, with darktable 4.2 used in scene-referred mode for conversion of images to B&W.

In this posting I describe my “workflow” for said conversion following which I have a couple questions to help me “graduate” to the next level.

My workflow:

  1. Denoise
  2. Lens Correction
  3. Exposure: a) Bump up 1.2-1.5EV; b) Adjust black level correction (if necessary)
  4. Color Calibration: a) Under Brightness, adjust (Input) R, G, B. Note to myself: simply put, moving a slider to left darkens, and to right lightens, the (input) color in final output gray scale. I like matrices and found the information in the manual helpful. b) Under Gray, move Slider for R to right. Note to myself: Move enough to get full histogram, with no clipping.
  5. Color Balance RGB: a) Under Perceptual Brilliance Grading: as appropriate increase global brilliance, shadows, mid-tones, and highlights. Note to myself: in adjusting highlights confirm the full histogram visible with no clipping.
  6. Sigmoid: a) Turn on/off and see if you need it. Some images don’t seem to benefit from it; others do. b) If you need it, turn it on and adjust contrast and skew until image and histogram seem good.
  7. Local Contrast: a) Turn on and adjust shadows, highlights, mid-tone, and (if necessary) details.
  8. Go back to Exposure: a) Adjust exposure until image seems right. Note to myself: I can’t explain (yet) why but increasing exposure a bit makes the processed image “brighter”.
    Converting an image used to take me 30 minutes or more and the final result was poor. I didn’t know what I was doing. With your help and darktable 4.2, I’ve learned a lot and come a long way. Now it takes 7-10 minutes (these are portraits, mostly good to go straight out of the camera) reflecting how good darktable is and the help I got from this forum.

My questions for you:

  1. What am I doing wrong (or right)? Where would a change you recommend improve my processing/conversion skills?
  2. I like to dodge/burn. Where in the above sequence would I fit the Tone Equalizer module?
1 Like

Glad you’re happy with dt! :slightly_smiling_face:
Your workflow looks good to me.
Here’s a few thoughts, which are just my opinion, so take it with a pinch of salt :wink:

Personally, I would swap the order of color bal rgb and sigmoid (in your workflow I mean, not the module order).
I don’t know if it matters really, but as I understand it the color bal rgb brilliance sliders are mostly intended for small adjustments, which probably what you’re doing anyway.
I prefer to do larger contrast adjustments in sigmoid, then fine tune with color bal rgb.
Again, this is just me so…

Great. I’m sure you know this already, but if using sigmoid, you should have filmic turned off. (although if the effect was good you could use both - it’s just not how it’s meant to work :wink:)

This is logical actually - the exposure slider is designed to mimic the effect that you’d get by using exposure compensation in camera, i.e. a slower shutter speed, or wider lens aperture. Both letting more light reach the sensor, so the image is brighter! The slider in dt does the same.

First, I might just mention that adjustments in tone EQ affect all areas in the image, of a certain brightness (that you adjust).

So with a single instance of tone eq, you can’t, for example lighten one bit of a dark background and lighten another bit that was the same lightness to start with… but as long you do want affect the whole image globally, it’s great.
You can always use more than one instance with masks if you want to be more specific. Actually, for dodging and burning, you can also use additional masked exposure modules. Sorry, I’m going off topic!
I would probably look at tone EQ after sigmoid… but I believe it’s mostly up to you, and how you prefer to do it.
Great job!

1 Like

Yes, I’ve turned off Filmic as I’m using Sigmoid in my workflow (when I need it, that is).

Yes, I’m familiar with the Tone Eq controls and impact on image areas of certain brightness. I just didn’t know where to fit it in the sequence.

Steven’s response, gratifying as it is to hear I’m on the right path, prompts two Qs:

a)So far I’ve approached my processing strictly bottom to top. In my pixel pipe Color RGB appears lower than Sigmoid. So I used Color RGB before Sigmoid. I understand it’s OK to use Sigmoid first (for bigger adjustments) and then jump down the pipe to Color RGB (for fine tuning). Is there a material difference between one way or the other?

b) In my pixel pipe Tone Eq appears just above Exposure, near the bottom. Sigmoid is almost at the very top. I guess the answer to (a) above would also apply to Tone Eq. i.e., after working my way up the pipe I can (as I do with Exposure) come back to Tone Eq for final touch. Please correct me if I misunderstood.

1 Like

Not as I understand it, in terms of the pipeline and so on. It might give a different effect to the image, and your approach is absolutely valid too!

Yep! that’s absolutely fine.

I suggest you watch the 3 part series done by Boris on his editing moments in DT channel on doing BW coversions
. Lots of examples of using the tone eq and other modules and manipulating module order

1 Like

Yes, Todd, I watched Boris’s videos.
Frankly I was premature in trying to use them as I had not fully grasped the pixel pipe, order of modules, what feeds into another, etc. So, I tried to emulate Boris’s use of new instances of Color Calibration and moving them above other modules etc. The results were poor as I was trying to run–by watching an Olympic athlete–before I could walk.
I think it’d take me more time with DT before I can absorb the full value of what Boris does and is communicating.

1 Like

It does take some time but I am sure you will end up with a medal :slight_smile:

1 Like

Be very careful with that black level! There’s a reason it’s set to a small negative value by default. That adjustment works by subtracting the provided value from all pixels; therefore, it can lead to negative RGB coordinates. The recommended way is to use other controls (like the black level of filmic, tone curves and so on).
Use exposure to get the mid-tones right; don’t worry too much about the others: those will be taken care of using the different tone mapping modules.

So, for color calibration and color balance RGB: don’t worry too much about the histogram.

Brilliance grading: first, go to the masks tab, and auto-pick the white. Although the documentation says it’s only used on the 4 ways tab (darktable 4.2 user manual - color balance rgb), Aurélien (the developer of the module) said it is not the case; also, according to him it is a UI bug that one can set values higher than 20%, and one must never exceed that value for highlights, as the maths fall apart. Unfortunately, he used rather foul language to describe this, but if you are interested, read here: https://github.com/darktable-org/darktable/issues/12442#issuecomment-1316216724.

sigmoid and filmic are tone mappers. If your input does not cover a wide dynamic range (already fits within the screen’s DR), you don’t need them. It is also possible to tame high DR via tone equalizer alone. sigmoid and filmic are pixel-wise operations (except for the highlight blooming controls of filmic): each pixel is processed individually. Therefore, reducing global contrast (compressing the dynamic range: brightening shadows and darkening highlights) leads to reduced local contrast (neighbouring darker and brighter pixels will be made more similar). tone equalizer divides the picture into parts, and uniformly adjusts exposure for each part. Therefore, if you brighten shadows (or darken highlights), neighbouring darker and brighter pixels will change together, their difference will not change. The trade-off is haloing: how do you determine if the brighter pixel really belongs to the ‘dark’ area, or if it’s already the start of the ‘bright’ part of the image. The controls on the masking tab deal with exactly that question.

I rarely adjust exposure at the end, or only by small amounts. Why that effects brightness has already been explained. Exposure adjustment works by simple multiplication (and subtraction of the black level). The formula is simple:

out = (in - black level) * scale

The scale comes from the black level and the selected exposure:

white = 2^(-exposure)
scale = 1 / (white - black)

So, if you set black = 0.01, exposure = 1.5 EV, white is 2^(-1.5) ~= 0.3536, and scale is about 2.911. A pixel coordinate of value 0.2 will be mapped to (0.2 - 0.01) * 2.911 ~= 0.5531 (red, green and blue are multiplied separately). However, a value of 0.001 is mapped to -0.0262 - negative!


First, some context: virtually all of my pics are portraits and are well exposed esp for the mid tones. For the most part I try to get it right with the camera. I use DT to primarily convert to B&W and produce stellar B&W portraits of those pics.

The videos from Boris and others show they use Exposure to (in my words) “blow out” the image, not just get the mid-tones right. I recall either Boris and/or others explaining it in their videos as “don’t worry, we want to get everything in…and processing the other modules would correct (for the blow out)”. So I adopted that technique and it seems to work. Am I misusing Exposure? Why are the others doing that makes them go past “getting the mid-tones right”?

for color calibration and color balance RGB: don’t worry too much about the histogram.
Istvan, let me ask the “negative” question: is there a reason we should not rely on the histogram in using these modules? I find the combination of looking at the image and the histogram (and how the changes affect them) powerful, irreplaceably valuable as the histogram tells me what my eye may miss.

Quick responses:
a) I shall read up on Aurelien’s post on brilliance grading/masks;
b) yes, sigmoid (and filmic) are not as relevant for images where there’s low dynamic range (e.g., some of my portrait pics) and it explains why after using sigmoid the local contrast module was mostly moot and if sigmoid was not used, adjusting the sliders in local contrast helped;
c) yes, the Exposure adjustment at the end is very minor. Thank you for the technical explanation, Istvan.
d) time for me to check out and play with Tone Eq. For my use of DT–conversion to and production of stellar B&W portraits–Tone Eq may be invaluable.

They don’t intend to blow out the highlights; it’s just they don’t worry about blowing them out. They target the midtones. filmic and sigmoid are centred around midtones (don’t modify midtones).

If your tone mapper (filmic, sigmoid) is not turned on, then you’ll see clipping, which is corrected later. So no point in worrying about the histogram at this point.
If you have the tone mapper turned out, they map scene-referred input to 0…1 display-referred output. You cannot get tones > 1. You can get colours that are out-of-gamut for the display / output colour space, but those you’ll deal with later. At least this is my understanding.

If your tone mapper (filmic , sigmoid ) is not turned on, then you’ll see clipping (i.e., in the histograms in the Color Balance RGB), which is corrected later. So no point in worrying about the histogram at this point.

Earlier the day yesterday I used Color Balance RGB first, made sure the histogram didn’t show any clipping as I adjusted the sliders. Then I used Sigmoid.

Steven yesterday suggested trying the reverse: Sigmoid first, Color Balance RGB after.

Indeed, when I did that, I found the histogram in Color Balance RGB was less material as the Sigmoid had already compressed the range and limited chances of clipping in the former. Similarly, I found after use of Sigmoid my use of Local Contrast was largely unnecessary as the former, in globally adjusting the tone also adjusted the local contrast.
So, I now understand better what Istvan, Steven, Todd, Miguel and others said in response to my Qs. I guess I’m graduating from kindergarten, ready for elementary school, and excited about it!


If you are not using the waveform histogram give that a try. Esp for BW conversions. If you take the approach as Boris does to do some work on the color image first and to analyze the color channels then the waveform will give you a really nice summary of the data mapped to the image location whereas the std histogram is just a binned presentation of the values…

Sigmoid and filmic do not adjust (preserve) local contrast.

This is how I usually use tone equalizer. Note that this is the complete editing history of a recent image of mine:

Until #11, it’s the workflow defaults, including filmic. I automatically apply lens correction via a preset, that’s #12, and my starting point.
I was reasonably happy with the exposure, but found that there were no details in the dark parts, that’s why I turned on tone equalizer to bring back some detail there.

I then turned on denoise (profiled) and adjusted rotate and perspective.

I then adjusted filmic, but probably did not like the outcome, as I backed out the change; however, the entry is still there in the history. I then tweaked tone eq again:

A comparison of the middle part between #15 and #17:

I then auto-tuned filmic in #18 (something I always try), but it produced artefacts, which I did not realise until later:

Then I cropped the image, and tried how it’d look with sigmoid.

In 23-24, I turned off sigmoid and turned filmic back on. That was when I noticed the artefact, so in #25 I lowered the white point in filmic (there were no details in the lamp to preserve, so I could just let it be my white point).

#26 - 29 were a back-and-forth between sigmoid and filmic, until I remembered we had a snapshot feature. :blush:

#30 was local contrast with the defaults, which basically finished the edit.

In #31 I enabled color balance rgb with the basic colorfulness: vibrant colors preset, but then decided against it and turned it off.

I don’t know what I did in #32 with color calibration. There seems to be no change.

In #33 I added another color calibration instance to try a few BW conversions, but then decided it was a festival of colourful lights, so I should keep the colours. Plus, I’m afraid of doing ‘art with a capital F’, as my English teacher once said.

Then I noticed a distracting bright spot on the left and cropped it out.

Unless I’m grossly mistaken, aren’t
reducing global contrast (compressing the dynamic range: brightening shadows and darkening highlights) leads to reduced local contrast (neighbouring darker and brighter pixels will be made more similar) and Sigmoid and filmic do not adjust (preserve) local contrast contrary?

I agree, Sigmoid/filmic don’t adjust local contrast. Their focus is global contrast. However, using Sigmoid, I find, requires minimal to no work on Local Contrast. Not using Sigmoid, for same image under similar circumstances, allows for more influence/effect through Local Contrast sliders.

Yes, the waveform histogram helps a lot more than the standard histogram in Color Calibration before converting to gray scale.

Istvan, I appreciate your detailed workflow and explanation of the steps involved in your use of the Tone EQ. I shall get to absorbing and using that information soon.

filmic and sigmoid reduce (compress) global contrast (from scene to display range). Being pixel-wise operations, they also reduce local contrast.
Let’s revisit our grey ramp:

Top: sigmoid, bottom: original.

Let’s supposed that those tones come from a photo that I intentionally underexposed to preserve the highlights (not clip them). This would mean that scene mid-tones are shifted to one of the darker shades; let’s pick the 3rd from the left. I’ll add exposure to bring it to L = 50. Without sigmoid:
I needed just over 2.2 EV:

Check the output of sigmoid, and how the contrast was compressed in the highlights. Check out the rgb parade on the top right – the continuous curves represent the gradient, the horizontal lines the steps in the middle:

Using tone equalizer will produce a very different image:

You’ll see that inside the steps, sigmoid kept the constant brightness (the lines in the parade are horizontal), while tone eq did not; however, it maintained contrast in highlights and shadows. Of course, tone EQ did not do well on this synthetic image.

Here’s a photo, which I did not develop, just grabbed it to demonstrate stuff.
Check the sails. Without tone mapping, they are blown:



tone eq:

Tone EQ handled the whole sail as the same, and applied the same darkening to all pixels. The other two darkened the brightest pixels most, and the less bright ones not so much.
Left: filmic, right: tone EQ:

Compare Tone EQ with simply reducing exposure - left: tone EQ, right: exposure:
The effect on the sail is very similar (since tone EQ applied very similar exposure adjustments to all pixels of the sail). You can see that on the water, on the background tone EQ applied a different adjustment, while exposure, of course, applied the same.

1 Like

I might add that on an image with a very low dynamic range from the camera, filmic or sigmoid can actually be used to stretch the image, and increase the contrast.
Happens less often maybe, but I thought it was a common enough case to point out. :slightly_smiling_face:

Edit. I also find that with sigmoid, I use local contrast less often than I did with filmic. I haven’t quite worked out why!

Two points to remember perhaps:

  • filmic (and I think sigmoid) were designed to lower the contrast in shadows and highlights to mimic the behaviour of silver halide film. So with those modules, you set the input range and midtone contrast, what happens at the extremes follows from that (with a few more controls to tune the roll-off).

  • If you want to diminish the roll-off effect, you can lower the contrast in filmic/sigmoid and add local contrast with another module (“diffuse or sharpen”, though that can be slow, or “local contrast”).

@meaningfullyhappy you can highlight some text in a post, then the “quote” button should appear. That’ll give you a quoted reply, instead of copying and pasting italic text.

After reading, digesting the many comments, suggestions, do’s and don’ts, and watching Boris’s B&W (portrait) conversion video/tutorials again, I realized in essence there was a simpler way to achieve what I intended to do: convert a color image to B&W. [I’m sure there are other ways too]

Here’s my “simplified yet powerful” workflow (which surely can be improved…but that’s part of the learning and evolution…)

My workflow:

Set Scope to Waveform and monitor it for Steps 2 onward to insure no clipping (unless you want that).

Prep/fix the image.

  1. Denoise, Lens Correction.
  2. Exposure: Bump up. Note to myself: no need to “blow out” image by over-exposing; for portraits, get everything you want visible and exposed.
  1. Color Bal RGB: Bump up Vibrance and Chroma. Note to myself: adjusting colors (and channels) enables a better final B&W.
    Now, convert to B&W.
  2. Create new instance of Color Calibration. Move it above Color Bal RGB. That way, the adjustments to Vibrance and Chroma flow into this instance. In this new instance of Color Calibratioun: a) Under Gray, move Sliders (for R, G, B) to right. Note to myself: You’d need a mix of them, some more than others, some absent sometimes. For portraits, watch/get skin tone right. Should you need to darken or lighten a certain color, adjust under Brightness tab.
  3. Sigmoid: a) Turn on/off and see if you need it. Some images don’t seem to benefit from it; others do. b) If you need it, turn it on and adjust contrast and skew until image and waveform look good. Sigmoid indeed stretches the image (for portraits, the mid tone).
  4. Go back to Color Balance RGB: a) Under Perceptual Brilliance Grading: as appropriate increase global brilliance, shadows, mid-tones, and highlights.
  1. Local Contrast: a) Turn on and adjust details, shadows, highlights, mid-tone. For reasons beyond me, if I used Sigmoid earlier I find my use of Local Contrast coming down to merely adjusting Details (which seems to pop the image some).
  2. Go back to Exposure: a) micro-adjust exposure if necessary.

I’m able to convert good pics to good B&W in under 5-7 minutes per image. I believe I can do that because: a) the images are portraits; b) most if not all of the pics are good to go straight out of the camera; c) I’m not claiming my conversion is Pro-Grade; d) the workflow/pixel pipe/modules in darktable make good sense (after the initial and somewhat significant, even daunting, hump to get started); e) the feedback, comments in this forum are invaluable and helpful.