This web page Copyright (c) C F Systems, 2005

Dunthorn Calibration

This document was originally written in 2005 and has been kept available mainly for historical continuity. Most of what is stated here remains true today (nearly ten years later) but it is incomplete, particularly if dealing with digital camera images. The ColorPerfect plug-in is both more complete and easier to apply.


Digital color image calibration has become so complicated that most people are forced to accept that it must be right, either automatically accepting it right out of the box or after fussing with it long enough to get results that seem to look good. Sometimes the results are good, but often a nagging feeling remains that something isn't quite right. In fact, the commonly available and accepted tools of digital imaging are quite capable of introducing quite large color distortions.
Dunthorn Calibration starts with a reasonably easy-to-perform test involving a grayscale, which can test nearly any method you currently use to enter photographic images into the computer. Why just a grayscale? Read on. Why such a long web page if it is an easy test? The test is easy. Fixing any problems found by the test may not be easy.

To understand the need for Dunthorn Calibration and why it works, it is first necessary to understand that despite its name, that flagship of digital imaging Adobe Photoshop has never been about photography. Since the beginning, Photoshop, like other Adobe software, has had its largest market and main interest in the press world and ink printing. The emphasis has always been on the printed page and the expertise has centered about the requirements of the printed page. There is a fundamental difference between the way color is treated in photography and in dealing with printing with ink. This has resulted in a failure in Photoshop and consequently in digital photography in general to recognize the fundamental importance of a principle which every color film photographer knows – or used to know – if the grays aren't right, nothing is right; if the grays are right, everything is right (we will call that the Gray Rule). This rule is rooted in the fact that – unlike the press and ink printing world – color photography is strictly based on a system of three primary colors where any gray comprises colorimetrically equal quantities of the three primaries. This is true even when making a color print on photographic color print paper.

When printing with ink, more than three colors are used and typically one of those colors is black, which when mixed with paper white forms all shades of gray all by itself. This basic fact makes the Gray Rule meaningless in the ink printing world. In ink printing, getting good color is a separate problem from getting good grays. With the addition of black, there is a great deal more freedom in choosing ink colors for maximum effect and quite complex corrections are sometimes required to get the most out of ink printing. Of course, the flexible and powerful ink printing mathematics will also deal with systems of three primary colors such as found in film, digital cameras, and scanners. That mathematical system has been adapted and used to deal with color photographs from these sources since the earliest days of Photoshop. This has worked to the detriment of digital photography, first by leading to the loss of the Gray Rule and second, by allowing adjustment methods to develop which tend to distort color in three-color systems instead of correcting it. In addition, the computer display itself is derived from color television and many currently used adjustment methods were originally devised to deal with color television. There, although the original image is formed in the three primary RGB system, it is converted into a non-primary system – NSTC YIQ, PAL YUV, et al. – for broadcasting and "Y" is basically a grayscale component. Thus in video, all color adjustments at the receiver end have been forced to deal with this non-primary system and these adjustments have become part of digital imaging.

With Dunthorn Calibration we attempt where possible to catch the image where it still represents unadulterated R, G, and B intensity ratios. At this point the Gray Rule applies and in following that rule the true colors of the photographs emerge. The effect sometimes is quite spectacular if you have not seen it before. Our document CFS-243 Maintaining Color Integrity in Digital Photography explains how these intensity ratios relate directly to the physics of illumination and why and how all basic photographic color adjustments should be made using these intensity ratios. Another document is in preparation in this series on the mathematics of photography that will deal with the mathematics of Dunthorn Calibration.

The method, theory, and reasoning described here are original with C F Systems.
©2005 by C F Systems, in total and in part, all rights reserved.
Please contact us for terms and conditions if you wish to use any of this material in any printed or electronic publication. We do not plan to make this a problem for those who ask.

The Basic Idea
Why Just Gray?
Do I Really Need A Grayscale?
Printing the Grayscale
. An Alternate Way of Producing Grayscales
The Calibration Test
The Calibration Test - Image Setup
This Test Has Got To Be Wrong
Diagnostic Summary
The Objective
An Important Philosophical Point
Specific Applications
. ColorNeg
. Photoshop RAW
. Using Photoshop Levels to Make Calibration Adjustments
Setting the Color Balance
Calibrating Existing Images
Gray Is Not Even Really Necessary

The Basic Idea

The Dunthorn Calibration technique is basic enough in its approach to be fully understood and one can thus be confident of its validity. That is important because when the results say the method you have been using is flawed – as may well be the case – understanding that the test is valid will give you the confidence to follow through and find the source of the problems.

Originally Dunthorn Calibration was planned to deal just with scanned color film negatives, but it became evident that the same basic technique applied to digital cameras even more exactly and to other scanned images as well. Although the calibration test that will let you know if you have a problem with entering photographic images into the computer is fairly straightforward, we warn you in advance that if there are problems, Photoshop does not make it easy to correct them. As it stands today, when corrections are necessary Dunthorn calibration is definitely not a "cookbook" method. It will take work to understand the method and to make it come out well, but it is worth the effort.

Calibration need not be done for every new group of images, although it is wise to check a calibration now and then. For instance, it is to be expected that a calibration will be reasonably valid for all color negatives taken on the same type of film – say Kodak Gold 100 35mm – and given similar processing. We have less experience with different digital cameras, but it is expected that either all images from a specific camera will have similar calibrations or at least all images in similar categories – say high light level or low light level – will have similar calibrations.

Start with a stepped grayscale (download grayscale tiff file).

Jpeg Approximate Grayscale

