LensRentals.com

Global and Local Contrast, Sharpness and Detail

Posted by

Guest Post by Uwe Steinmueller — www.outbackphoto.com

Important aspects of Human Vision

Because we present our work to other people it is important to understand some basic aspects about how we perceive detail.

Human vision works quite differently than our cameras:

  • We all know that our eyes adapt to scenes. If it is darker our pupils open and if it gets brighter they close. This process often takes quite a while and is not instant.
  • Detail we see is based on contrast (brightness differences)

Contrast

All detail we can see is not based on absolute tonal values but based on contrast. The eye is extremely sensitive to very small brightness changes. This makes the concept of contrast so important.

Global Contrast

Global contrast measures the brightness difference between the darkest and brightest element in the entire image. Tools like Curves and Levels only change global contrast as they treat all pixels with the same brightness levels identical.

The global contrast has three main regions:

  • Mid-tones
  • Highlights
  • Shadows

The sum of the contrast amounts of these three regions defines the global contrast. This means if you spend more global contrast on the mid-tones (very commonly needed) you can spend less global contrast on highlights and shadows at any given global contrast level.

The mid-tones normally show the main subject. If the mid-tones show low contrast the image lacks “snap”. Adding more global contrast to the mid-tones (“snap”) often results in compressed shadows and highlights. Adding some local contrast (see next) can help to improve the overall image presentation.

Good lenses can improve the contrast too. This may not always be welcome if the scene is very contrasty.

Finding the “right” amount of contrast is tricky. Lets show some samples (diagonal split view).

 

 

Both show the same image at a different contrast level. The upper right part looks hazy in comparison. But also the comparison is a problematic tool because the more contrasty version will always grab your attention (compare images printed on matte and glossy papers).

Because the more contrasty version grabs your attention does not mean it really looks better. Be careful not to add too much contrast. If you print on matte papers more contrast may actually be a good thing because the print on matte paper will soften the contrast quite a bit.

 

 

The image starts to look harsh (upper right). Actually contrast and smoothness (opposite of harshness) need to be balanced. If maximum detail is your goal you may add a bit stronger contrast while other scenes require lower contrast levels. Even very low contrast scenes (e.g. fog) need a certain amount of contrast to look right. Once you add too much contrast you may remove the fog and turn it into a normal low contrast scene.

 

Local Contrast

The following chart helps to understand the concept of local contrast.

The circles in each row have exactly the identical brightness levels. Yet the top right circle looks a lot brighter than the one on the left. Why is that? Our eyes see the difference to the local surrounding. The right circle looks much brighter with the dark gray background compared to a brighter background on the left. Just the opposite is true for the two circles on the bottom. For our eyes the absolute brightness is of less importance than the relative relation to other close areas.

This effect — called Retinex Theory  — was described in 1971 by Edwin H. Land (founder of Polaroid).

Some of the Basic Lightroom tools and Photoshop’s Shadow/Highlight act locally and do not treat all pixels with the same brightness values as identical.

The classic Dodge&Burn also manipulates the local brightness of contrast of images. Dodge&Burn is still one of the top methods to refine images because our own eyes judge how the image is presented to the human eye. In some way modern imaging tools like Lightroom’s Highlights and Shadows reduce the need for manual Dodge&Burn without replacing them. The main local contrast tool in Lightroom is the Clarity tool.

Tools with Global Action

There are some controls in image editing that have ‘global’ action. With global we mean that they treat all pixels equal and only depend on the single pixel value itself. Classic global controls are Levels and Curves (also the Tone Curve in Lightroom).

Tools with Local Action

Often more interesting are tools that act more local. The main tools in of this type in Lightroom are Highlights, Shadows and Clarity.

Local contrast corrections are also not free lunch. They can often add wide halos if used at strong settings. Here is a sample in Lightroom with Clarity set to 100 (10-20 may be more reasonable settings):

 

 

Sharpness/Detail

