How to Make a Camera Input Profile Target Shot
When making a camera profile, the better the target chart shot, the better the resulting camera profile. This article explains how to make a good camera input profile target chart shot, including picking the right target chart, choosing the right lighting, preparing for and making a series of target shots at increasing exposure values, and picking the target shot with the best in-camera exposure.
Written June 2015.
Preliminary considerations about target charts and camera profiles
Yes, you really can make a general purpose camera profile
Sometimes you'll see the claim that you can't profile a camera unless you are making a Look-Up Table ("LUT") profile for controlled studio lighting. This claim is errant nonsense. You absolutely cannot interpolate a camera raw file to get an actual image file without using a camera input profile (well, you can, but you won't like the resulting colors). So if you don't supply your own camera input profile, then your raw processor must use a camera input profile that was made by someone else. For example, the dcraw c code "adobe_coeff" table contains matrices that are used to generate camera input profiles for most of the cameras that are supported by dcraw (a few cameras use different processing). These dcraw matrices are used by a wide variety of free/libre and commercial raw processors, including Adobe PhotoShop. These dcraw matrices were all made using target shots from the various cameras. Many raw processors also offer alternate camera profiles for selected cameras, and these alternate profiles are also made using target chart shots and profiling software, exactly as you can do for your own camera after you make a target chart shot.
Which target chart should you use?
You can make your own target chart if you have the right equipment. But most of us will settle for a commercially made target chart. The number of color patches on commercially available camera input profile target charts ranges from 24 patches to around 300-600 patches, with varying numbers of pigments used to make the colors, color patch distributions, and prices (prices given below are current as of March 2015 and given in US dollars):
- According to the ArgyllCMS documentation on target charts, "The ColorChecker SG is relatively expensive, but is preferred by many people because (like the ColorChecker and ColorCheckerDC) its colors are composed of multiple different pigments, giving it reflective spectra that are more representative of the real world, unlike many other charts that are created out of combination of 3 or 4 colorants."
- The Macbeth ColorChecker chart has 24 patches, which the ArgyllCMS documentation says really isn't enough patches to make a good camera input profile, and costs around $70.
- The ColorChecker SG chart has 140 patches and costs around $260.
- The Wolfe IT8 target chart has 288 patches. The pigments aren't as good as the ColorChecker charts, but the distribution of the Wolfe IT8 color patches turns out to be not too bad. The Wolfe IT8 target chart costs around $30 (and somewhat more if you want a custom-measured rather than a batch-measured target chart), so is a good choice to start with, even if you later decide to buy one of the more expensive target charts.
- The 400- and 600-patch Christophe Metarie target charts don't seem to be available any longer (the website links don't work), or else might now be called CMP target charts and probably are made using only three pigments (if you read the linked-to forum post, keep in mind who is speaking: Andrew Rodney very knowledgeable but something of an Adobe fanboy; Ben Goren photographs artwork for a living, so has a high personal stake in making good camera input profiles; also, products change, and people change their minds based on experience, and so what was said by whom back in 2009 might not reflect the current situation). The CMP target chart costs around $100.
Preferably, make your general purpose target chart shot under wide spectrum D50 lighting
The colors in your target chart were almost certainly shot and measured under controlled D50 lighting (otherwise you probably have the wrong reference file for your target chart).
So for a general purpose camera input profile, it's best to make a target chart under full spectrum lighting that's as close to D50 as possible.
Morning sunlight as a "close enough" full spectrum D50 light source
The sun is the world's best full spectrum light source, and in most parts of the world is standardly available as direct sunlight, daylight, skylight, and also as fully diffused by a suitably uniform cloud cover. See Seeing the Light and Natural Light in Photography for nice overviews of the difference between direct sunlight, daylight, and skylight.
If you search the internet for information about the color of direct sunlight (not to be confused with daylight or skylight), you'll find various charts such as handprint's article on color temperature (scroll down to the section on Correlated Color Temperature), Apogee Photo's White Balance and Color Temperature in Digital Photography and page 34 of the Kodak film Cinematographer's Field Guide. I don't know where to find definitive values. But the aforementioned sources all give the exact same color temperatures for direct sunlight at various times between sunrise and noon:
- When the sun is at the horizon (by definition, 0 degrees from the horizon): 2000K
- One hour later (in mid-summer/mid-latitudes, very approximately 10 degrees from the horizon): 3500K
- Early morning (in mid-summer/mid-latitudes, very approximately 25 degrees from the horizon): 4300K
- Noon (in mid-summer/mid-latitudes, very approximately 70 degrees from the horizon): 5800K
So assuming the above information is accurate, then sometime between early morning and noon, at least in the mid-latitudes in the summer, the color of direct sunlight on a clear day has to pass through 5000K. For purposes of this article, assume that "D50" and "5000K" are interchangeable (they aren't, but when making a target shot in direct sunlight, they are close enough).
So to make a best and very convenient "guesstimate", let's guess that on a crystal clear day in mid-summer, in the mid-latitudes, when the sun is 45 degrees from the horizon, the temperature of direct sunlight is reasonably close to 5000K, or D50.
When the goal is making a target shot in direct sunlight when the temperature of the direct sunlight is reasonably close to D50, I'm pretty sure that what really matters is the angle of the sun from the horizon, and not the actual time of day, or the latitude of your location, or the season of the year. There are in fact complicating factors over which you might not have much control (what's your altitude? how many dust particles are suspended in the air? have any volcanoes erupted recently? etc). But as a practical, "best guess effort", the main thing is the angle of the sun from the horizon.
But the day really does need to be clear. "Clear day" means a crystal clear blue sky, with crisp shadows on the ground.
How to use direct sunlight as your "close enough to D50" light source
- Figure out what time the sun reaches 45 degrees from the horizon, and make your target chart shots within about 10 minutes of that time. The Sun or Moon Altitude/Azimuth Table tells you what angle the sun is from the horizon at any given time and place.
- Pick a spot where there are no reflections bouncing off of nearby brightly-colored objects (for example, you don't want reflections off a bright red panel truck parked near to your target chart).
- Have an assistant face the sun (your assistant will probably want to wear a hat and sunglasses) and hold the target chart perpendicular to the ground. Or figure out a mounting system that will hold the target perpendicular to the ground (it's a lot easier to have an assistant hold the target chart).
- Hold your camera perpendicular to the ground, level with, and directly facing the target chart, with the sun at your back. Or put your camera on a tripod centered on and directly facing the target chart. Your shadow (or your tripod's shadow) should be pointing in the direction of the target chart.
With the above setup, the sunlight will strike the target chart at a 45 degree angle, which minimizes glare on the target chart. And the color of the direct sunlight hitting the target chart will be as close to D50 as you can reasonably expect to get without expensive full spectrum controlled D50 studio lighting.
When you can't use direct sunlight as your "close enough to D50" light source
If your weather is perpetually cloudy, all is not lost. Making a target shot outdoors when the sky is uniformly cloud-covered means you don't have to worry about glare on the target (always a plus). When the daytime sky is uniformly cloudy, the temperature of the light on the target will be closer to D65 (or even higher) than to D50. But at least it will be affordable full-spectrum lighting, and the profile-making process will compensate for the difference between your actual lighting conditions and D50 light.
It's neither cheap nor especially easy to set up wide-spectrum controlled D50 studio lighting in such a way as to uniformly illuminate the target chart without causing any glare on the target. So unless you are prepared to lay out the money to set up a proper studio, in my opinion full spectrum natural lighting from the sun is the best way to go, be it direct sunlight, daylight, skylight, or sunlight filtered and dispersed by a uniform cloud cover.
How to make a target chart shot
Now that we've discussed target charts and lighting, the next step is to make the best possible target chart shot. Before you rush out and start snapping photographs of your target chart, there are several things to consider:
If necessary, mount the target chart on something flat
I don't have any hands-on experience with other target charts. But eventually my Wolfe IT8 target chart ended up warping a bit across the width of the chart. So I used push-pins around the edges to mount it to a flat corkboard. I think newer Wolfe IT8 target charts might have a more substantial backing. But heat from sunlight is very capable of warping just about any surface it strikes. So depending on the target chart, mounting your target chart might be a good precaution. Proceed at your own risk, especially if you use adhesives that might interact with the colors on the target chart.
Mount or place the target chart on a dark background
For some reason everyone's initial impulse is to put their target chart on a white background. Don't do this. If an assistant will hold the target chart for you, ask your assistant to wear dark clothes. Better yet, also mount the target chart itself on a dark, matte background. This is to avoid a situation where very bright areas in the area surrounding the target chart can cause a localized "veiling glare" when juxtaposed next to dark areas in the target chart itself.
Optionally, include a black trap to the target chart to compensate for camera veiling flare
A simplifying assumption, that is good enough for making a general purpose camera profile for most cameras, is that the camera sensor responds linearly to light over most of the camera's useable dynamic range. In reality, camera veiling flare pretty much guarantees that the sensor's response to light isn't really linearly proportional to the amount of light entering the lens from the scene that's being photographed. I'm not talking about the more obvious type of lens flare that can be eliminated by using a lens hood or pointing the camera away from the scene light sources. Rather I'm talking about light getting into the lens or camera and randomly bouncing around before hitting the sensor.
This "random light bouncing" might be from reflections off of dust particles in the lens or in the camera, or off the inside of the camera body, or off the surfaces of the various optical elements in the lens and any lens filter you might be using, or from any number of other sources. The resulting "camera veiling flare" is equivalent to adding a certain fixed amount of exposure to all portions of the sensor, as if another light source had evenly added a little bit of light to every item in the scene being photographed.
By its very nature, camera flare varies from lens to lens, scene to scene, the amount of dust inside the camera and lens, and for various other more or less unpredictable and uncontrollable reasons. So for those of us who want a general purpose camera input profile, there is no such thing as "just the right amount of compensation for camera flare". But there is an easy "good enough" solution: Put a black trap in the target shot. A black trap will at least get you in the right ballpark, allowing you to set a black point for your target chart shot before you make your camera profile.
Black traps can be made at home, to varying degrees of sophistication. A small box with the interior and exterior lined and covered with a black matte paint or cloth or other material, and with a small opening in the side of the box facing the camera, will do nicely. A more sophisticated DIY black trap uses an upside down ice cream cone shape to reflect light that enters the cone in such a way that it can't be reflected back out of the cone.
Optionally, include a white balancing aid and/or a DIY "Lambertian reflector" to the target chart
Camera target charts always include color patches that are more or less neutral, and so can be used to white balance your target shot before you feed the target shot to your profiling software. But ink and paper limitations mean that many (most?) target charts don't include any absolutely neutral color patches. So you can go out and spend varying amounts of money on commercially made white balancing aids. Or you can include various DIY alternatives (that by all accounts are just as good or even better than the commercial products) in your target shot. For example, try PVC white plastic, several layers of clean white coffee filters, or a clean white styrofoam cup.
A more sophisticated alternative is to include a folded up length of Teflon thread seal tape in the target shot. Ben Goren, whose posts on the ArgyllCMS mailing list are well worth reading, says that white Teflon thread seal tape is not only very close to being absolutely neutral, but also very close to being 100% diffusely reflective. This means Teflon seal tape is an affordable substitute for a Lambertian reflector, and so can be used to white balance your target shot and also to set the exposure compensation while you are raw processing the target shot.
Evenly illuminate the target chart
A major problem when making a target chart shot is getting the illumination absolutely even across the target chart. Fortunately direct sunlight is very uniform (after travelling 92,960,000 miles from the sun to your target chart, the rays of direct sunlight that hit your target chart are essentially parallel). Daylight, skylight, and the diffuse light from a uniform cloud cover also are all very uniform light sources (though swiftly changing cloud cover presents obvious problems, which is why I keep specifying "uniform cloud cover").
In the studio, to get even illumination you'll need to set up multiple light sources. In a small home "table top" studio, getting uniform lighting is a frustrating exercise, so go outside and use the sun's light instead.
Eliminate glare off the target
A second major problem when making a target chart shot is eliminating glare off the target chart. Assuming the target chart itself is absolutely flat, holding the target chart at a 45 degree angle to the light source is the best way to eliminate glare off the target. Very conveniently when using direct sunlight as your light source, when the sun is 45 degrees from the horizon, all you have to do to get that 45-degree angle is face the sun and hold the target chart perpendicular to the ground.
In the studio, you'll need to angle either the lights or the target until there's no glare off the target. Using a matte target does help, but glossy targets can accomodate a greater range of colors.
Pick the right f-stop
Stop down to whatever f-stop is sharpest for your lens-plus-camera, before diffraction takes over. See Cambridge in Colour's Diffraction Limited Aperture Estimator for a quick calculation. For more information on diffraction, see How the Nature of Light affects the performance of digital cameras.
Some people say to throw the target chart out of focus but I don't think that's good advice — if the target chart shot is out of focus then your profile-making software can't factor out blemishes on the target chart or dust spots in the target chart shot.
Frame the shot
Fill the center 1/2 to 2/3rds of the frame. You don't want to completely fill the frame because light drops off towards the edges of the frame.
Set the initial exposure and make a series of shots, each time increasing the exposure by a half-stop
Starting with what your in-camera light meter tells you is the right exposure, make successive exposures, each time increasing the exposure value (how long the shutter is open; keep the f-stop constant). Go as much as 3 or 4 stops past (in half-stop intervals) what your camera told you was the correct exposure. The camera histogram will tell you that the image has clipped pixels long before any target chart pixels in the raw file are actually clipped (unless, and sometimes even if you are using UniWB).
How to identify the target shot with the best in-camera exposure
Well, assuming you want to make a general purpose camera profile, that's all there is to making a good target shot. The next step is to pick the shot with the best in-camera exposure. So open each exposure in turn with your raw processor of choice and look for the brightest in-camera exposure that doesn't have any blown pixels in any of the channels of any of the color patches:
- If you included a properly folded-up strip of white Teflon thread seal tape, pick the shot with the highest in-camera exposure, that doesn't have any of the pixels in the Teflon thread seal tape blown in any of the RGB channels. Do also check the color patches for blown pixels, but if any of the color patches are brighter than the Teflon thread seal tape, something went very wrong somewhere in the target shot making process.
- Otherwise reject all the target shots that have any blown pixels in the color patches. Pick either the brightest exposure that doesn't have any blown pixels in any of the channels of any color patches, or to be on the safe side, the exposure that's a half-stop down from the brightest in-camera exposure that doesn't have any blown pixels in the color patches (blown pixels elsewhere in the image, such as a white cloud in the sky behind your assistant, aren't a problem as long as the target chart itself is centered on a dark matte background).
As an important note, what you are really interested when you check for blown pixels is pixels that are blown in the raw file. This is relatively easy to do with UFRaw, because you can dial in (1,1,1) for the RGB multipliers, which is the same as using UniWB as the in-camera white balance. It's not so easy to do with RawTherapee unless you actually used UniWB as the in-camera white balance, because RawTherapee doesn't provide for using the RGB multipliers to set the white balance.
When you set the actual white balance during raw processing, the red channel values will be multiplied by around 2, which might drive some of the color patches into the "clipped" range, but then you just apply a little true negative raw exposure compensation to bring all the channel values below 255 (on an 8-bit scale; 65535 on a 16-bit scale, and 1.0 on a floating point scale). (RawTherapee does allow for applying true negative raw exposure compensation, but alas UFRaw does not.)
And you are done with making target chart shot. The next step is to use ArgyllCMS to make your camera profile. If you think you want to make a general purpose camera profile that isn't a simple linear gamma matrix profile, you might want to read When profiling your camera with ArgyllCMS, what type of profile should you make?