For accuracy it is preferable to work with the downloaded tiff file rather than with the jpeg image of the same scale displayed above - the jpeg is approximate. This grayscale, which you may generate for yourself if you prefer, is an RGB image and has successive gray pixel values of 13, 38, 64, 89, 115, 140, 166, 191, 217, and 242. There are ten steps (nearly) evenly spaced with 25.5 counts between each successive step. The scale starts at 13, so it is not fully black at the one end and it stops at 242, so it is not fully white at the other. This choice of scale does not correspond to photographic f-stops nor visually evenly spaced grays. The reason for choosing it is that the histogram produced by the Photoshop Levels tool looks like an evenly spaced picket fence:

Moreover, this will be true whether you are operating Photoshop under Windows or on a Mac, or even if you have a non-standard setup, such as linear gamma. This means that any image accurately derived from this grayscale will also have a levels histogram that looks like an evenly spaced picket fence and because the scale is gray, the histograms for all three colors R, G, and B, should show the same picket fence with the pickets in the same positions. This is what is meant by each gray being a photometrically equal mixture of the three primaries. It is not unusual in digital imaging to have a situation in which the peaks for the three colors align well in one part of the histogram and do not align well in another part of the histogram. When that happens, we say that color integrity has been lost. Some colors will look OK while others do not and it is very confusing to the eye. Color Integrity is lost when the picket fence is unevenly spaced even if the pickets are the same for all three colors. In this case the grays will appear as gray but other colors will still be distorted. Thus for complete color integrity the pickets must match for all three colors and be evenly spaced as well. [CONTENTS]

Why Just Gray?

Doesn't accurate calibration require color – Macbeth charts or something similar? The short answer is that with digital cameras, scanners, and film cameras (but not printers) if you get the grays to work properly the colors will follow and until you get the grays to work properly the colors will never be correct. Digital cameras, scanners and film camera - scanner combinations are basic three primary color systems in which color intensities follow simple color mixing laws to a very good approximation and are thus well behaved mathematically. For most photographers any further "corrections" to images will be a matter of artistic taste and not of calibration. While color calibration targets can be useful and do have their place beyond printing in digital photography, their current widest use is to assist in making Band-Aid solutions to undo previous inappropriate image adjustments. If you want to understand how far off your color can get without your realizing it just from using adjustments inappropriate to an RGB system, visit our web page on Color Integrity or read our mathematical document CFS-243 Maintaining Color Integrity in Digital Photography. If it does not become clear from the following, our upcoming mathematical treatment of Dunthorn Calibration will also explain how the five step grayscale that is part of the Macbeth chart is not very suitable for doing this color integrity calibration.

With the widespread emphasis on color management in digital photography and the absolute necessity of color management and profiles for producing acceptable inkjet prints it is understandable to be concerned about color management at this point. We urge you to put aside those concerns until you see what proper calibration can do for your color. Color management cannot give you good color until the image has color integrity. Color management is confusing, full of pitfalls and widely misunderstood and misused. Rather than add to this confusion, we intend to be sure we have thoroughly and correctly analyzed the reality of color management before we comment on the topic. Meanwhile, we believe that as your images gain color integrity from proper calibration, you will be better off no matter how you handle color management (as long as you use proper profiles for printing). [CONTENTS]

Do I Really Need A Grayscale?

Suppose you have no way to reproduce images similar to the ones which you need to deal with. The digital camera or the type of film used to make the images of interest is unavailable. There is no way to produce a new image containing a grayscale. All is not lost. Look at the end of this web page (Calibrating Existing Images) for a means of applying partial Dunthorn Calibration to existing images. It does not work for all images, but if you are dealing with a group of several different images from the same media, there is a good chance that at least one can be used. [CONTENTS]

Printing the Grayscale

To make this grayscale useful for testing we must visit the very core of the "enemy camp" of ink printing and depend upon them to have done their job correctly. We must have an accurate paper copy of the grayscale that can be photographed and/or scanned into the computer so we can compare the results to see if we accurately get the picket fence back. For this one step you will need to have access to known-good printing technology; a photo quality printer that is known to transfer an image to paper accurately. For this step we strongly recommend using a quality printer with the printer manufacturer's ink, the printer manufacturer's favored paper (usually glossy or premium glossy) and the manufacturer's ICC profile that is specifically for that printer with that paper and that ink. Note that this means printing the grayscale as a color image. The following is a Photoshop Print with Preview set up for an Epson 2200 with Epson Premium Glossy paper. Make sure the printer is set up to print with ICC color control (on a PC) or the equivalent on other systems and that the printer is set up for the specific type of paper being used. Doing that correctly varies for different printers.

We have found that (as one might hope) this process produces an acceptable print with the Epson printers we have tested. There is reason to hope that ink-jet printing and dye-sublimation printing in general are among the more accurate, results-driven processes in digital photography. The use of profiles, ink, or paper other than the manufacturer's is not advised for this step even if you feel that you have a more accurate ICC profile or a more accurate way of making prints. The reason for this is that custom profiling is very often biased toward making the print match the display, whereas we need the print to match the actual content of the file.

This is a critical step. Examine the resulting grayscale carefully. You should be able to readily see all the steps on the scale. If it looks bad, particularly if it shows more than an extremely minor color cast, reexamine what you have done; that should not be the case. You may be using the wrong paper, the wrong profile, the wrong ink, or have something set incorrectly in the printer setup or even in Photoshop itself. Letting the printer driver do the color management rather than Photoshop is worth a test. Set Photoshop's profile to "Same As Source" and in the printer setup select printer color management (which varies with the printer). By printing the grayscale specifically in color we not only enable the use of the ICC profile, we trigger a diagnostic for a potentially serious problem. If your printer cannot correctly print a grayscale, you cannot expect to get satisfactory color prints from good image source files. Conversely, if you have been getting what you consider satisfactory prints from a system that cannot correctly print a grayscale, something in your normal work train has been put seriously out of balance to compensate. In that case the image files you have been producing are non-standard and they will become a serious problem any time you change your system in the future.

Allow the print to dry thoroughly and then affix it – taped edges are usually the most satisfactory as they do not involve applying anything that might wrinkle the paper – to a mounting board that will keep it perfectly flat. This is very important, as any curvature or wrinkling of the paper will lead to uneven illumination on the scale when it is being photographed.

When we wrote the above paragraphs we believed that the manufacturers of serious color photographic printers had gotten it right - or at least right enough to print a gray grayscale. Apparently we were overly optimistic about the state of digital photography. We have received reports that some people are having trouble producing a usable Dunthorn Grayscale using printer manufacturer's specified paper, ink, and profiles. That certainly fits with what we have been saying earlier about the current state of digital photography! Photographer's "quality" color printers unable to print even gray properly! Although we were able to produce usable grayscales in several cases, there have been enough reports of problems that we have a page describing an alternate way of producing grayscales close enough to the Dunthorn Grayscale to fit our requirements. The alternate method is more difficult but even if you have produced a grayscale you believe is satisfactory we currently recommend going though the alternate method as a double check. [CONTENTS]

The Calibration Test

The next step is to photograph, scan, or photograph and scan the grayscale image into the computer by your standard method and look at the resulting histogram of just the grayscale part of the image. Be sure the illumination is even over the entire target. Do not allow shadows or bright spots to appear; diffuse illumination is the best. Also, do not make the grayscale fill the frame – leave some room at the edges (technically, this avoids most of the cosine to the fourth power falloff effect). It is extremely important to determine exposure as carefully as possible, using the grayscale as the target – the fifth or sixth square for a point target if you expose for midtones, the whitest square if you expose for highlights. Bracket the exposure if possible; that is, take at least three images, one darker and one lighter than the one that should be correctly exposed. If at all possible, produce 16 Bits/Channel images to work with. Treat the images as you would your normal work stream. The Levels histogram will be diffuse compared to the original, ideally looking like the histogram below although the spikes in the shadow areas will typically be broader than those in the highlights.

To produce this histogram, make sure that the image has been cropped so that it includes only the grayscale with no surroundings, and Image→Adjust→Levels. It may be found that the peaks of the histogram are quite spread out, with the spikes barely showing above a dark "platform" in the histogram. That is the mark of a noisy system; not necessarily a bad thing, as film images sharp enough to show grain are a prime example. We normally take the counterintuitive step of blurring the grayscale image. Filter→Blur→Gaussian Blur, with a pixel radius somewhere 4 to 10 pixels should work to considerably sharpen the peaks in the Levels histogram, showing the spikes clearly.

The leftmost spire should center somewhere around 13 and the rightmost somewhere around 242. In between the squares should read 38, 64, 89, 115, 140, 166, 191, and 217 as in the original grayscale.

Any significant departure from this even spacing across the range means that the image is flawed. Exactly how far the reading can be off before the difference is significant is a matter of equipment and judgment.

It is very likely there will be differences between the three color channels R, G, and B so that the combined RGB may show what appears to be a clutter of additional spikes. Observe the changes by going from channel to channel in the Channel pulldown in the Levels dialog (above). Some flaws are normal at this stage and can easily be corrected, while others cannot.

If the picket fence histogram is not perfect (as is quite likely), the extent of the problem can be assessed by adjusting the image as best it can be without distorting colors. Here we will correct the overall lightness of the image. If you have already made corrections specifically aimed at that, go back prior to those corrections, including any highlight brightness corrections.

Note: If in the following adjustments the two lowest squares read very nearly equal to one another and the values closely follow one another regardless of the adjustment, the image has been underexposed either in the taking or the processing. If the two highest squares read very nearly equal to one another and the values closely follow one another regardless of the adjustment, the image has been overexposed either in the taking or the processing. Do not attempt to go any farther with an image that is underexposed or overexposed. Go back and produce an image with the correct exposure. [CONTENTS]

The Calibration Test - Image Setup

With the grayscale image loaded into Photoshop, select the grayscale area so that only the grayscale will be affected and use Filter→Blur→Gaussian blur. Select a radius that is sufficient to make the grayscale steps fairly uniform, typically a radius in the 4 to 10 range. This blurring will actually sharpen the peaks in the histogram. Set the eyedropper by clicking the eyedropper tool button in the main tools palette and setting its dropper size to 5x5. Now use the Photoshop Levels tool to set the gray tone. Very likely this will be done differently than you may expect. First, click the right, highlight eyedropper in the levels tool:

Then double-click the same dropper button and the Color Picker dialog box will appear:

R, G, and B, show the value of 255 above. Enter a value of 242 for each of these and click OK. The mouse cursor appears as a dropper. Use it to select areas in the lightest square of the grayscale image. Pick several points and stop when the Levels histogram seems to bounce about the least.

Now OK the Levels dialog. Probably a message box will inquire whether you wish to save the new target colors as defaults. Answer No.

At this point the image has been corrected as best it can be without altering its color integrity. The Levels histogram should look like the evenly spaced, slightly diffuse picket fence although the darkest steps can be expected to be more diffuse than shown. Pixel value readings from the grayscale cells should track quite closely the 13, 38, 64, 89, 115, 140, 166, 191, 217, 242 sequence used to set up the original and the histograms for the R, G, and B channels should lie very nearly on top of one another. This can be checked by pulling up the Levels tool and leafing through the color channels. Insofar as this is not the case, it indicates a problem with the means you are using to get images into your computer.

