Wednesday, October 2, 2013

Exposure for Digital Cameras

In this post, I'd like to talk about my approach on setting the exposure for digital cameras.


When you raise the volume on your stereo, do you notice that as it gets louder, it takes larger adjustments to make it even louder?  Our eyes work in a similar way.  As an object gets brighter, it needs to become disproportionately brighter in order to appear brighter to our eyes.  This relationship between actual versus perceived brightness is sometimes described as being logarithmic or nonlinear.

The reason I mention this from the outset is because it is an important concept to consider when determining exposure.

With film cameras, in particular negative (print) film, exposure works in a similar way to our eyes.  It requires progressively more light in order to make it appear brighter.  As a result, negative film usually preserves highlights very well.  Check out the sample below:

I took the shot with a Nikon N90, using ordinary consumer grade color negative film (Kodak Gold 200 IIRC).  As you can see from the very sharp shadows, the sun was quite bright, with barely any clouds.  Nonetheless, you can see all the highlight details were preserved, even in the light colored areas of the shot that were directly illuminated by the sun, such as the white part of the sneakers, or more critically, the skin (particularly the underside of the forearm).  No blown highlights at all.

The sensor of a conventional digital camera, however, works differently from our eyes and from negative film.  Digital sensors are linear.  Double the light and the recorded light is also doubled, no matter how bright or dark the image already is.  To further compound the problem, once the maximum amount of light is recorded, all detail in that portion is lost forever.  That part of the image will just look totally white, with no detail that can be recovered (though I admit it is possible to *simulate* recovery through careful cloning). There are also exceptions such as the Fuji S5 Pro (reviewed here) which is much more similar to our eyes and to negative film.


We use the term 'exposure' in a couple of ways.  On one hand it can mean whether you chose a wide aperture or narrow aperture, or a fast shutter or slow shutter, or a high ISO or a low ISO.  On the other hand, it can also mean just the net amount of recorded light, regardless of choice of aperture, shutter speed, or ISO.  To avoid confusion, by exposure I mean the latter (I'll refer to the former as creative exposure).

Suppose we ask, what is the correct exposure?

One response is that the correct exposure is the exposure that records the amount of light that is actually in the scene.  A middle gray object is recorded as middle gray.  I agree, when comparing straight-out-of-the-camera results, this is of course by definition the most accurate approach.  If this is your preferred approach then an incident lightmeter is your best friend.  Barring that, you can use the Zone System to get a reasonable estimate of the light in the scene.

The problem with this approach is that it doesn't necessarily take into account the sensor or medium's dynamic range (the range of shadows and highlights that can be captured by the medium).  Suppose you have a medium that has a range of 3 stops of shadow and 3 stops of highlights.  Suppose further that you have a scene that is quite dark, with tones that are primarily in Zone I, II and III.  If you use the 'most accurate' approach, then you won't be able to record the Zone I portions of the scene - they are beyond the dynamic range of the medium.

An alternative solution would be to fit the dynamic range of the scene within the dynamic range of the medium, as much as possible.  In the hypothetical scenario above, the scene could be intentionally overexposed by 1 or more stops so that the Zone I is rendered as Zone II or higher, within the dynamic range of the medium.  In post processing, the intentional overexposure can be corrected, and meanwhile the Zone I detail is preserved, a better end result than the previous approach that needlessly sacrifices Zone I.

We can apply this same logic to digital cameras.  Most digital sensors have a very good shadow range but less impressive highlight range.  Indeed, as post-processing software improves, the useful shadow range is effectively extended to ever-deeper blacks.  Therefore it makes sense to underexpose the shot as needed to fit the relevant highlight range within the sensor's highlight range.

This does not mean we should underexpose unnecessarily, "just to be safe."  Because notwithstanding advances in sensor technology, an underexposed image will have more noise.

Keeping both objectives (dynamic range and noise), the ideal strategy for digital sensors is therefore to expose for the brightest relevant highlight, i.e. expose to the right (ETTR) as much as possible without blowing any relevant highlight detail.  [EDIT: here is an article that proves that ETTR gives you the highest image quality -- instead of trying to get the "actual" exposure (exposing gray as gray).]

The key word here is 'relevant'.  When is a highlight relevant or not?  To me, a highlight is relevant if it helps in the "modeling" of the subject (i.e., helps describe the three-dimensional contour of the subject).  Therefore to me, a highlight illuminated by a kicker or the shoulder is relevant, while I don't sweat over the rim light or backlight (the thin bright outline to separate the subject from the background).  In general, I also don't attempt to preserve specular reflections - you know, the very bright reflections of light (there's no detail there anyway), just focusing instead on keeping diffuse highlights.

As for the background, highlights matter to me based on various factors like whether the highlight adds to the image or not.  If the sky is just featureless gray sky, then I don't care if I lose it or not (it's featureless after all!).  If the background is blurred with shallow depth of field, I look at factors like whether the background is colored or not.  If it's just white blobs, I don't mind losing some highlight detail there.  Again, this is just my opinion on which highlights I find relevant.


Let's compare these two straight-out-of-the-camera shots:

Again, these are SOOC without any exposure adjustments.  The scenes are different, and in the first one I used a flash while in the second one I did not.  But note that the ambient lights are similar: sun coming from over the shoulder.  In the first shot, the exposure was set for 'accuracy,' it doesn't look overexposed or underexposed as is.  The second one appears significantly underexposed.

Notwithstanding the SOOC appearance, to me, the exposure in the second shot is the one I prefer based on my preferred strategy for exposure for digital cameras.  In the first one, look at my skin (and that of my son).  Bright patches of detail-less white, like someone spilled correction fluid on us.  You could kind of rationalize and say, oh it's just backlight.  But to me, because they do help shape the subjects' heads, they should have been preserved.

Here is a closeup from the second shot:

No lost highlights at all.

And now here are the end results after post-processing:

Note: it's not exactly the same shot, I know.  Anyway, as you can see there are many blown highlights even after post-processing.  Like I said, once they're gone they're gone.

And here is the second shot, after postprocessing:

Although I brought up the exposure to correct the underexposure, the highlights are all still there.


So, in the real world, how do we expose to the right just enough to preserve relevant highlights?  One way is to use the histogram.  It helps if your camera has a zoomable histogram (meaning the histogram reflects the zoomed-in portion).  Another way is to take a test shot and see if any of the relevant highlights are blinking, but this is somewhat unreliable for me.  I find the camera is usually too conservative, showing that an area is blinking whereas in reality that portion still has detail when I download the shot to my computer.

I use neither of these options.  Instead I rely on Active D-Lighting (Highlight Tone Protection for Canon).  For Nikon cameras, Active D-Lighting will seemingly increase the dynamic range of the shot.  Actually what it does is to underexpose the shot, then use its internal postprocessing to recover underexposed shadow areas.  The shadow recovery is recorded only in JPEG, and I always shoot in Raw so I don't see that in-camera shadow recovery when I download the shot, but I don't care too much about it.  I can apply shadow recovery myself.  The primary benefit of ADL for me is that it underexposes the shot sufficiently to preserve the highlights.  In current Nikon DSLRs, the "protectiveness" of the ADL can be adjusted from low to normal to high to extra-high to auto.  I usually leave it on Auto unless conditions are extremely contrasty, in which case I tend to choose extra-high.


We haven't discussed yet how I brought up the shadows.  In the past here is the approach I used.  These days, I use a different approach.  That will be the topic for my next post.