Digital Imaging - Part 1
Text and Photography Copyright Matt Hagadorn All rights reserved.
Note - Illustrations open as separate windows. To view illustrations in a printable format (PDF file), click here.
Achieving good scans, whether destined for the web or print, can be challenging for photographers new to digital imaging. Years can be spent mastering many new concepts and techniques, but if you take the time to learn just a few of the basics, you will see a dramatic improvement in your digital image quality.
In this article -- the first of a three-part series -- I will show you how to use histograms to optimize tonal range and contrast in your scans, the basics of color correction, and finally, how to use the Unsharp Mask filter to restore sharpness lost during the scanning process. The examples given should be applicable to most scanners and all current versions of Photoshop.
Before you begin scanning or editing digital images, be sure to optimize your work environment. Dim the lights in the room if possible, and ensure there is no glare on your computer screen. There should be no bright sources of light within your field of vision. Adjust the contrast control on your monitor to its maximum, then adjust the brightness control so that every step of a gray wedge (such as the strip along the bottom of NPN's image critique pages) is discernable.
Understanding Histograms
A histogram is simply a bar graph representing the number of pixels at each level in an image (see Figure 1), from black (level 0) on the left of the graph to white (level 255) on the right. You can look at a histogram and quickly see the overall distribution of tones contained in your image. If large numbers of pixels are at level 0, you have probably lost detail in the shadows. If there is a spike at level 255, you have blown out the highlights. However, every image is different; there is no such thing as a "normal" histogram. An image of a black cat in a coal mine will not contain data in the midtones or highlights, and a polar bear in a snow storm will have very little data in the shadows. Do not expect all of your images to contain an even distribution of pixels.
Optimizing the Scan
To produce an optimum scan, reset all of your scanner's controls to zero, or no adjustment, especially the generic controls such as brightness, contrast, saturation, color balance and sharpening. We will use only the histogram tool (this might be called Levels or Black & White Points in your scanner's software) to optimize the scan. After scanning, we will use the superior tools in Photoshop to make final adjustments to tone, contrast, color balance and sharpening.
Insert a slide or negative into your scanner and engage the image preview function. Scanner software varies among manufacturers, but most offer controls for viewing and adjusting an image's histogram. In my example image of a sanderling on a beach, the preview is dark and flat with much of the data concentrated below the middle of the histogram (see Figure 2). The original slide was photographed in overcast light, but it is properly exposed and should contain more information in the midtones and highlights. My goal is to lighten the overall image and spread the histogram further into the highlights.
The mouse pointer in my scanning software functions as a densitometer, so I will move the mouse over the lightest areas of the preview image to get a reading of the underlying RGB values. The white, out-of-focus wave in the background reads R=160, G=188, B=230. I want my whites to be lighter, so I will move the right input slider inward until the highest channel reads approximately 245 (highlight areas with detail generally should not exceed 245-250). The slider is now at 240, causing any pixel at level 240 or higher in the input to get remapped to 255 in the output. The levels in-between will get redistributed to fill the range of possible tones, increasing contrast, detail and saturation (as pixels move towards 0 and 255, contrast increases). Finally, I will adjust the midtones lighter by moving the middle slider to the left slightly, shifting more data to the right of middle without affecting the endpoints. My new highlight values are R=189, G=212, B=246 (see Figure 3).
My image contains an obvious blue cast, but I will leave that to the next step in Photoshop. Once you have adjusted the histogram to your liking, make the final scan and save the image as a TIFF file.
Adjusting Color Balance
Inexperienced users naturally assume Photoshop's Color Balance tool is the best method for color correcting an image. Color Balance has its uses, but is a rather blunt instrument. Levels and Curves offer far more precise control over the red, green and blue color channels, and are actually easier to use (we're only going to work with Levels for the purposes of this article).
The vast majority of images contain shadows and highlights (blacks and whites) that should be neutral. We will use Photoshop's Levels tool to adjust color balance by following a very simple principle; if we make the neutral areas neutral, the rest of the colors will fall into place. In other words, we will find the darkest shadow tone of the image that should be neutral and make the red, green and blue channels equal at that spot. We will then find the lightest highlight in the image that should be neutral, and make the red, green and blue channels equal at that spot. By making your shadows and highlights neutral, you will eliminate any color cast that has made it's way into your image. (Do not use this technique for images that should contain a color cast, such as those taken at sunrise or sunset. You will wipe out the warm colors that you worked so hard to capture.)
Before you begin, select the Eyedropper tool in Photoshop's tool palette, or press I, and set the Sample Size in the Options bar to 3 by 3 Average (the exact procedure for setting the sample size may be different in various versions of Photoshop). Open your image, then open the Levels dialog by selecting Image > Adjust > Levels, or press Ctrl-L. We are going to use the black and white eyedroppers in the Levels dialog to fix our shadows and highlights.
Move the mouse pointer over the darkest shadow areas in your image while looking at the RGB readout in Photoshop's Info palette (the image should be zoomed to 100% for the most accurate reading). In my example image, the sanderling's black feathers read R=17, G=13, B=16, so my target black point is 13 (the lowest of the three channels). Move the pointer back to the Levels control and double-click the Black Point eyedropper to display the Color Picker. Fill in the target number in each of the R, G and B boxes (see Figure 4), and click OK to close the Color Picker dialog. Move the mouse pointer back to the same spot in your image where you took your reading, paying close attention to the Info palette again, and click the mouse button. All three channels in the shadows will now be equal.
We will follow the exact same procedure for the highlights. Move the mouse cursor over your lightest highlights that contain detail, again paying attention to the Info palette. I don't want my highlights to blow out to pure white, so I will try to find a spot where the highest channel is not greater than about 245; any areas with greater values should be considered spectral highlights. In my sample image, the white wave behind the sanderling reads R=195, G=226, B=245, so my target level is 245 (the highest of the three channels). Move the mouse pointer back to the Levels dialog and double-click the White Point eyedropper. Enter the target number in each of the R, G and B boxes, and click OK to close the Color Picker. Move the mouse pointer back to the spot you took your reading, again watching the Info palette, and click the mouse button. The blue cast is now gone from my sample image and the faint rufus-brown coloring lingering in the sanderling's early-winter plumage has become evident
(see Figure 5).
If the preview's colors look correct, make final adjustments to the black and white input sliders to adjust contrast. Move the middle input slider left or right to adjust the midtones lighter or darker if needed. Click OK to apply your changes, or hold the Alt key and click the Reset button in the Levels dialog to start over.
Sharpening with Unsharp Mask
Unfortunately, all scanners introduce some softness into the image during scanning. We compensate for this by using the Unsharp Mask filter, or USM. This unusually named filter works it's magic by increasing the contrast of edges, restoring apparent sharpness to the image. It will not, however, make an out-of-focus image appear in focus; for that, you still need to practice good photographic technique!
The amount of sharpening required is dependent on the final image size and output process and should never be applied during scanning. In my workflow, I scan at my scanner's maximum optical resolution to create a high-resolution master file for archiving, which can later be repurposed for the web or print without having to return to the scanner. After I have adjusted the tone and color balance of the master image in Photoshop, I will save it, make a duplicate (Image > Duplicate), and close the original. I can then resize the duplicate copy, apply USM and save it or print it as required.
After your image has been resized as necessary, open the Unsharp Mask dialog (Filters, Sharpen and Unsharp Mask). The USM dialog contains three sliders: Amount, Radius and Threshold (see Figure 6). Amount is simply the strength of the sharpening effect that will be applied to the image. Radius controls the width of the sharpening halo that will be visible around edges containing contrast. Finally, Threshold specifies the difference in tonal values of adjacent pixels that must be present before sharpening will be applied to those pixels. Threshold helps you avoid sharpening areas of texture, such as scanner noise, or what we perceive as digital grain. The controls seem confusing at first, but with practice you will come to understand their effect.
There is no formula for sharpening. Each image is unique and will require different settings. Use the following guidelines as a starting point. Feel free to experiment and develop your own preferences as you gain experience;
- Set the Amount based on image size. Small images for the web will generally use a much smaller Amount (approximately 100%) than large images for print (250% or more).
- Adjust the Radius setting until you can just begin to see the sharpening halo. For web images, this will be approximately .6 and for print, it might be 1 for an 8x10" or 1.5 for 11x14".
- Begin with a Threshold around 2. If the image looks too grainy, increase Threshold or decrease Amount.
- Be conservative: a slightly soft image is preferable to one that is over-sharpened and looks "crinkled."
For my sample web image, I am going to start off with an Amount of 100%, a Radius of .6, and Threshold of 2. Experience has taught me that these settings work well for relatively small JPEGs for the screen, and I rarely need to change them. I check the preview before applying my sharpening, then click OK. The image is now ready to be saved and uploaded to the Web.
If I were to repurpose my master image for output on an inkjet, the unsharp mask settings would be much different. This time I have made a copy of my master image and resized it to 11 inches by 8 inches at 240 dpi, which results in a 15 MB file. This is considerably larger than the JPEG above. For images this size, I will usually start with an Amount of 300%, Radius of 1 and Threshold of 2. Now I simply start adjusting the sliders, one at a time. I will adjust Radius first by looking at an area of important detail in my image (always zoom your image to 100% while sharpening). I slowly adjust the Radius slider up or down until the sharpening halo becomes just visible (be sure that Preview is checked). The image will lose some additional sharpness due to inkjet dithering, so I will adjust the Amount so that the image looks just slightly over-sharpened on screen. (For continuous tone output such as a LightJet, I would adjust the image to have the proper sharpness on screen.) Finally, if the smooth, out-of-focus areas of the image have become too grainy, I will increase the Threshold by a few points, being careful not to wipe out the sharpening in detail areas. I will apply my sharpening by clicking OK, then will zoom the image to 50% and press Ctrl-Z a few times to toggle the changes on and off. The reduced view is an approximation of how the sharpening will look when printed on an inkjet. If I'm happy with the results, I'll go ahead and print. If not, I'll undo the sharpening by pressing Ctrl-Z, then make more adjustments with the USM filter.
The Next Steps
This article has only scratched the surface of scanning, color correcting and sharpening. The techniques presented here are basic, but provide a solid foundation on which to build more advanced skills. In future articles, I will introduce ICC color management for achieving consistent color from input to output, software and hardware tools for calibrating and profiling your monitor, high-bit workflows, and more advanced tone and color correction with curves.
MH-NPN 112
Comments on NPN digital photography articles? Send them to the editor.
|