It is very difficult to get the darkest step in the grayscale to read 13 even when the blackpoint is set as closely as possible to the correct value. If the other grayscale values are close to correct and show no trends, the calibration is probably good even when the darkest grayscale square is somewhat off. [CONTENTS]

This Test Has Got To Be Wrong

At this point it is worth reviewing the situation. We believe it will be common – very common – to find an indication of fairly serious problems at this point and of course it is human nature to first suspect the test – especially if you are using expensive equipment.

Remember that all we have tried to do is to take a known source image and see if a camera, scanner, or a film camera followed by a film scanner can accurately reproduce that source. It is very important that the grayscale be evenly illuminated when taking the test image. Diffuse lighting helps, as does not having a light source close to the grayscale. The primary symptom of poor lighting is that the image will show significant variation in eyedropper readings taken from different areas of the same gray square. It is also very important that the exposure be correct – the test image is underexposed if the steps at the dark end of the grayscale blend and overexposed if the steps at the light end of the grayscale blend.

There is also a possibility that the print of the grayscale file is not good. If done as described, printing with the printer manufacturer's ink on the manufacturer's paper, with the printer set up for that paper and set up to use the manufacturer's ICC profile for that paper, a print suitable for these tests is a very likely result. But if the print remains a suspect, try to get a print from a different printer. Make sure the type of computer is the same as yours, PC or Mac, and that the Photoshop setup is the same (this normally will insure that the system gamma is the same as yours, which is necessary for the picket fence to work properly). Try mounting the newly and independently printed grayscale on the same flattening board with the first print so that the two can be scanned or photographed together. Again, be sure the illumination is even over the entire target. Do not allow shadows or bright spots to appear. If the two printed targets behave similarly, it is good evidence that the test is valid. If they are definitely different, then one or the other printer is not set up properly or is not working properly.

There may remain a question in your mind about whether the adjustments made with the Levels tool, as described above, can cause a problem. Those adjustments, however, were made only after the standard treatment being tested already had been applied and had failed. Thus those adjustments can have had no part in that failure.

If the printer passes its test and the test image has been properly taken under good lighting conditions and the test shows flaws, then the flaws detected by Dunthorn Calibration do exist and should be corrected. [CONTENTS]


Now that we know we have problems, what do we do about it? To some degree the answer depends upon the source of the image, but in any case we have three tools to work with. One of these tools is overall exposure or its equivalent. In Photoshop the tools for adjusting overall exposure in each channel (R, G, and B) are the highlights sliders on the Levels tool. In ColorNeg the tools are the highlight settings and other image sources should have similar highlight adjustments. Here we will use exposure to establish a fixed reference point. We will make test adjustments for blackpoint and gamma in the image source program if at all possible. The blackpoint should be set as accurately as possible and as early as possible in any process of reading an image into the computer. Each time immediately after loading an image from the source into Photoshop, we will use the Photoshop Levels highlight control to adjust the uppermost peak to 242, 242, 242 in order to make comparison consistent. Rather than repeat the method here, this is done just as described in the tests in The Calibration Test - Image Setup.

You will be trying to determine effective blackpoints and gammas for each of the three colors, R, G, and B by applying trial values of blackpoint and gamma and then comparing the result with the following diagrams. In analyzing the three channels, remember that they are independent. That is, adjustments on one channel will not affect the other color channels. As you go, it will probably be easier to work on adjusting all three colors, but look at each color histogram separately to determine the proper adjustment for that color.

We use diagrams like the following to illustrate what needs to be done:

Reference Diagram

This is the reference diagram, representing the ten evenly spaced spikes on the histogram as it should appear when you are finished. As such, it is the target – the histogram for the final positive image. To understand what needs to be done to reach this target, first it is useful to see what happens to the histogram when the blackpoint is not correctly set and when gamma is not correctly set. The histogram can be seen in Photoshop by using Image→Adjust→Levels and selecting the Red, Green, or Blue Channel.

In the following, recall that in each case the lightest grayscale step has first been adjusted to about 242 as explained above. First, with the blackpoint set too low:

Blackpoint Too Low

Note that when the blackpoint is too low, there is a gap at the low end and the peaks at the low end are closely spaced while the peaks at the upper end are nearly evenly spaced. The blackpoint affects the dark steps much more than the light steps. The gap at the dark end, with the first peak placed too high (too far to the right) is the primary characteristic of having the blackpoint too low, but it also lowers overall contrast in the image. If the blackpoint is set too high, the pattern looks like this:

Blackpoint Too High 1

Here the peaks at the upper end remain evenly spaced and now the peaks at the lower end spread out. In a more extreme case, one or more of the peaks at the dark end may even "fall off the edge" and become completely black:

Blackpoint Too High 2

The important thing to recognize is that the blackpoint has a large effect on the spacing of the histogram peaks at the dark end of the grayscale. With blackpoint too high, the change in the distance between peaks increases markedly toward the darkest grayscale squares. The effect on the histogram peaks on the lighter end is uniform but is nonetheless an expansion of distance between peaks. Thus increasing the blackpoint increases contrast and does so evenly except for the darkest shades.

When the gamma is set too low, the resulting histogram will look like this:

Gamma Too Low

Here the darkest peaks are spaced out more widely, similar to when the blackpoint is set too low. However, the effect of gamma being too low causes spacing between the peaks to gradually decrease over the entire grayscale. The spacing of the high peaks is not even, as was the case with the blackpoint being set too low. A gamma that is too low increases contrast at the dark end of the scale while decreasing contrast at the light end of the scale.

Gamma Too High

With the gamma too high, the spacing is compressed at the dark end of the histogram, as is also the case when the blackpoint is set too high. However, the effect of too high gamma is spread across the entire histogram as a gradual increase in spacing, while the uneven spacing effect of high blackpoint is entirely at the lower end. A gamma that is too high decreases contrast at the dark end of the scale while increasing contrast at the light end of the scale.

