You stretch the contrast of the mask to have mid-tones at like -6 or -8 EV, then you manipulate the the right-hand part of the chart, which now actually covers the upper range of brightness. The mask’s contrast can be very different from that of the image.
Yes, I know all this, but I’m saying there’s no precise way of entering values to work on a specific range. It gets fiddly depending on the image to get the exposure comp and contrast comp exactly how you want it.
I don’t want to beat a dead horse, and we’re veering off-topic here. But thanks everyone for their input.
I thought that’s what the egif is for? It finds the edges well in my use.
I find it does an excellent job on the whole image, and especially brighter images, yes. But what I have in my head, on my wishlist, is a something like a picker to sample the darkest tone and brightest tone, so it automagically spreads that range across the nodes of the Tone EQ.
For example, say you have a picture of a white-sand beach. Beaches tend to have little hollows and peaks on them, a bit like waves. With a photo taken in certain conditions, the EV values of the hollows and the peaks might be very close. So if I want to increase contrast on that beach, I might be looking at a very narrow EV range. By messing with the Exp comp and contrast comp sliders, you can sometimes get to where you want, but it’s not always easy. What I think would be cool is to grab a picker and sample the hollows, then sample the peaks, and you would just have this narrow EV range spread across your nodes. Then you can manipulate the contrast in this range.
Ultimately the Tone EQ might not be the best tool for this.
In Color Balance RGB, you could sample a tone between the darkest hollow and brightest peak as your fulcrum, then adjust the contrast slider. But this usually requires some parametric masking to ensure the brightest and darkest parts don’t clip.
I don’t know if I’m making myself clear, and I want to emphasize that this is not a big problem of mine. I usually find a way to do what I want. But I usually find that there’s quite a bit of fiddling with masks - whether that’s the EIGF in Tone EQ or parametric masks in other modules.
There are lots of tools, so we’re kind of spoiled for choice really. In fact, the old Shadows and Highlights tool is very easy to use, and by decreasing the highlights while increasing the white point, you can do exactly what I was saying about the beach. It’s just not the best module for scene-referred editing…
I use color balance for this, particularly the offset luminance for the black point, and gain luminance for the white point. This gives you an arbitrary and easily controllable stretch of the histogram, without any masking and their associated artifacts.
I am not sure that is very useful in practice. Practically, any image with darker areas will have some pixels close to the black level just because of noise, and conversely, specular highlights will give you some pixels which are clipped white. We can of course winsorize but even then some judgement may be required.
Noise effects can be largely eliminated by sampling an area, not just one pixel.
A more important problem in my view is that when you correct a sharply delimited tonal range, you have to be very careful at the edges of that range, to avoid inversions of the tone gradient over those edges. E.g.: darkening a selected gray area on a darker gray background: go too far, and your selected area becomes darker than the background… And “increasing contrast” means that you darken the dark tones, and brighten the bright tones.
So you either use a mask with feathered edges (making the tonal selection less “sharp”, but that only diminshes the problem) or you keep the tonalities at the edges fixed. But that means that contrast near those edges is changed in the opposite direction from your main contrast change (cf. filmic/sigmoid: more contrast in the mid tones means less contrast in shadows and highlights).
This issue is one of the reasons tone equaliser uses a such a blurry mask by default (another is that that helps keeping local contrast).
In the case of that beach, wouldn’t it be better to select the area of interest with a mask and add local contrast?
We are getting rather far away of the original topic, though
Hello. Sorry for digging out this old thread.
What does this sentence mean, please?
- what are midtones? The thing in the world that was not the darkest and not the brightest within my viewfinder when I pressed the shutter? Or the thing that happened to land halfway on the histogram in the resulting image? Or something else still?
- where should they be? Halfway on the histogram? Wherever they look good?
Thank you as always
“midtones” is the tonal range of the object you don’t want to be affected later by tonemapping bringing them towards white or black. It’s the linear part of a sigmoidal curve.
that’s not necessarily halfway of the histogram - it’s related to the content of the image; usually your object of interest.
e.g. for a headshot: change exposure so the skin brightness looks ok. That’s not something mathematical, thats just your idea of the result …
I understand the sentence that way, that exposure of the image should ensure that the middle-gray of the image is already set properly at the mid-tone gray. Technically, mid-tone is the gray point of 18% reflectance or the 50% of lightness.
When using the darktable elegant-grey theme, the gray color of the border surrounding the image is 18% gray if I’m not wrong. To adjust exposure (i.e. that the mid-tones of the current image match the 18% gray), I deactivate the tone-mapper (filmic, sigmoid, AgX or base curve if using display referred workflow) and adjust the exposure of the tone that I see being the mid-tones to this gray border, simply by trusting my eyeballs.
Because all modules assume a correct exposed image, i.e. the mid-tones of the image being at this 18% / 50% point, this is a somehow crucial step while developing your pictures. I hope that this answers your question.
I personally have a very loose definition of midtones. A typical image for me has shadows with details and highlights with details. The inbetween stuff is the midtones. So I don’t want to place my midtones to the extreme left or right of the histogram if looking at that as shadows or highlights respectively belong there.
I personally find the RGB parade one of the more informative scopes to judge the placement of highlight, midtones and shadows. This image lacks true highlights but has a shadow region under the ray. The rest of the picture is midtones and therefore the bulk of this image.
Thank you all for replying.
At the risk of straining your patience: what do you see as mid tones? How do you decide what these midtones are? In other words, for me the definition “mid tones are what I see as mid tones” is not super transferable from one person to another ![]()
Thank you for this example. This is very helpful.
Are the midtones in this image a bit too dark then? I think they look to be a bit below the reference 18/50% - or am I mistaken?
All good
seems as if I wasn’t able to clearly transport what I mean.
I mostly follow somehow the same loose approach as @Terry. When I look at a picture, there will be parts that make up the “middle of the lightness”, like in the example in his post above.
I will compare this region of the picture (or part of the scenery I want to put to midtone level) to the gray surrounding border in darkroom view and simply adjust exposure to my perception of lightness. I.e. it doesn’t matter to me, if the region I judge is gray or colored, I simply adjust to what I feel has the same level of lightness, compared to the gray border.
This adjustment serves as “the foundation” for further editing my image. I usually have my camera set up in such a way that I achieve a good midtone range in terms of exposure. Therefore, I don’t have to adjust the exposure value all that often in my workflow…
As others have said, mid grey is at the middle of the Lab (L=50%) histogram, or 18% reflected light, which we perceive as “somewhere in the middle between black and a sheet of very white paper or snow”.
In darktable, sigmoid and the defaults of both filmic rgb and AgX keep this value unchanged. See Middle gray - Wikipedia.
But don’t take this very seriously. Mid tones are a wider range. Set exposure so that your main subject looks “just right”. The tone mappers are rather flat in the middle.
AgX off (top) and on (bottom):
filmic rgb:
sigmoid:
Numerically: with the defaults, sigmoid maps (rounded values, from my screen):
| L in | L out |
|---|---|
| 3 | 0.63 |
| 13.2 | 4.66 |
| 24 | 16.3 |
| 34 | 29.3 |
| 43.6 | 42 |
| 53.2 | 53.8 |
| 62.1 | 63.3 |
| 70.7 | 71 |
| 79 | 77 |
| 87.4 | 81.8 |
| 95.5 | 85.5 |
So you can see that unless something is quite dark or quite bright, so it’s a “mid tone” (not only L=50), tone mappers don’t do much with it. They compress highlights and shadows.
There is an icon (the light bulb) that will open a frame of white and gray around your image irrespective of the theme…this is the color assessment function…it works best when you zoom out to look at the over all image…
I actually don’t use it that often, and here is the thing (at least for me), you are developing the raw data. It has not been tone mapped as the jpg has so you have a lot of freedom with editing the dynamic range and there is no one right way…
I don’t trust myself often out of the gate so I will take the approach to just do the 50% exposure autopicker at first without the tone mapper. This uses the whole image so depending on the relative amound of tone in each zone it can be a perfect start or it might be biased… I then repeat on an area that I want exposed well and I consider to be my subject. This often can make that area look really nice but it might drive some highlights in to looking blown so then I will enable the tonemapper and work to manage things…
Other times for effect or artistic reasons you crush things, blow things out, have lots of contrast in your midtones or perhaps they are flat and diffuse for effect…
With the scene referred workflow and a raw file I think its fine to work with your eyes to get the image to where you want it rather than to try to craft it within some “technically” correct framework…
Kofa, great post. This should be a blog in my opinion. It’s amazing how many folks in Pixls.us get this concept all wrong (eg. turn off the tone mapper).
I think this the best advice. Personally, I cannot tell which part of an image has “mid grey brightness”, so the rather technical suggestion to set exposure such that the main subject is at mid grey doesn’t really work for me. Instead, I simply adjust exposure (with tone mapper turned on) until it looks right to me.
But these samples demonstrate why I don’t like the tone mappers. It shows all of them are making the blacks blacker, but the whites grayer. They show exactly why I have often said that applying any of the tone mappers “takes the life out” of the photo.
I don’t think turning off the tone mapper on an image that does not require it is wrong (no bright highlights, like a foggy landscape or similar).
My input was already limited to 0…1 (it was a simple black to white ramp). If you have something brighter than diffuse white (values > 1), you either have to live with the clipping, or compress it somehow. Plus, manage colour shift/desaturation, if you want. Tone mappers also deal with the latter; if you compress highlights e.g. with tone equalizer or with one of @Christian-B’s solutions, you are also mapping tones, but use a different tool, potentially one that also has detail preservation. Tone mapping means distributing the input range over the available output range.
Here’s AgX with the same ramp at +2 EV (so the white point is about 4.5 EV above mid-grey), including darktable’s color assessment white frame:
And it is also possible to lift the darker mid tones:





