Wednesday, June 6, 2007

How To Avoid Oversharpening Your Images

Sharpening is important. Pixels are arrayed in a grid, and if you capture a curve or a diagonal on a grid it will look like a staircase. It's like trying to draw the letter 'O' using the boxes of a tic tac toe game. Consequently many digital capture devices use anti-aliasing filters -- this is a fancy way of saying that the image is blurred slightly to avoid the jagged aliased appearance. Hence, curves and lines appear more natural.

This, of course, necessitates sharpening -- either on the computer or within the camera -- to give the image a nice crisp, sharp look. Most of us here realize the importance of sharpening. We have great tools at our disposal, including the Photoshop filters SmartSharpen, Unsharp Mask, and High Pass, as well as numerous third party plug-ins.

The difficulty lies in striking a good balance. How do you make a picture look sharp without oversharpening it? The explanation requires understanding how sharpening works. Sharpening tools recognize edges in an image. An edge occurs where adjacent pixels have different luminosity values -- in other words, one is brighter than its neighbor. A sharpening tool will identify the edge, then lighten half of the edge and darken the opposing side. This makes the edge transition look sharper, bolder, more visible. The intensity and size of the effect are variable, and determined by amount and radius settings in the sharpening filter used.

The problem is that when an object is sharpened too much the effect ceases to suggest sharpness. Rather, one can see a bright or dark 'halo' or outline around oversharpened objects. This uniformly detracts from the image, makes it look overprocessed, and can ruin a print!

Even more challenging is that not all edges are created equal. If you adjust your sharpening settings to bring out soft edges and subtle detail, then your bolder edges are sure to be oversharpened. By contrast, if you sharpen the boldest edges appropriately, you may end up undersharpening the subtler edges.


Oversharpening halos all along the rooftop. Here are my strategies to avoid oversharpening.
1. Sharpen ONLY when you've resized to the final output size (i.e. for print or web sharing). This does not include stylistic or regional sharpening that you do earlier in the workflow. But if you sharpen and THEN resize, even slightly, it will frequently look either unsharpened or oversharpened.

2. Sharpen on a separate layer. In other words, duplicate the background layer and sharpen the new layer. This allows you to vary the opacity of the sharpened layer. You can also do the following two fantastic and important steps:

- Separate the sharpening into Lighten and Darken layers. Take your duplicated, sharpened layer and duplicate it. So now you have two sharpened layers over your background. Set one to the blending mode 'Darken'. Set the other to the blending mode 'Lighten'. This separates the dark half of the sharpening process from the light half. You can turn on and off the dark and light halves separately to view their respective effects. I usually start by making 'lighten' invisible. I scan the image for areas with inappropriate black outlines or halos, and I decrease the opacity of the Darken layer until it looks better. Darken usually ends up between 70 and 100% opacity. Then reveal the Lighten layer. I usually keep Lighten between 30 and 50% opacity. This is a POWERFUL tool to take control of your sharpening.

- Use layer masks!! Say, for instance, that you take a picture of your friend at the beach, but your friend is sort of backlit and her face is in the shadow. You want to sharpen the face, but the problem is there is so much contrast between the face and the sky that you'll invariably oversharpen the outline of the head. No problem. Sharpen on a duplicate layer, then open up a layer mask. You should be seeing an oversharpened halo at this stage. Then create a layer mask (by clicking in Photoshop on the little icon that looks like a gray box with a white dot in it). Then take a soft black brush -- like 50 pixels in diameter, hardness of 20%, and opacity of 75%, and trace over the oversharpened area until the oversharpening disappears. * ideally, if you're following my advice about Lighten and Darken layers, you'll do this independently on each of the sharpened layers. * Now for those of you with Elements, who cannot use layer masks like this, you can do all of the above, but you may have to partially erase oversharpened areas (like with a soft, low opacity eraser) to undo the sharpening. It's not as reversible as a layer mask, but at least it's a second layer.

Two sharpened layers -- one set to Lighten and one set to Darken. Opacity is controlled independently for each layer, and layer masks are used to block out the most oversharpened edges.

For more advanced photoshoppers, consider switching to Lab color mode for this step. The reason is that in RGB the program is limited by a finite number of ways a pixel can be encoded. In Lab, the program can use millions of different 'theoretical' colors, mathematical but fictional colors in the process of sharpening. This allows it to default to a color other than black or white during heavy sharpening. When in Lab color I create a duplicate layer, go to the channels, and click on the Lightness channel. I sharpen that channel alone. Then I go to Image>Mode>RGB, opt to keep the layers (i.e. do not flatten), and voila! Now you can duplicate the sharpened layer again and split them to Lighten and Darken blending modes.

So now there's no excuse for a picture to be oversharpened! Remember, you want the mind and eye of the artist to speak through your pictures, but the visible hand of the Photoshopper should be left elsewhere.

About the Author:

I'm a 31 year old physician, specializing in infectious diseases and tropical medicine at Boston Children's Hospital and Harvard Medical School. I'm originally from Connecticut, but now live in Boston with my wife. My other hobbies are writing, music, hiking, and kayaking. I've travelled extensively internationally for work and study, and my interest in photography is a product of my travels. My Canon Rebel G accompanied me to 6 continents and 15 countries before I finally went digital last year. Much of what I know I've learned from my friends here at Phototakers. Visit Dr. Lantos images at http://drpablo.smugmug.com/