Sharpening in Photoshop -- Part VI

Article and Photography by Ron Bigelow

www.ronbigelow.com

Photoshop CS3 (Beta) Used in this Tutorial

The previous article introduced the concept of selective sharpening -- giving different parts of an image different amounts of sharpening based on the needs of the image. The article detailed two selective sharpening techniques: sharpening masks and edge masks. These two techniques are very powerful and are often critical for the best sharpening results. However, in some cases, an image will require a different type of selective sharpening where the light and dark sides of the edges receive different amounts of sharpening. For this, a different type of selective sharpening is required: contour sharpening.

Contour Sharpening

Figure 1: Edge Histograms

To understand contour sharpening, it is necessary to go back to the theory covered at the beginning of this series. As explained in the first article, sharpening restores the loss of acutance due to digital capture or image processing. What sharpening does is make the dark side of edges darker and the light side of edges lighter. This is shown in Figure 1. This figure shows histograms of an edge. The pixels go from dark on the left side of the histograms to light on the right side.

The first histogram shows the tonal distribution of this edge as seen by the eye. The transition is abrupt. This is seen as a sharp edge. The second histogram shows the tonal distribution of the edge as captured by a digital camera. The edge transition is now more gradual (due to the reasons covered in the first article). This has caused a loss of acutance. The edge would now appear unsharp. The third histogram shows the edge after sharpening. The sharpening has made the dark side of the edge even darker and the light side even lighter. Even though there is still some transition from one side of the edge to the other, the acutance had been significantly increased. The eye will now see the edge as being sharp again. In essence, sharpening uses an increase in edge contrast to trick the eye into seeing edges as sharper than they were at the time of capture by a digital camera.

So, any sharpened edge has a light side (referred to as the light contour) and a dark side (referred to as the dark contour). With most sharpening, both the light and dark contours are sharpened approximately the same amount. This is fine for most images. However, some images have special issues that benefit from the light and dark contours receiving different amounts of sharpening.

Figure 2: Image that Requires Contour Sharpening
Figure 2 shows just such an image. This simple image of an old railroad car in a ghost town doesn't look like it would present any particular problems. However, a 100% crop of the sharpened image (see Figure 3) shows a major sharpening challenge. An amount of sharpening that is appropriate for most of the image causes halos where the dark wood of the train is backlit by the sky.
Figure 3: Crop of Image

One could attempt to deal with the problem by simply reducing the amount of sharpening to the point that the halos disappear, but the rest of the image would then be undersharpened. Another alternative would be to add a mask to the sharpening layer and manually paint out the halos. However, this is a time consuming approach.

A better approach is to analyze the unique sharpening needs of the image. If this is done, it quickly becomes apparent that the light contours of the edges require less sharpening than the dark contours. Thus, a sharpening method is required that allows the sharpening of the light and dark contours to be adjusted separately. This is where contour sharpening comes in.

Now, the requirement to sharpen the light and dark contours separately may sound like it requires a complex solution. On the contrary, the solution is rather easy. It simply requires two sharpening layers and the use of the blend modes.

Figure 4: Layers Palette

Figure 4 shows the Layers palette before any work has been done. To start the process, the first step is to duplicate the Background layer by dragging the Background layer to the Create a new layer icon on the Layers palette. The new layer is renamed the Dark Sharpen layer (see Figure 5).

Figure 5: Layers Palette after Dark Sharpen Layer Added
The Dark Sharpen layer is now sharpened with whatever sharpening method would normally be used. For this image, the opacity of the layer was set to 75%, and Unsharp Mask was used (choose Filter/Sharpen/Unsharp Mask). Figure 6 shows the Unsharp Mask settings used with this image.
Figure 6: Unsharp Mask
Figure 7: Fade Tool
Now, one problem with sharpening is that it can cause color fringing along the edges in the image. Many photographers eliminate this problem by changing the blend mode of the sharpening layer to Luminosity. However, with this sharpening method, that will not be possible. Thus, the Fade tool must be used to eliminate the possibility of color fringing. So, immediately after the sharpening has been completed, the Fade tool is launched by selecting Edit/Fade Unsharp Mask. The opacity is set to 100% and the mode to Luminosity (see Figure 7).

Darken Blend Mode Details

(For the Technically Minded)

The Darken Blend mode creates the result color by comparing the color in the Background layer to the color in the Dark Sharpen layer, in each channel, and selecting the darker of the two. As a consequence, in each channel, Background layer colors that are lighter than the Dark Sharpen layer colors are changed to the Dark Sharpen colors; Background layer colors the same as or darker than the Dark Sharpen layer colors are unaffected. Now, the dark contours of the edges in the Background layer are lighter than in the Dark Sharpen layer because the sharpening that was performed on the Dark Sharpen layer made the dark contours darker. Thus, the sharpened dark contours from the Dark Sharpen layer will be seen in the image. While that may sound complex, what it means in simple terms is that the Darken mode allows the sharpening of the dark contours to show through.

However, that is only half of the story. The light contours of the edges in the Background layer are darker than in the Dark Sharpen layer because the sharpening that was performed on the Dark Sharpen layer made the light contours lighter. Thus, the sharpened light contours from the Dark Sharpen layer will not be seen in the image. Consequently, the Darken mode prevents the sharpening of the light contours from showing through.

Now comes the big trick. The Blend mode is changed to Darken. The Darken Blend mode lets the sharpening that was performed on the dark contours (on the Dark Sharpen layer) show through, but it filters out the sharpening of the light contours. We now have a layer that sharpens only the dark contours!