In order to make the correct adjustments, it is important to recognize a trap. Note above that the "Gamma Too Low" diagram has a gap at the dark end, just as does the "Blackpoint Too Low." The only correct adjustment is to lower the gamma in the first case and to lower the blackpoint in the second. It is instructive to examine what happens when the wrong adjustment is made in each case.

Blackpoint Too High "Corrected" by Making Gamma Too Low

First we have a case in which the blackpoint correction is too high and an attempt has been made to correct this by decreasing gamma and as a result, gamma is too low. Note that both the darkest and lightest steps are correct. Alternatively this could be interpreted as a gamma correction too low and an attempt to correct that by increasing blackpoint. In either case the diagnostic is that although the endpoints are correct there is a decreasing spacing between peaks as the steps become lighter. As can be seen above, this compares with the "Gamma Too Low" condition.

Blackpoint Too Low "Corrected" by Making Gamma Too High

Above we have a case in which the blackpoint correction is too low and an attempt has been made to correct this by increasing gamma and as a result, gamma is too high. Again note that both the darkest and lightest steps are correct. Alternatively this could be interpreted as a gamma correction too high and an attempt to correct that by decreasing blackpoint. In either case the diagnostic is that although the endpoints are correct there is an increasing spacing between peaks as the steps become lighter. As can be seen above, this compares with the "Gamma Too High" condition. [CONTENTS]

Diagnostic Summary

1. Blackpoint Too Low: Gap at the dark end, with the first peak placed too far to the right and dark end peak spacing compressed.

2. Blackpoint Too High: First peak too low, or even off the dark end, dark end peak spacing expanded.

3. Gamma Too Low: Peak spacing expanded at dark end, compressed at light end.

4. Gamma Too High: Peak spacing compressed at dark end, expanded at light end.

The Objective

For proper calibration the trick for each channel (R, G, and B) is to set gamma and blackpoint so that when the highlight is set to make the lightest grayscale step come out 242 the spacing between peaks comes out even and the darkest grayscale step comes out about 13. When this happens the peaks will be essentially coincident in the Levels RGB histogram. This can only be achieved through trial and error – trying a gamma and blackpoint, seeing the result, and adjusting the gamma and blackpoint to try again. Always look at the evenness of the peak spacing as a primary goal in setting gamma.

1. As far as possible the blackpoint and gamma should be set in the source device, prior to loading the image into Photoshop.

2. If the peaks gradually get closer together going toward the right, particularly in the highlight end, raise the gamma.

3. If the peaks gradually get farther apart going toward the right, particularly in the highlight end, lower the gamma.

4. Set the blackpoint so that the first step comes as close to 13 as possible. Lowering the blackpoint will raise this number and raising the blackpoint will lower this number.

5. After loading the next trial image into Photoshop always Levels highlight adjust the lightest grayscale step to 242 for purposes of comparison.

6. Especially in the final trials, care should be taken to adjust the blackpoint in the source device so that the darkest grayscale step comes out as close to 13 as possible.

This can be a fairly rapid process for well-exposed, clear grayscale images or it can be more lengthy with less perfect grayscale images. [CONTENTS]

An Important Philosophical Point

In other sources, both gamma and blackpoint are often given physical meanings or are associated with a simple physical concept. Gamma, for instance, is often said to be the same as contrast, with high gamma meaning high contrast and low gamma meaning low contrast. We have seen above that is simply not true. High gamma leads to increased contrast in part of the tonal scale and decreased in another, and the same is true of low gamma. Similarly, for a negative, blackpoint is often said to be related directly to the transparency of unexposed film, or the color mask for a color negative. That also is simply not true. In the truest sense, both blackpoint and gamma are just parameters of a calibration curve form that happens to fit a variety of light sensors and some display devices as well. For the purposes of digital photography, it is best to evaluate the two parameters so that they closely resolve a stepped grayscale, just as we are doing here. The gamma and blackpoint parameters can be evaluated for different purposes in different ways. Manufacturer's film gamma measurements may or may not agree with the gammas that we determine here although the difference generally should not be large. It is not a problem if they do not agree because the measurements are made to serve different purposes. (Also note that what we find here is technically a print gamma, which is the inverse of the gamma reported for the film.) [CONTENTS]

Specific Applications

Dunthorn Calibration was originally intended as a method of dealing with scanned color negatives, where for color integrity it is necessary to know the gamma of each emulsion, red, blue, and green sensitive, that produced the negative. But the method has proved to be a very powerful tool for dealing with other digital images as well, particularly those from the current generation of digital cameras. These cameras and most scanners work with a three-color red, blue, and green primary system and so the Grays Rule applies as well to them as it does to photographic film images. In fact, most digital cameras have just one sensor upon which red, green, and blue filters are placed (in a Bayer grid). Thus the sensor should have the same gamma for all three colors. (There is some question as to whether blackpoint should be the same for all three colors.) [CONTENTS]


Since this was first written, Dunthorn Calibration has been incorporated directly into the ColorNeg and ColorPos plug-ins. Consult the manuals for these plug-ins for proper use. [CONTENTS]

Photoshop RAW

First a warning. The much-praised Photoshop RAW is one of the newest and most poorly designed features of Photoshop. See our short discussion elsewhere for more about this. The most important consideration is getting images into Photoshop without letting the RAW converter destroy their color integrity. Of most direct importance to us is that the Photoshop RAW "Brightness" control is very strange. Earlier we thought it was actually gamma because it behaves much like gamma in some ways, but in more recent testing it appears to be some ad hoc gamma-like setting. Whatever the case, Photoshop RAW has labeled it Brightness, making it is the first and most likely thing a person would adjust for each picture, thus immediately compromising color integrity! No wonder there are long explanations on the web of how to "calibrate" your digital camera images out of this mess, usually using methods that further distort color integrity. The Shadows control, however, really does seem to set blackpoint correctly. The objective becomes getting the image through Photoshop RAW unscathed if at all possible.

