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.
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.
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 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).
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.
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.
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).
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).
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.
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.
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.