Thoughts on contrast


Posting rules: It shouldn't need saying, but... play nice. Please keep your discussions civil. You can disagree, just don't be disagreeable. And, of course, all of the usual stuff like no spamming. Tex adds: I'll be rigorously enforcing this as we go along. We're probably going to be a small community in a little lifeboat, so we can't have members at each others' throats. This is for the sake of the project as a whole. So when you post, pretend you're speaking in person with your very wealthy auntie who has always treated you wonderfully and currently lists you prominently in her will. I won't be tossing anyone out of the forums because we are all in this together (except spammers: immediate membership cancelation), but I'll delete suspect posts right away.


12 posts / 0 new
Last post
Doug
Thoughts on contrast

For many of us, the word "contrast" has a simple meaning. In fact, though, there are many different ways that contrast manifests itself in an image. LightZone provides tools to work with those different kinds of contrast, so it's useful to understand these contrast types.

 

Global Contrast (Tonal Range, Dynamic Range)

This is the range between the brightest and darkest pixels in an image. LightZone doesn't have a Contrast control in the same way that most software does. The most straightforward tool for working with global contrast probably is the ZoneMapper. The maximum value (brightest pixels) can also be adjusted with the Highlights slider of the Detail tool, and with the Luminosity slider of the Hue/Saturation tool. If you're working with a Raw file, there's also the Exposure slider of the RAW Adjustments tool.

A more subtle approach to increasing global contrast than ZoneMapper can be found with some of the blend modes. Bear in mind, however, that the blend modes operate on the R/G/B channels separately, so some color shifting might occur. Those color shifts are usually so subtle as to be of no consequence. Obviously, this isn't a problem with B&W images. From the least powerful to the most powerful global-contrast-enhancing blend modes, with very rough approximations of their effect:

  • Color Dodge — 1.4x contrast (lighter) in midtones and highlights, slightly more on the brighter end, brightest 1 stop blown out
  • Soft Burn — 1.5x contrast (darker) in midtones, especially the brighter midtones
  • Soft Dodge — 1.5x contrast (darker) in midtones, especially the brighter midtones
  • Soft Light — 1.8x contrast (darker) except in brightest 1 stop
  • Overlay — 2.0x contrast (darker) except in brightest 1 stop
  • Multiply — 2.0x contrast (darker)
  • Color Burn — 10-15x contrast (darker) except in brightest 1/2 stop, shadows and midtones become black, major color shifts

Multiply is the mathematically cleanest approach. All of the other blend modes listed above affect the brightest stop differently, Color Dodge blowing it out and the rest giving a roll-off with reduced highlight detail that may or may not be desirable, and introducing the possibility of color shifts.

Color Dodge is the only one of these blend modes that increases contrast by lightening the image. Caution for blowing out highlights — anything in the brightest 1 stop will become pure white. Color Dodge is best for images that are underexposed or otherwise dark.

Soft Dodge darkens the image. That isn't what you'd expect of a blend mode called "dodge." There is little visible difference between Soft Burn and Soft Dodge on a do-nothing tool. But on an active tool, with Soft Burn the tool is most effective in the highlights and ineffective in the shadows,  while with Soft Dodge the tool is most effective in shadows and midtones, with the effect dropping to zero at pure white. Color Dodge doesn't significantly modify the effect of the tool.

Soft Light seems to be the most generally useful of these blend modes. It's almost always a good place to start. Overlay is like Soft Light with a slightly increased contrast — the main difference is with an active tool, where Soft Light will decrease the effectiveness of the tool by about half while Overlay won't.

Color Burn blend mode is so extreme, and produces such wild color shifts toward fully-saturated primary (R/G/B) and occasionally secondary colors (C/M/Y), that you'll probably never use it, at least not without reducing the Opacity, except maybe for special effects.

These blend modes can be applied to any tool, but there's something to be said for putting them on a separate do-nothing tool, such as a Hue/Saturation tool with no adjustments. Then you can use the Opacity slider to adjust the resulting contrast.

Again, caution for possible color shifts with all of these except Multiply. If color shifts are a problem, either use Multiply or use a ZoneMapper in Luminance mode.

 

Shadow Contrast (Shadow Detail, Fill Light)

Shadow detail can be lost if there isn't enough contrast in the shadows. LightZone lets you adjust shadow contrast through the ZoneMapper, of course, but the Relight tool is probably the first choice. A 1.00 setting of the Shadow slider has no effect on shadow contrast; a setting above 1.00 increases shadow contrast at the expense of midtone and, to some extent, highlight contrast, by lightening the darker shades. A setting below 1.00 darkens the shadows, pulling deep shadows down toward black.

The Polarizer style has a similar effect, except that it always lightens the shadows (increases the shadow contrast), even when the Shadow slider is set to 0. The Fill Flash style is a Polarizer with Shadow=3.0 and some other minor adjustments. The two Sunset Scene styles are Polarizers with Shadow=6.0 and some other adjustments.

 

Highlight Contrast (Highlight Detail)