Using Photoshop RAW on a digital image set Shadows so that the histogram starts to ride up the left side of the frame. Set so-called Brightness to 50, which we believe is the most neutral value. Set Contrast, Saturation, Exposure, and Tint to 0. Actually, it is largely immaterial where you set "Temperature" or "Tint" as these appear to merely set the color balance in a way we find particularly awkward. The color balance will be reset during the testing in Photoshop. Don't even think about using the "Calibrate" settings in RAW. Set them all to zero. They seem specifically designed to destroy color integrity.

In Photoshop select the grayscale area, blur the image and set the lightest gray step to 242, 242, 242 as explained in more detail in The Calibration Test - Image Setup. Now OK out of the Levels tool and then invoke the Levels tool again to show the adjusted histograms. Compare the R, G, and B histograms with the diagrams and the Diagnostic Summary above, deciding upon whether to adjust each color gamma up or down and whether to raise or lower the blackpoint. Since Photoshop RAW has only one blackpoint adjustment (Shadow) only one gamma-like adjustment (Brightness), target the central gamma and blackpoint of the three colors.

Re-read the RAW image using adjustments to Shadow according to the blackpoint requirements and to "Brightness" for gamma. At present we have no guidelines for how much adjustment is required as we believe it may differ for different cameras. However, a few trial adjustments should put you on track.

After reading the image into Photoshop, look again at the Levels histograms, first making the 242 adjustment and as before estimating another round of corrections. Continue with this trial and error until you are satisfied with the result. Because Photoshop RAW has only one overall adjustment for gamma, try to make the histogram for the central gamma and blackpoint come out properly. For the most accurate calibration, also use the cursor and the Info window to look at the actual pixel values in the grayscale, comparing them with the target 13, 38, 64, 89, 115, 140, 166, 191, 217, 242 scale. It is very difficult to adjust the blackpoint to make the darkest step 13, so just set the blackpoint to achieve this as closely as possible. If there remain variations between the colors, continue on to the next part Using Photoshop Levels to Make Calibration Adjustments and determine the gammas for the other two colors using that method, but read the next paragraph in any case.

When applying such corrections to future images from a similar source, set Photoshop RAW Shadows so that the histogram starts to ride up the left side of the frame, set Brightness as determined above, set the other controls as before and read in the image. Then if the gammas for the colors differed, correct the gammas as explained at the end of Using Photoshop Levels to Make Calibration Adjustments. Otherwise, for the next step, see Setting the Color Balance. [CONTENTS]

Using Photoshop Levels to Make Calibration Adjustments

Some image sources – including many digital cameras – have no means of making blackpoint or gamma adjustments prior to entering the image into Photoshop and even Photoshop RAW has no means of making these adjustments separately for red, green, and blue. As a last resort, the Photoshop Levels control can be used to make such adjustments. We say "as a last resort" because both the gamma and blackpoint adjustments available in the Photoshop Levels tool are somewhat defective.

Read the image into Photoshop. 16-bit mode is preferred to 8-bit if at all possible, but often it will not be available. In Photoshop select the grayscale area, blur the image and set the lightest gray step to 242, 242, 242 as explained in more detail in The Calibration Test - Image Setup. Now OK out of the Levels tool and then invoke the Levels tool again to show the adjusted histograms. Compare the R, G, and B histograms with the diagrams and the Diagnostic Summary above, primarily deciding upon gamma adjustments; whether to adjust each color gamma up or down, on the basis of whether the spacing between histogram spikes above the darkest gradually increases or gradually decreases. (Note: Photoshop Levels does gamma backwards, so to adjust gamma higher move the middle gray slider to show lower values and vice versa,) Make the middle gray (gamma) slider adjustments in each of R, G, and B and examine the result in the RGB histogram. If the RGB histogram plot is not too confusing, you may be able to tweak the adjustments just made for better coincidence. In any case, after making the adjustments, OK out of the Levels tool and then invoke the Levels tool again, re-examining the results to see if how well and evenly they turned out. If the lightest peaks do not coincide, use the Levels highlight dropper to set them to 242 as above, OK out of Levels and invoke it again. Evaluate the results. If further adjustments are needed, make note of them, but cancel out of the Levels command.

Using the History window, go back prior to the Levels command in which you set the gammas to test (but after the Levels command in which the lightest steps were set to 242). Repeat the above using the adjusted gammas. The first time through this paragraph, go back and continue with this trial and error on gammas until the spacing between histogram peaks is even above the shadow levels. Now set the blackpoint. Start the Levels command and double-click the shadow dropper button to get the Color Picker window. Enter R, G, and B values as 13 and OK out of the Color Picker. Use the dropper cursor to select areas inside the darkest grayscale square. Select several times and stop when the histogram seems most stable. Exit out of Levels and invoke Levels again, this time setting the lightest grayscale step to 242 as you have done before. Again exit out of the Levels command and invoke it again. Look to see the evenness of the histogram spike spacing. If the histograms show gamma-caused increases or decreases in spacing make note of the required gamma changes and go back to the beginning of this paragraph, but do not do the "first time through" repetitive trials on gammas again. For the most accurate calibration, also use the cursor and the Info window to check the actual pixel values, comparing them with the target 13, 38, 64, 89, 115, 140, 166, 191, 217, 242 scale.

