Thursday, July 2, 2009

Fixing Highlights and Shadows - Part 1: Dynamic Range

In this tutorial I will present you several techniques I use in Gimp, in order to fix the lightness in my photos. In the first part we will discuss about the dynamic range and how to fix it using levels and curves tool. Most of the time this fix will be enough, but sometimes not. This is why in the second part I will present you my favorite fix for such situations in which the highlights and/or the shadows are seriously out of natural, using multiply and screen rendering modes. Finally, in the last part I will present you the Shadows and Highlights filter.

For this tutorial I used Gimp 2.6.1. You may face some small differences in the Gimp's interface if you are using a different version.

Here is the first photography we want to fix in this tutorial:



Well... there is something wrong with this photo. Can you guess what? Which aberration is most obvious to you, the dynamic range or the semaphore lights?
This funny (and real) shot was taken in London (on the left is The Big Ben). As if it were not enough that you have to drive on the left side of the road, you have to deal with such semaphore also.

But I'm sure that you were more concerned about the dynamic range, not the red/green lights. So let's take a look over the histogram in the levels tool:


In a good photo, the histogram is expanded over the hole horizontal axis. Dynamic range in photography describes the ratio between the maximum and minimum measurable light intensities (white and black, respectively). In a standard 8 bit RGB digital image, for each pixel, in each channel we can store a value between 0 an 255. As you can see from the histogram, our photo is missing quite an impressive number of values in the highlights zone (right) and also some in the shadows zone (left). This means that we do not benefit from all the value range we can use. Our lightest pixel is around 160, far away from a white point (255). On the opposite side we miss less range, but enough to reduce the quality our photo.

Since every photo's histogram is unique, there is no single way to adjust the levels for all your photos but most images look best when they utilize the full range, dark to light which can be used. This means that it is often best to extend the histogram all the way from black (0) to white (255):


To do this, move the black triangle to the right and the white one to the left until each one meet the histogram. Click Ok. Open again the levels tool and notice the differences: the histogram is expanded now over the hole range, but something strange happened. Some of the vertical lines are missing from the histogram. This is called "posterization" and means that we are missing some details due to the transformation we've made. This is the life, everything has a price, we loosed some details in order to improve the used range. This is normal and acceptable if it does not become visible in the image. Look for it in your photo after working with the histogram. It is more visible in regions of gradual color transitions, like the sky. If the posterization is visible you should reduce the stress applied to the histogram.

In our example here is the result (original photo first, adjusted one next):

The same adjustments can be made using the curves tool:


As you can see, the extremes of the curve were moved to match with the histogram. The curves tool has the advantage that it can be used also for zones inside the histogram. If you have gaps in histogram values, you can adjust this by placing 2 control points on the curve and than adjust the curve to be horizontal above that missing zone. Anyway, this anomaly is rare.

Unfortunately, the dynamic range technique does not work always. In the second part of this tutorial I will explain you how do I fix higher anomalies, using multiply and screen render modes.

1 comments:

AUGUST said...

Awesome and thank you.August9

Post a Comment