In this article I bring together qualitatively the main concepts discussed in the series and argue that in many (most) cases a photographer’s job in order to obtain natural looking tones in their work during raw conversion is to get the illuminant and relative white balance right – and to step away from any slider found in menus with the word ‘color’ in them.
If you are an outdoor photographer trying to get balanced greens under an overcast sky – or a portrait photographer after good skin tones – dialing in the appropriate scene, illuminant and white balance puts the camera/converter manufacturer’s color science to work and gets you most of the way there safely. Of course the judicious photographer always knew to do that – hopefully now with a better appreciation as for why.
Boiling Frogs
When first learning to develop captured raw data into a pleasing rendered image, the typical photographer soon discovers that the easiest way to kill a perfectly good picture is to mess with sliders that directly affect color. Such sliders have names like r, g, b, *a, *b, hue, saturation, etc. The reason is simple: just like the mythical frog warmed slowly to death in the pot, the Human Visual System quickly adapts to initially small incremental changes, inexorably luring us with every nudge of the mouse further and further away from reality until … just one more tiny fix… we slip blissfully unaware into the netherworld.
However, when finally satisfied we look away from the monitor, before quickly returning to it to compare our new work of art to the out-of-camera jpeg, we see with dismay tones better suited to a Lewis Carroll novel. Humbled, we reset everything to ‘as shot’ and leave it at that.
One Capture, One Transform
In order to properly project captured raw data to an output color space suitable for viewing, the camera needs to use the appropriate transform
(1)
as described in a previous article. At its simplest the transform is a 3×3 matrix, in which case * represents matrix multiplication: just multiply demosaiced raw data triplets by the appropriate matrix to obtain image intensities in the output color space of choice, for instance . As we have seen, for a given camera, lens and output color space the transform is a compromise that depends on
- the scene (e.g. portrait or mountain landscape reflectances)
- the illuminant at the scene (e.g. flash or spring mountain sun)
so it changes whenever those do. Ideally the photographer would specify both the scene type and illuminant to their camera at the time of capture so that the optimal color transform may be applied.
The transform can be linear, in which case it is a 3×3 matrix as we will assume in this article; or it can be non-linear, usually complemented by one or more Look Up Tables to improve its ‘accuracy’ or ‘look’. Many camera/converters have several pre-computed transforms at the ready that can be fine tuned or interpolated, often in mired units.[1]
Pick a Scene Type
Scene types represent a sample collection of expected reflectances, presumably used to produce the relative pre-computed transform as discussed earlier in this series. For instance a Landscape transform would be created based on a selection of chlorophylls, tree trunks, rocks, earth and flowers; Portrait, with different skin, hair and eyes; Standard, a generic set of reflectances often found in typical photographs (enter the ColorChecker24 and similar targets); etc.
If we are after natural looking tones there aren’t that many of them, so picking a scene type is generally easy. In-camera or in-raw-converter, find a menu named Style or Profile or Picture Control or similar – and choose Landscape for a landscape shot, Portrait for a portrait, Standard for a generic scene. Ignoring artistic license, those are the main natural alternatives. For instance this is the relative drop down menu in Adobe’s Camera Raw converter:
Stay away from ‘Vivid’ or any other unnatural sounding enhancements.
Incidentally, in this article I am suggesting just changing the color transform, while consumer rendering engines like the one above usually take the opportunity to also customize tone curves, saturation, sharpening and the kitchen sink to make the resulting image captured in the selected conditions look as pleasing as possible to as large a number of viewers as possible, kissing goodbye any hope for natural colors. If that’s what your raw converter does, generic neutral scene types with names like ‘Neutral’ or ‘Flat’ should provide a level starting point for conversion.
Specify the Light Source Type
Specifying the light source is more involved than picking a scene type. Ideally it would mean knowing its Spectral Power Distribution (SPD), which is often not possible in the field. However, in many instances we do not need a full SPD. As discussed in the previous article, specifying the illuminant Type and Correlated Color Temperature (CCT) or White Point often suffices to provide the converter with a reasonable indication of what it is and therefore allow it to select the appropriate color transform. Head over to the White Balance section of your raw converter or camera and dial in the appropriate illuminant type and CCT
Taking a Natural light capture as an example, if we had a color meter, measured the CCT of the illuminant at around 4991K, and entered this data in the converter, it would be able to estimate its SPD thanks to the Standard Illuminant model without being too far off
Using a transform based on a generic CC24 ‘scene’ and the standard daylight ‘D’ source when the illuminant is actually the shown measured SPD – results in virtually identical deltaE 2000 residual color errors,[2] a mean of 0.95 over the 18 color patches plus mid-gray patch 22 of the ColorChecker in BabelColor’s 24 database.
This level of performance would only be possible if we knew the correct CCT. If the CCT were off, differences would become quickly noticeable as we will see below and in a dedicated article.
Standard Illuminant Models
So knowing the illuminant type and its CCT is often good enough, especially for the daylight range dear to outdoor photographers, say standard illuminants D45 to D65 – but also with many other man-made illuminant types. Color scientists have come up with a number of representative Standard Illuminant models, from Tungsten to Fluorescent to LED: just specify illuminant category and CCT to be able to estimate their Spectral Power Distributions, see for instance the model for Daylight and Incandescent black-body sources in the Matlab code in the notes.
For example these are the illuminant types that are bundled with Nikon’s own raw conversion software NX Studio and, one presumes, their cameras’ firmware:
Other converters are even more detailed, with very specific entries down to the light bulb maker and part number (e.g. RawTherapee). The more the merrier because the closer we get the better the relative color transform will be fine tuned for the purpose, witness for example the eleven entries above for a single illuminant type, Fluorescent light.
Non Standard Light
When the illuminant type at the time of capture is not present in the list all we can do is choose the nearest one. For instance the closest item in the list to the warm-white 2700K LED source below is ‘Incandescent’, but it is clear that an incandescent-based transform, even of the exact same CCT, would not be nearly as well matched as the earlier Natural light example of Figure 4, seen how different their SPDs are in the upper and lower wavelengths below:
Contrary to the previous Daylight example in Figures 4 and 5, using a pre-computed transform based on 2610K incandescent (blackbody) light with the shown measured SPD of the LED at the same CCT would almost double average CIEDE2000 errors from 1.10 to 1.90:
And this if the White Point / CCT of the illuminant were known perfectly. Should we not have a color meter at the ready, it can be estimated with a little guidance from our friends.
Cue the Gray Card
As we have seen in the last article, assuming we have an appropriate transform for the scene and lighting type, the critical problem of determining the White Point of the light source reduces to getting the white balance multipliers right. The camera / converter can then select a ballpark transform for the given settings to get a decent estimate of the White Point (CCT / Duv) – and as a consequence of the full-trip color transform in Equation 1.
Without any guidance from the photographer, the camera/converter is left to its own devices. Since cameras usually do not know what in the scene is a diffuse neutral object they take fairly wild guesses at it, with mixed results. As an example of just how wild, an algorithm that works surprisingly well in run-of-the-mill cases just assumes that averaging every single pixel in each color channel of a raw capture is indicative of neutral gray.[*] Recently AI has been helping to make the guesses more relevant, at least in the mobile world.
Camera manufacturers can help by supplying white balance multipliers in different conditions as designed. For example these are the multiplier categories that Sony provides in the metadata of its current cameras
Owners of this Sony camera could apply the named white balance multipliers as they are if they found themselves under such clear-cut light.
However, with minimal effort it is easy to measure the white balance multipliers accurately for the given scene – resulting in an instant improvement of the natural color transform. The photographer can help by first specifying the scene and illuminant type in camera/converter; then placing a neutral diffuse object in the capture, say a gray card; and finally pointing them to it, in-camera or in-converter, for instance via the eyedrop sampler usually found in the White Balance menu, like that in Figure 3.
The measured multipliers can then be used by the camera/converter to estimate the illuminant’s White Point and CCT as discussed – and/or to select or calculate a better fine tuned color transform. Properly capturing the light illuminating the scene’s main subject as reflected from a gray card effectively provides a partial color calibration for the shot as setup.
I’ve been happily carrying around different iterations of the credit card sized WhiBal for over a decade. Their claim to fame is that they are entirely made of the neutral-reflecting compound so if they are scratched the chromaticity should not change. They are waterproof and individually tested.
Position the card near the center of the capture so that it reflects light in the same way that your desired subject does. Try to stay away from flare and specular reflections by carefully avoiding offending families of angles. And make sure no part of you or your clothing is reflected in it. You can find better instructions on how to use a gray card in the notes. [3]
There is no need to have one in every shot, just when the main illuminant changes substantially.
A Card (and a Color Meter) at Every Critical Scene
It’s not easy to specify the illuminant precisely: the type can be wrong and/or the White Point & CCT can be off – in fact they often are, producing unnatural results. Reading the white balance multipliers from a gray card can be very helpful to the camera / converter, and it is something every photographer can easily do in the field. Measuring the White Point with a Color Meter would be even better, though some raw converters are not set up to put such information to best use (see for instance the discussion on interpolation in the next article).
So the next time you are having trouble with skin tones in the studio or greens under an overcast sky, you know what to do to help your camera/converter produce more natural colors: specify scene and illuminant type, and take a reading of the light with a color meter. In addition, or as a poor photographer’s alternative to the color meter, take a capture with a gray card in it to record the White Balance Multipliers for the scene.
With white balance multipliers, White Point and scene type in hand a camera/converter has all the information it needs to produce beautiful natural tones in the output color space of choice.
Next, what happens if white balance is off.
Notes and References
1. Mired units are used to interpolate between illuminants because it was noted that just noticeable differences are based on the difference of the reciprocals of their temperatures, rather than the difference in the temperatures themselves. See for instance here.
2. The CIEDE2000 specification is a measure of color difference, with a value of one supposedly representing a just noticeable difference for a typical observer, you can learn more about it in this wikipedia page.
3. Kodak had a good set of instructions for using one of their gray cards going back to film days. Its purpose was slightly different but just as relevant as far as set up is concerned, you can see them here.
4. The Octave / Matlab routines used to produce the plots in this page can be downloaded by clicking here.