To clarify the sequence intended in the above, set the lightest grayscale square to 242 and exit. Now you are at the trial return point. Test and evaluate trial color gamma settings. Continue the trial and error testing and evaluation just changing the gammas each time until the selected gammas seem to be producing an even spacing of the histogram peaks from the middle to the lighter end of the histogram. Then start a trial and error testing and evaluation in which the test gammas are entered and each time the darkest grayscale square is set to 13 as well, this time evaluating the gammas on the basis of even spacing of the entire set of peaks. Continue until the spacing is as even as possible.

When applying such corrections to future images from a similar source, read the image into Photoshop. Use the Levels command to apply a shadow correction. We suggest this should be for each channel moving the shadow slider right up to where data starts in the histogram or perhaps slightly farther. That is not magic. You may wish to set a blackpoint using the shadows dropper. In either case, OK out of the Levels command and start Levels again to set the gammas. Use the middle gray slider to set in the same values which you determined during the calibration and once again OK to exit Levels. For the next step, see Setting the Color Balance. [CONTENTS]

Setting the Color Balance

Photoshop does not make accurate color balancing very easy, either. We have an earlier web page on the topic and we have in planning a document which will deal in part with some of the ancient baggage currently associated with color balancing photographic images; color temperature and the like. For now, if you have a calibrated image you will be pleased to know that it is in perfect condition to correctly color balance, if it is not balanced correctly already.

In most cases color balancing an image with color integrity can be done in nearly the same way that the lightest grayscale step was set to 242, 242, 242 in the above methods. Start up the Levels command and double-click the highlights dropper to bring up the Color Picker window. Look for an area in the image that should be gray, anything from almost white (but with no 254 or 255 pixel values) to quite dark gray. (Yes, the "highlights" adjustment is appropriate for dark gray as well as true highlights.) Put the cursor over that area or click on it. Watch the pixel numbers that appear in the color picker and be sure they are fairly consistent. Now pick the middle value of R, G, or B in the color picker window and type that same number in for the other two colors so they are all the same. OK out of the Color Picker and click the dropper cursor on the same area you picked for the gray previously, again. The calibrated image has been color balanced. If you are not satisfied with the result, pick another apparently gray area and try again. In doing this you may wish to add a little to the Color Picker numbers to lighten an image or subtract a little to darken an image, but we do not recommend doing any major changes in tone depth.

Our earlier page on color balancing had to deal with images that did not have good color integrity and includes a target with shades of flesh tones and sky colors to use in color balancing. In most cases there will be a gray somewhere in the image that will be satisfactory for the above method because the calibrated image has color integrity.

Once the image has reached this stage – and not before – we recommend that any major adjustments of contrast enhancement, lightening, darkening, etc. be done by first converting the image to Lab mode and using the Curves tool to make the adjustments. Lab mode maintains color integrity, but of course can do so only after color integrity has been established. The curves tool will minimize the loss of highlight and shadow detail. [CONTENTS]

Calibrating Existing Images

All of the above assumes that you are able to take a new image of a known grayscale for calibration. That grayscale has the special property that the steps will show up as evenly spaced on a histogram in Photoshop. But what happens when you have no way of taking a new image? Perhaps the equipment or the media no longer exist or are not available to make test shots.

Here we describe what to do in such a case. Before doing this, however, we strongly recommend doing a few calibrations the right way with currently available equipment and media, making and using test shots of the proper calibration grayscale. The following method requires a great deal of individual judgment and doing a few normal calibrations will give you the basis for making those judgments.

The best case for this situation is when you have images of a stepped grayscale on the object media, but it is the wrong grayscale – not the one specified in the above procedure. If there is an image of a grayscale, use that image rather than making individual selections from an image as described below. If the grayscale that was photographed still exists, it can be scanned and used as the target in a calibration much like the above, but without the visual aid of even spacing in the histogram. Otherwise use it to make a proxy grayscale as described here.

The trick involved is that many normal, everyday images contain fairly good grayscales if you just look for them. Gray clothing, white shirts, black clothing items, white or gray painted buildings in various degrees of shadow, clouds, concrete of any form, asphalt, tree trunks and branches, etc., etc. While you don't know the precise shade of gray, as you do with a custom-fabricated grayscale, you do know that the object is gray or very close to gray. With the grayscale, even illumination is very important and correspondingly, it is very important here to be sure the different grays that are selected are responding to similar illumination.

Look at the following portion of a photograph:

We have selected five areas of this image as being gray, or nearly so. These areas favor the lighter end of the grayscale because that is where we are best able to estimate the shift of gamma between R, G, and B. We do try to select areas so they will form separate peaks on the histogram, using the Info window to locate areas with significantly different shades of gray. In this case the two selected areas to the left in the paved area were two nearly identical darks spots in the pavement and we selected both to combine into one larger peak.

(In the following we refer to NegPos which is now obsolete. The text still serves to illustrate its points, but Dunthorn Calibration is now built directly into ColorNeg, the successor to NegPos.)