Highlight detail can be lost if there isn't enough contrast in the highlights. LightZone lets you adjust highlight contrast through the ZoneMapper, of course, but the Polarizer tool is probably the first choice. The Polarizer always increases highlight contrast, even at the minimum setting of 0.10. As noted above, it also always increases shadow contrast. Increased highlight contrast comes at the expense of midtone contrast and, to a lesser extent, shadow contrast.

The Relight tool also has a Highlights slider, but its effect is quite different. It doesn't increase the highlight contrast so much as simply reduce the overall brightness of highlights, which actually reduces highlight contrast a bit. Whereas the Polarizer will leave a white pixel white, the Relight tool will reduce its brightness and there won't be any totally-white pixels.

 

Contrast Between Regions

All of the types of contrast adjustments discussed above are handled on a pixel-by-pixel basis. They do the same thing that a Curves tool does in other software: converts each pixel to some output level based on its original level, irrespective of what any other pixels might be. But there's a different class of tools that adjusts each pixel based on how it compares with (contrasts with) some other pixels.

The Tone Mapper style will be shipped with the next LightZone release. You can download it now for earlier releases: right-click this link and save the linked file in your LightZone/Templates folder as "High Contrast;Tone Mapper.lzt".

Many images contain bright areas and dark areas. The Tone Mapper automatically reduces the contrast between those areas, using a technique called contrast masking (you can Google for that). It automatically dodges those areas of your image that are very dark and automatically burns those areas that are very light, giving an image with much more balanced contrast. The effect is almost magical; Tone Mapper is about as close to a smart-fix as you'll find in LightZone.

Tone Mapper has three sliders. The Radius slider determines how flat (low radius) or hard (high radius) the lighting appears. The Gamma slider adjusts the divider point between dodging and burning, thereby adjusting the overall lightness of the result. The Detail slider essentially controls the size of the mid-tone gap between dodging and burning, which is something that ordinary contrast masking doesn't provide. As always, there's an Opacity control, which defaults to about 75% so there's room to run it up as well as down. And you can always apply multiple Tone Mappers.

 

Local Contrast (Regional Contrast, Clarity)

Local contrast is crucial for giving the appearance of clarity. It is about how much contrast range there is within a particular part of the image. Much has been written about the topic; search for Local Contrast Enhancement on Google.

Local contrast enhancement is classically done as an UnSharp Mask with a larger Radius and the appropriately reduced Amount. There's a Local Contrast style in the Detail Enhancement section that sets this up for you. You'll find that decreasing the radius gives an appearance of flatter lighting, while increasing the radius gives an appearance of harder lighting. Keep in mind that Amount has to be adjusted in the opposite direction from Radius.

There's no rule that says you can't have two Local Contrast adjustments, one with a small  radius and one with a larger radius.

When using local contrast enhancement, use caution for some extreme pixels being clipped to full-black or full-white. Most of the time it doesn't happen, but you probably should watch your histogram just to be sure. You may need to reduce global contrast to make room for the effects of local contrast enhancement. A Tone Mapper often helps here. Other possible ways of dealing with this are to use the tonal range selection on the Color Selection tab (be sure to leave some feathering at both ends of the range), or to use the Midtones blend mode.

 

Detail Contrast (Detail Extraction)

Detail contrast is contrast on a fairly small scale: the scale of the little details in the image. Although this can be addressed to some extent by using a Local Contrast enhancement with a smaller radius, LightZone provides Detail sliders on both the Relight tool and the Polarizer style. Recall that those tools might have been used to increase contrast in shadows and highlights. That contrast has to come from somewhere, and it's stolen from the midtones. Increasing the detail contrast helps restore the appearance of contrast in midtone details without significantly pushing back on the reduced overall contrast of the midtones. (So does Local Contrast enhancement.)

The Detail slider on the Relight and Polarizer are done using different calculations, but the overall effect is virtually identical. The Relight tool has the advantage that by setting Shadows=1.0 and Highlights=0.0, the tool is only doing detail contrast enhancement, whereas the Polarizer always increases contrast in both shadows and highlights by a bit. The Relight tool also has an advantage that Detail=1.0 is a "no effect" setting, and settings below 1.0 decrease detail contrast. The Detail slider on the Relight tool can go up to 10.0, but the Polarizer is limited to 4.0. So if you're already using a Polarizer, you can go ahead and use its Detail slider. But if you're just looking for detail contrast control, the Relight tool is the more flexible choice.

The Depth slider has essentially the same effect as the Radius control in local contrast enhancement. The lower it's set, the flatter the lighting looks. The higher it's set, the harder the lighting looks. At the higher end, the Detail slider is more like a local contrast control.

 

Sharpness (Edge Contrast, Pixel-level Contrast)

There's a myth in the photographic community that software sharpening is a synthetic process that just fools your eye into believing that the image is sharper. In fact, "sharpness" is simply contrast at the edge level, and software sharpening increases contrast at the edge level. When used to compensate for sharpness lost by optics (including the low-pass anti-aliasing filters found on most DSLR sensors), there's nothing synthetic about it at all. Of course, if it's used to over-compensate, then it becomes synthetic.