Sharpness is created by local contrast at edges. What is in your way of optimal sharpness?

  • Lens contrast: Good lenses really make a major difference
  • Lens resolving power
  • CA (CA correction costs real resolution)
  • Lens distortions (again distortion corrections costs resolution)
  • Bayer filter (you can study this by comparing results from the Sigma Foveon cameras)
  • Anti Aliasing Filter (blurs the image to avoid moiré and aliasing)
  • Camera shake (tripods and good technique can help)
  • Sensor resolution: but often the system is limited by not so good lenses
  • Sensor noise: hides detail. Stay at lowest ISO if you can.

Nothing lost here can really be recovered. Still good sharpening can give a very much-improved impression by improving the acutance (edge contrast). Sharpening is a balance act:

  • Improve acutance
  • Avoid artifacts
  • Halos
  • Stair stepping
  • Amplify noise
  • Keep smooth surfaces

The following crop from the above image (magnified) shows some halos that would be too strong for our taste:

 

We think our own Optimal Sharp V3 script for Photoshop helps to improve fine details and yet minimize some of these artifacts. Here is a sample where sharpening with Optimal Sharp V3 makes a major difference:

 

 

Fine Detail and Noise

The detail you can get from your system is of course limited by the sensor resolution. The other important factor is noise. At some point it is impossible to distinguish noise from real detail. It may not really matter for grungy scenes (e.g. rust) but in smother areas it does not look good (e.g. the sky in the above building image showed also more noise dues to over sharpening).

Note: in the camera forums we often read that camera X does not show any noise at ISO 800-1600. Not sure what these people are looking for. Noise with top cameras can even be revealed at ISO 100 once you open up the shadows. More truthful would be to say: The images from camera X can still produce usable images at ISO 800-1600. Often taking a picture at ISO 1600 maybe the only way to get the shot. Then we live with the noise but it is still there.

Conclusion

In the end the whole system of camera, lens and post processing defines your result. While a good camera and lens are always the best starting point the processing matters as much. Tuning Contrast (global and local) and sharpening play a central role and have to be well balanced. Also don’t forget that in the end the image content counts and not all our pixel peeping. Don’t forget to have fun with your photography.

 

Uwe Steinmueller

Digital Outback Photo for Lensrentals.com

March, 2013

21 Responses to “Global and Local Contrast, Sharpness and Detail”

Matt said:

Hi Uwe,
Thanks for a terrific, very informative article.
Matt

David said:

Thank you. A great general article. Many have said that post-process is half or more of the time required for the final image. I think its important to remember that pushing “I am feeling lucky” in Google’s Picasso will not cut it.

Uwe Steinmueller said:

>Many have said that post-process is half or more of the time required for the final image.

For one hour shooting I likely spend 20 hours processing. This does not mean that I spend hours per image but that processing helps me to understand what to capture in the future and where I could go with our pictures.

Here is an example of our Texture blending work:

https://vimeo.com/61119033

Daemonius said:

Hours of processing are kind downside of digital age. Problem isnt that we can control all “options”, problem is that we actually must.

Nice article. I liked that part about noise not showing at ISO 800-1600. :D In real life there is very few top class cams that dont show noise at base ISO. Mainly Nikon D3/s and D4 are clean enough on base/lowest ISO. And only exception from Canon was 1DMK3. And.. thats pretty much all I know of. Unfortunately most cams have difficulties to reach at least those 38 dB on base ISO. And for truly clean, 40dB is needed (but even 39 helps).

Uwe Steinmueller said:

>Hours of processing are kind downside of digital age.

The time spent in the real darkroom was not shorter I think. Ever tried high quality color in the traditional darkroom? Costs an arm and a leg to get the equipment to make reproducible color prints.

I see it as a positive because I can control the process.

BIlly said:

This is going to be very useful for me thank you very much for posting

David said:

>For one hour shooting I likely spend 20 hours processing.<
That's not bad, and I agree that the dark room time would be a lot. I have not been paid for any of my images yet. I am more of hobbiest. I so far spend near no time in the digital dark room. I have been super lazy. I shoot with Olympus E3, save as Raw + JPeg at 8Mpixel (its a 10Mpixel camera). I mostly use the Jpegs straight out of camera. I have printed a bunch of kids shots for the grandparents (time was roughly 1hour for 6 prints). This included selection time, then just open Raws in Lightroom 3, quick edits and prints at 8×10.
Others I just upload the Jpegs straight from camera to my smugmug site. Then they select the prints and get it shipped.
I have even shot at a wedding, was not paid as was part of the party. So no actual ceremony shots. But my shots were used over the paid photographer by the bride. Still just sent straight out of camera E3 8Mp Jpegs. I told them I could edit any favorites, but still haven't been asked (almost a year now).
So digital edit time can be near zero, **if you shoot correctly in camera**. But I do still think that one day I will go over all my shots, clean them up, make them pop and have a real portfolio.

Uwe Steinmueller said:

>So digital edit time can be near zero, **if you shoot correctly in camera**.

If it works for you great. I do too much that it would work for me. Never shoot JPEGs if I can shoot raw. JUst different views on it.

CarVac said:

Great post on global and local contrast, but you offer no advice for those situations when you simply have to use local contrast enhancement to rescue an image from being “flat-looking”.

One interesting note: Maximizing local contrast while minimizing global contrast to the extreme not only usually adds halos, but additionally yields the dreaded “HDR” look that many people despise.

While musing about something completely different, I had the realization that one aspect of film that was genuinely desirable is that the development process produces very natural-looking global contrast reductions and local contrast increases. Sometimes the effect can be fairly strong, but they rarely look “wrong” in the way that many “HDR” photos do.

I am thinking specifically of color negative film photos with leafless trees against uniform blue skies: the sky gets lighter right next to the tree branches, but in a very natural way that mimics the way your eye adapts to the brightness. In a digital image, the sky would remain uniformly bright right up to the branch, which while technically accurate does not reflect what you would actually see.

I set out to duplicate this effect, so I have been working with a friend on a program which gets the same results from input raw files and linear 16-bit TIFFs; it takes 40 seconds per (18-MP) photo, but my hands-on postprocessing time is usually at most 5 seconds per, involving mostly one tone curve application, CA correction, and fine detail sharpening. I almost never have to rerun the 40-second processing step, so it has saved me countless hours of post-processing.

In addition to working on single exposures, it can merge bracketed exposures to recover highlight detail without affecting the look of the photo. The resulting photos can look completely natural, but they retain highlight detail and have no noise in the shadows.

When my friend and I first got the program working, our first thoughts were “Every photographer deserves the chance to use this.” So, when it is slightly more finalized, I’m planning on open-sourcing the program for everyone to use for free.

Uwe Steinmueller said:

>but additionally yields the dreaded “HDR” look that many people despise.

One part is halos and the other likely tonal inversions. Show examples of your process.

CarVac said:

I guess my post with image links got spam filtered?

Uwe Steinmueller said:

>I guess my post with image links got spam filtered?

Did not get the point of your posting?

Uwe Steinmueller said:

CarVac,

sorry did not see the posting in hte right context. Please repost.

CarVac said:

I guess you wanted an explanation of my workflow rather than the before/after, which I’ll repost the photos anyway in the course of explaining.

Step 1: I copy raws from my card onto my computer.
Step 2: I run a batch script (which calls the program I wrote) on the directory containing the raws. It’s fairly slow, around 40 seconds per image, but it needs zero user interaction. This turns out a fairly dark tonemapped 16-bit TIFF for each image, like this: https://lh5.googleusercontent.com/-sULK5ad9lTI/UT5-VjstjwI/AAAAAAAAFjk/wJNunWvCt9k/s2048/IMG_3128-untonecurved.jpg
Step 3: I open the TIFFs in RawTherapee, a free photo editor, where I apply a tone curve, correct for CA, and sharpen. I usually use the ‘film-like’ tone curve, which preserves colors better when lightening images. For this sample image, the editing took all of 1 minute. Screenshot: https://lh4.googleusercontent.com/-mgcq8RJmrBk/UT5-a3fYjqI/AAAAAAAAFjs/BHPSXbwUTHw/s1920/RT_filmulator.png
Step 4: I’m done. https://lh5.googleusercontent.com/-9_t5z7k2SdI/UT5f2kykyHI/AAAAAAAAFig/sxcD-4rlWyQ/s2048/IMG_3128.thumb.jpg