The source here was a color negative. We inverted the color negative using NegPos and then made the selections from the positive image where it was easier to see what was being selected. We then saved the selections in a separate file: Select→Save Selection, use the Document pulldown to select New, then pick a Name for the selection. It will be saved in a separate file, usually Untitled-1. (If New doesn't appear in the pulldown, cancel back and use the + or - lasso to slightly modify the selection, then try again – another Photoshop bug – or feature).

Then we reverted the image back to the color negative and inverted it again using NegPos with all three gamma settings at 1.7, which is a typical value for converting color negatives. We pulled the shadows percentage up to 2% and set the Blackpoint set to Tail, as this is the only available estimate of blackpoint. We set the highlight percentage to 0.01, producing a fairly dark image but retaining highlight detail. S-Curve should be off for these tests. (Using Photoshop RAW on a digital image in place of NegPos on a color negative, set Shadows so the histogram starts to ride up the left edge of the frame, set so-called Brightness to 50, Contrast, Saturation, Exposure, and Tint to 0. Make sure the Calibrate settings are all 0.) After reloading the selection pattern for the proxy grayscale, we used Filter→blur→Gaussian with a sufficient radius to remove any graininess (we used a radius of 4 with a 20 MB image file). The result was the following set of histograms representing just the selected areas. We have colored the Levels histograms so we can show R, G, and B all at the same time:

Original Histograms

Note that the histogram has four peaks, two of which are not tall. As in regular Dunthorn Calibration we used the Levels highlight tool to set the brightest area – the white arrow in the parking lot – to 242, 242, 242, which forces the three rightmost R, G, and B peaks to be coincident. Then we OKed out of Levels and reissued the Levels command to get the above histogram. Blue has the peaks more compressed together at the highlight end than the other colors, so according to the diagnostics its gamma is too low, by comparison. Red has the peaks more expanded at the highlight end, so its gamma is too high by comparison. Without a calibrated grayscale there is no way to accurately estimate an absolute gamma, so since green is in the center we left it as 1.7 and adjusted the red and blue gammas to try to match green. It would be possible to use the Levels "middle gray" slider to adjust the gammas until the peaks matched and then relate that back to the gamma settings needed for NegPos, but it is more tedious than simply going back and forth to NegPos and testing the settings directly. We reverted back to the negative image and called NegPos again. After returning from NegPos we set the white arrow to 242, OKed out of Levels and invoked Levels again to see the resulting histograms. In this case with two steps of trial and error we found that gammas of 1.3, 1.7. and 2.2 produced the following histograms:

Corrected Histograms

This method can quite accurately determine the relationship between the three gammas; in this case how much smaller the red gamma was than the green gamma and how much larger the blue gamma was than the green gamma. Knowing this much will make a major improvement in color integrity. However, the method cannot normally determine whether the three gammas are all centered around 1.7 or all centered around 1.3 or all centered around 2.3. This becomes a matter of judgment. The resulting images should be of normal contrast, similar to those which you have produced using full Dunthorn Calibration. If they are more contrasty than normal in the highlights, the gammas should be lowered, and if they are too flat in the highlights, the gammas should be raised. Note that we are not speaking of a matter of taste here. You may feel that full calibrations produce images that are too flat, so that you normally boost their contrast using Lab mode, as described earlier. If so, for best color integrity your target here is that same level of contrast that you feel is too flat, not the degree of contrast you feel is "right." Similarly, blackpoint is a matter of judgment. We gave rule of thumb settings for NegPos and Photoshop RAW, but it really is a matter of judgment. If the test image has dark shades in it, look at them and see if they extend to pure black or nearly so. Look at dark end of the histograms.

Perhaps at this point you are staring at some images that you have in RAW format from some inaccessible camera. All this method does, you realize, is measure the relationship between the three gammas for R, G, and B. The digital camera (almost always) will have used the same sensor for all three colors and thus should have the same gamma for all three. Furthermore, Photoshop RAW has only one adjustment for overall gamma (that adjustment called, of course, "Brightness"…). So, no problem and this method is worthless in this case, right? Maybe yes, maybe no. If the above test shows coincident peaks for the three colors, you are OK. If not, it means the camera's computer has played a trick. Tricks are not uncommon.

If this is the case, or if you are using digital images with other than RAW input and you produce a grayscale image with the color histograms other than coincident (after the Levels highlight adjustment has been used to adjust the brightest test gray to 242, 242,242), then you will need to experiment with the Levels "middle gray" adjustment, which is a gamma adjustment, at least mostly. Leave the color alone that has the peaks more or less central compared to the others and adjust the "middle gray" slider for the other two colors to move them toward the central color's peaks. Moving the middle gray slider to the left will move the peaks to the right and vice versa. The total RGB histogram will give a rough idea of how well you have brought the peaks together, but to really see the result of the changes you have made, you will need to OK out of Levels and re-issue the Levels tool. If the peaks are not correct, do not make changes, just note what needs to be done. Cancel out of the Levels tool and then use the History window to go back prior to the Levels that gave the incorrect result. Activate the Levels tool again and make the needed adjustments to the middle gray settings you made earlier.

When the peaks do coincide, write down the middle gray settings which you ended up with. In general, those settings should be applied to all images from that source. However, the world of the digital camera is full of surprises. You may find that a different correction is needed for dim light or other special circumstances. In some cases you may find that the camera's computer makes adjustments often enough and in strange enough ways that it cannot be calibrated.

When applying such corrections to future images from a similar source, read the image into Photoshop. Use the Levels command to apply a shadow correction. We suggest this should be for each channel moving the shadow slider right up to where data starts in the histogram or perhaps slightly farther. That is not magic. You may wish to set a blackpoint using the shadows dropper. In either case, OK out of the Levels command and start Levels again to set the gammas. Use the middle gray slider to set in the same values which you determined during the calibration and once again OK to exit Levels. For the next step, see Setting the Color Balance. [CONTENTS]

Gray Is Not Even Really Necessary

By now you may have realized that this method will also work for consistent colors other than gray although for best results the color should be no more intense than, for example "flesh." Consider, for example, a picture of a cylindrical tank, painted pink. Normal lighting gradation will show a range of shades going around the tank and a "pink" scale can be fairly easily selected. Furthermore, for the purposes of calibration converting the lightest step to 242, 242, 242 will make it effectively gray. Naturally, care should be taken in selecting such subjects and the results should be checked if possible. [CONTENTS]

Privacy Policy and E-Mail
Go to C F Systems Home Page