This can be seen in Figure 8. The dark contours have been sharpened. However, there are no halos because the sharpening of the light contours has been filtered out by the Darken Blend mode.

Figure 8: Crop of Image with Only the Dark Contours Sharpened
Figure 9: Layers Pallet after Sharpening of the Dark Contours
Figure 9 shows the Layers pallet after the dark contours were sharpened.
Figure 10: Layers Pallet after Sharpening of the Light Contours
Dealing with the light contours is very easy. The Dark Sharpen layer is duplicated by dragging the Dark Sharpen layer to the Create a new layer icon on the Layers palette. The Blend mode is changed to Lighten, and the new layer is renamed the Light Sharpen layer (see Figure 10).

Lighten Blend Mode Details

(For the Technically Minded)

The Lighten Blend mode creates the result color by comparing the colors in the lower layers to the colors in the light Sharpen layer, in each channel, and selecting the lighter of the two. As a consequence, in each channel, lower layer colors that are darker than the Light Sharpen layer colors are changed to the Light Sharpen colors; lower layer colors the same as or lighter than the Light Sharpen layer colors are unaffected. Now, the light contours of the edges in the lower layers are darker than in the Light Sharpen layer because the sharpening that was performed on the Light Sharpen layer made the light contours lighter. Thus, the sharpened light contours from the Light Sharpen layer will be seen in the image. This means that the Lighten Blend mode allows the sharpening of the light contours to show through.

On the other hand, the dark contours of the edges in the lower layers are lighter than in the Light Sharpen layer because the sharpening that was performed on the Light Sharpen layer made the dark contours darker. Thus, the sharpened dark contours from the Light Sharpen layer will not be seen in the image. Consequently, the Lighten mode prevents the sharpening of the dark contours from showing through.

Again, the trick is in the Blend mode. The Lighten Blend mode lets the sharpening that was performed on the light contours (on the Light Sharpen layer) show through, but it filters out the sharpening of the dark contours. We now have a layer that sharpens only the light contours!

Figure 11 shows how the image appears with only the Light sharpen layer active (i.e., the Dark Sharpen layer has been turned off).

The light contours have been sharpened. However, the sharpening of the dark contours has been filtered out by the Lighten Blend mode. Figure 12 shows the image with both the Light Sharpen and Dark Sharpen layers active. A first glance at these two images would lead one to conclude that all that work was for nothing. After all, the halos are back. However, we now have the ability to adjust for the halos.

Figure 11: Crop of Image with Only the Light Contours Sharpened
Figure 12: Crop of Image with both Light and Dark Contours Sharpened
The halos are now diminished by reducing the sharpening of the light contours. This is done by decreasing the Opacity of the Light Sharpen layer. Of course, this will reduce the overall sharpness of the image. To bring the overall sharpness up a bit, the Opacity of the Dark Sharpen layer is increased. This may darken the image somewhat, so appropriate adjustments to the overall brightness of the image may need to be made. It may be necessary to play around with the Opacity settings of the two layers to find the best settings for an image. For this image, a Light Sharpen Opacity of 20%, and a Dark Sharpen Opacity of 100% worked best. Figure 13 shows a crop of the image with the final settings.
Figure 13: Crop of Image with the Final Settings

A Bit More Sophistication

Figure 14: Layers Pallet after Sharpening the Dark Contours

While this procedure works, it is not perfect. It may be difficult to completely remove all of the halos without reducing the Opacity of the Light Sharpen layer to the point where the sharpening suffers. However, it is possible to enhance this procedure.

For this enhancement to the process, the Dark Sharpen layer is created and sharpened as before (see Figure 14).

Figure 15: Layers Pallet after Light Sharpen Layer Added

Next, the Background layer is again duplicated by dragging the Background layer to the Create a new layer icon on the Layers palette. The new layer is renamed the Light Sharpen layer, the Blend mode is set to Lighten, the Opacity is set at 75% (for this image; other images may use a different Opacity), and the layer is moved to the top of the layer stack (see Figure 15).

Figure 16: Unsharp Mask
Once again, Unsharp Mask is launched. However, the settings are different than those used with the Dark Sharpen layer (see Figure 16). The radius has been decreased to reduce the halo. This decrease in the radius will decrease the sharpening. To compensate for this, the amount is increased.
Figure 17: Fade Tool

Immediately after the sharpening has been completed, the Fade tool is launched by selecting Edit/Fade Unsharp Mask. The opacity is set to 100% and the mode to Luminosity (see Figure 17).

The result of this sharpening is shown in Figure 18. This image shows that the enhanced approach is very effective at reducing the halos. It has also produced a sharper image and has resulted in a better balance in the sharpening of the light and dark contours.

Figure 18: Crop of Image with the New Final Settings

What if There are Other Layers

This article started off with an image that had only the Background layer. Most images have multiple layers (for the final sharpening at least). This presents no problem. If an image has multiple layers, the process begins by creating a new layer by clicking the Create a new layer icon at the bottom of the Layers palette. This new layer is moved to the top of the layer stack, and the other layers effects are merged into the new layer (hold down the Alt key (Option key on a Mac); while holding down the left mouse button, select Layer/Merge Visible). The new layer is renamed, and the rest of the sharpening process proceeds with this layer.

Other Uses of Contour Sharpening

Removing halos is not the only use for contour sharpening. Contour sharpening can be used any time that a photographer has a need for differential sharpening of the light and dark contours.

Articles

Sharpening -- Part V