And for comparison, here’s the camera jpeg output: https://lh5.googleusercontent.com/-9_t5z7k2SdI/UT5f2kykyHI/AAAAAAAAFig/sxcD-4rlWyQ/s2048/IMG_3128.thumb.jpg

This is all I do for 99.9% of my images. A few I stitch into panoramas with Hugin (convert raws to linear 16-bit tiffs, stitch, run through my program, and then tone curve with RT), and some I do HDR merges to capture extra highlight detail and reduce shadow noise (copy raws to a subdirectory, and run my program on that directory, and then apply a tone curve with RT), but the tonemapping doesn’t add any effort on my part.

In fact, I used to spend hours tweaking my photos, but this does most of it for me.

Uwe Steinmueller said:

Still not sure what the picture should demonstrate?

CarVac said:

Can you not see the long post I made above? Here’s the (slightly edited) text of it without most of the images.

Step 1: I copy raws from my card onto my computer.
Step 2: I run a batch script (which calls the program I wrote) on the directory containing the raws. It’s fairly slow, around 40 seconds per image, but it needs zero user interaction. This turns out a fairly dark tonemapped 16-bit TIFF for each image.
Step 3: I open the TIFFs in RawTherapee, a free photo editor, where I apply a tone curve, correct for CA, and sharpen. I usually use the ‘film-like’ tone curve, which preserves colors better when lightening images. For this sample image, the editing took all of 15 seconds. Many take less time.
Step 4: I’m done. (see the photo from my above post)

And for comparison, here’s the camera jpeg output: https://lh5.googleusercontent.com/-9_t5z7k2SdI/UT5f2kykyHI/AAAAAAAAFig/sxcD-4rlWyQ/s2048/IMG_3128.thumb.jpg

This is all I do for 99.9% of my images. A few I stitch into panoramas with Hugin (convert raws to linear 16-bit tiffs, stitch, run through my program, and then tone curve with RT), and some I do HDR merges to capture extra highlight detail and reduce shadow noise (copy raws to a subdirectory, and run my program on that directory, and then apply a tone curve with RT), but the tonemapping doesn’t add any effort on my part.

In fact, I used to spend hours tweaking my photos, but this does most of what I want automatically. It lightens the dark regions, and darkens the light regions, without sacrificing local contrast.

Marco said:

CarVac — I really don’t see your point much as this is a very poor image either way. What this image needs most is fill flash (available in Picasa after the fact)that ideally would have been used when taking the picture. This could have been low output flash or a reflector. Trying to fix a bad image in post is just a waste of time. Better to take good pics in camera and then pop them in post.

PeterK said:

Nice article. However I can’t say the same for your sharpening tool. I had a look at your samples and on many of they I don’t like the look. It looks unnatural. It seems to push the picture towards posterization (leaves in the example above). I tried Photoshop unsharp mask and my result was very similar to yours (and no halos), but I think it looks more natural (no posterization.

I noticed similar look on diglloyd images. Most of them have like little black / dark grey pixelated spots in between image detail. I imagine that for some people this can somehow subjectively seem sharper, but to me it seems very unnatural. I wonder if diglloyd uses some of your plugins..

Unsharp mask in Photoshop has 3 parameters that can be adjusted. Learning to use them properly will result in ability to sharpen any kind of detail and the look will be natural. In some cases I saw some plugins to produce results slightly better than unsharp mask. But in many cases I saw unnatural looking results. My conclusion – unsharp mask is still the king of sharpening.

Uwe Steinmueller said:

> It seems to push the picture towards posterization (leaves in the example above). I tried Photoshop unsharp mask and my result was very similar to yours (and no halos), but I think it looks more natural (no posterization.

Sharpening is a matter of personal preference. But it also does not make much sense to look at the pixel level only because they will soften on print.

funny games said:

I see something genuinely particular in this website .

Leave a Reply