Today, the first day of the rest of our lives…
Today, the first day of the rest of our lives…

Why RAW?

RAW 001

I took this photo standing in the building that is the entrance to the Taj Mahal compounds in Agra, India. This was a handheld shot with no flash. I paused just for a moment to capture the image as I was walking with the flow of the crowd. The indoors where I am standing was only illuminated by natural light—there was no artificial light inside. As a consequence the contrast range between the shadowy dark inside and the sunlit outside was huge. As you can see, in this photograph the shadow areas are severely underexposed and the bright areas are somewhat overexposed. However, this is not how it actually looked in person because the human eye can see a much greater contrast range than a JPEG image can show. How best does a photographer handle situations like this?

Let's begin by talking about desired effects. If I wanted a silhouette effect then I would correctly expose for the Taj under the sun making the indoors completely dark—more dark than this photo. I would then see the silhouette of the arched entranceway and the tops of the people's heads framing the Taj. In this scenario, I would crop the photograph on the sides and the bottom because I would not need the vast amount of black areas.

If I wanted a high-key photograph, I would correctly expose for the indoor and let the outside wash out in the sunlight. It would give the feeling of immense brightness from the Taj flooding the indoors where I was standing, with beams of light shining through the doorway.

Both of the above would make great photographs and they would be very doable technically. But suppose I wanted to expose both the inside and the outside correctly what are my options? Conventional wisdom would say use a fill-in flash—would that work? It depends.

If you used a camera mounted fill-in flash firing straight ahead you would get the following: the little girl and the two people standing very close in front of me would be overexposed, almost washed out by the flash; the walls on either side of the archway and the people under the archway would be the same as the above photo (i.e. dark) because they are too far from the flash; the Taj would be the same as the above photo because we are keeping the exposure the same. In short, it will make a very ugly photograph. If you pointed the flash upwards for diffused, reflected light the photograph would look the same as above because the ceiling is some 50 feet above my head and it is dome shaped. The way to make fill-in flash work is to have five wireless remote triggered flashes on light stands—two illuminating the walls on either side of the archway, one illuminating the people in the archway, and two on either side of me reflected off umbrellas illuminating the people and the floor in front of me. This is obviously an elaborate set up that would take quite a bit of time, require permission from the curators ahead of the visit and I would have to carry a lot of equipment with me all the way from the US.

So, any other ideas? Yes, a bit of jiggery-pokery with a 14-bit RAW image could get you to the same place assuming you have initially exposed the photograph "correctly". Let's start by looking at the histogram of the above photograph.

Histogram 1
Here is the histogram of the photograph above. The horizontal axis of the histogram show the illumination level of a pixel ranging from 0 (black) on the far left to 255 (brightest) on the far right [rendered JPEG image shows in 8-bit, hence 0-255]. The vertical axis shows the count of the pixels in each illumination level—hence it's called a histogram. Here I am showing the separate histograms for the red, green and blue (RGB) channels superimposed on the same graph. You see a cluster to the left which represents the pixels that are indoors and a cluster to the right which represents the pixels showing the Taj and the sky. If I underexposed the photograph, the left cluster would butt up against the left wall and I would have no way of recovering any image information from the blackness. If I overexposed, the right cluster would butt up against the right wall with no ability to recover the bright areas. The way I have it exposed above, there is some ability to recover both the dark areas and the light areas, but there is a challenge.

Imagine we break up the horizontal axis of the histogram into four equal quadrants—0 to 63, 64 to 127, 128 to 191 and 192 to 255. Most of the image information resides in the far left and the far right quadrants, with almost nothing in the middle two quadrants. What we want to do is to take the left cluster and stretch it over the left 3 quadrants and take the right cluster and stretch it over the right 3 quadrants. Each of these quadrants have only 64 possible values—so trying to stretch them over 3 quadrants is going to leave some gaps. Visually this will look like a posterized image. [This is the scenario if you tried this maneuver with a JPEG original]

Histogram 2
If you captured the photograph as a RAW image (12-bits in most consumer DSLRs), then you have a total of 4096 tonal values and each of the quadrants has 1024 tonal values. Now it is easy to stretch the clusters on the left and the right without having the image look posterized. The resulting histogram looks like the one on the right. However, there is still a problem: the dark areas that were brightened (by spreading out the left cluster in the histogram) will look very noisy. You will want a noise reduction filter. Additionally, you may want to enhance the image by adjusting color saturation, sharpness, etc. Making these adjustments on a 12-bit RAW image looks okay but not great. With a 14-bit RAW image (newer semi-pro and pro DSLRs) you have 16,384 tonal values and each quadrant above has 4096 tonal values. Now we are getting to a point where there is enough information in the image to make all the needed adjustments and have it look decent.

RAW 004
Here is how the final image looked starting with a 14-bit RAW file. Keep in mind that if the exposure was even slightly off, this kind of image adjustment would not be possible. So it is critical that the camera has a good exposure meter and exposure calculation algorithm and that you always look at the histogram on the camera LCD display, especially in situations like this. If you are not sure from looking at the histogram, then bracket the exposure. Now try this with film! It is possible with negative but not slide film—it used to take me hours in the dark room while inhaling nasty chemicals to do what I can now do to a digital image with just a few clicks on a computer.