LightZone's Sharpen tool uses the standard UnSharp Mask approach that virtually every image-processing software package offers. The Midtones Sharpening style applies sharpening except for deep shadows where noise hides and for bright highlights which often are sky that's been blown-out with resultant noise. It tends to give a very clean sharpening except that the default Amount=185 is probably way too high — Amount=100 would be more reasonable. The MT Green Sharpen style is the same as Midtones Sharpening but with a color selection that's focused on greens, suitable for selectively sharpening foliage.

The Relight tool and Polarizer styles both have a Fuzz control. The Fuzz control is one of the great mysteries of LightZone, but it generally can be thought of as a sharpening control. On the Relight tool, it's a fairly straightforward UnSharp Mask sharpening, with a radius of 10x the control setting — Fuzz=0.3 is like USM with Radius=3.0. Unlike the Sharpen tool, however, the Fuzz control doesn't necessarily sharpen everything. It's tied to the Detail control, and will mainly sharpen those parts of the image that have detail enhancement. It's not something you're likely to use on its own, but if you've got a Relight or Polarizer in your tool stack, you might want to push the Fuzz control up a bit and see what you think. Values over about 0.30 or 0.40 are probably counter-productive.

The High-Pass Filter style will be shipped with the next LightZone release. You can download it now for earlier releases: right-click this link and save the linked file in your LightZone/Templates folder as "Detail Enhancement;High-Pass Filter.lzt". Whereas the standard UnSharp Mask sharpens all edges, the High-Pass Filter mainly sharpens edges that are already somewhat sharp. The Radius control determines which edges it's going to sharpen; somewhere around 0.700 is where it'll find the most edges, and it'll almost always end up being set somewhere between 0.500 and 1.000.

 

Color Contrast

So far we've been looking at tonal contrasts, with the main distinction being the size of the area that we're contrasting. There's also the matter of contrast between colors. For color photography, that basically comes down to the Saturation and Vibrance controls on the Hue/Saturation tool.

Another way to get contrast between colors is with the Color Selection tab on various tools. Selective saturation and desaturation are the obvious applications, but the possibilities are mainly limited by one's ingenuity. Using a Color Balance tool to selectively modify some colors is one possibility.

Crossing the boundary between color contrast and tonal contrast, a Black and White tool can be used with an Overlay blend mode to increase overall contrast, then the color filtering can be adjusted to change which colors are more affected. For example, a blue filter will cause blues to be lightened more or darkened less, while yellows will be lightened less or darkened more. The Strength slider can increase or decrease the difference in effect between colors, while the Opacity slider can be used to reduce the overall contrast enhancement.

For B&W images that are created from color originals, tonal contrast can be modified by using color filtering. This is mainly done with the filter color circle and its Strength slider on the Black and White tool. A number of presets are available as Black & White styles, and you can mouse over them to see their effects in the style preview window.

The Channel Mixer style will be shipped with the next LightZone release. You can download it now for earlier releases: right-click this link and save the linked file in your LightZone/Templates folder as "Black & White;Channel Mixer.lzt". This provides a conventional channel mixer B&W conversion, for those who prefer that interface.

rlhobday
Hi Doug,

Hi Doug,
Many thanks for the additional Styles - very useful indeed.

R.

damarko
Thanks

Doug,

all your guides and explanations are clear and practical.

Thank you very much.

 

Damir

 

richmtoo
Great stuff! Thanks

Great stuff!

Thanks

jeffsvisions
Great Thank you

as a new person to light zone i find these very helpful . 

thank you 

jeff

jknights
Doug, Thanks for the

Doug, Thanks for the information about the ZoneMapper tool.

I know that having duplicate functionality in a software doesnt really seem to be a good thing to do but a Curves Tool where you can drag points to adjust your image is a very familiar concept across many softwares so new users struggle when a new concept such as ZoneMapper and using HSL sliders.

The addition of a Curves tool would probably make for increased uptake with greater ease for new users.

 

todd
thanks so much for this. i

thanks so much for this. i will be back to re-read. :-)

titrisol
In the high pass filter, what

In the high pass filter, what is the ratio of Gain and Radius?

It seems to me that is can go easily to unnaturaly sharp ;)

tbransco
Customize to taste

titrisol,

If all your images look overdone with the default settings of High Pass Filter, then you have (at least) these two options:

1. Use the Opacity slider to dial the effect down, image by image; and/or,

2. Adjust the Gain and Radius to your liking and use the File / Save As Style option to overwrite the default tool with your own settings.

Works for me, anyway.

Terry

SFA
Many thanks for this Doug.

Many thanks for this Doug. Just catching up with some background reading and this is very useful.

 

I was a little puzzled that I did not see the Tone Mapper, HPF or Channel Mixer in the Styles list on my V4 installation. However it is installed alongside a 3.9 installaiton and I suspect that the V4 install did not attempt to update the pre-existing Templates folder. Having downloaded from the links in your post I now have them working. Thanks.

 

Grant Perkins

 

 

tex
These are now included in the

These are now included in the v4.1 betas, so they will be coming with the next release candidates.

SFA
Ah, did I get my dates woring

Ah, did I get my dates wrong comparing Doug's post and the formal release of V4?

 

Grant