Reducing Noise in Photoshop -- Part II

Article and Photography by Ron Bigelow

www.ronbigelow.com

Photoshop CS3 (Beta) Used in this Tutorial

When it comes to reducing the effects of noise, there are many different techniques. The rest of this series will look at a number of these.

Median Filter

There are four filters in Photoshop that are designed to reduce noise (and one filter to add noise). One of the most useful of these filters is the Median filter. The Median filter looks at pixels, within a specified radius, and blends the luminance of the pixels. The filter does this by calculating the median value (a type of average) of the pixels within the radius and assigning that value to the center pixel. In a sense, it averages out the noise.

Figure 1: Noisy Image
Figure 1 shows an image that can benefit from the Median filter technique for reducing noise. At this size, the noise is not visible. However, when a 100% crop of the image is examined (see Figure 2), the noise is very noticeable.

Figure 2: Crop of Noisy Image
Figure 3: Layers Palette

When working on an image to reduce noise, it is always best to duplicate the Background layer and perform the noise reduction work on the duplicated layer. This allows more control and leaves the Background layer untouched. Thus, 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 (see Figure 3). The new layer is renamed the Median layer (see Figure 4).

Figure 4: Layers Palette with Median Layer

 

Figure 5: Median Dialogue Box

With the Median layer selected, the Median filter is launched (choose Filter/Noise/Median). The Median dialog box appears (see Figure 5).

The Median dialogue box has only one setting: the radius. The radius must be set to a point where the noise is reduced, but the detail is maintained as much as possible. A radius setting of 4 works well for this image. Figure 6 shows a crop of the image after the Median filter was applied.

Figure 6: Crop of Image after Median Filter
Figures 7 and 9 show crops of the image before the Median filter. Figures 8 and 10 shows the same crops after the Median filter. A comparison of these images shows that the Median Filter has been very effective in reducing the noise. However, a close examination of Figures 8 and 10 reveals the dark side of noise reduction. The detail in the image, after the Median filter was applied, is not nearly as crisp as in the original image. The problem is that it is very difficult for the filter to tell the difference between noise and image detail. Thus, when the filter is run to reduce noise, it usually reduces the detail to a certain degree.
Figure 7: Crop before Median Filter
Figure 8: Crop after Median Filter
Figure 9: Crop before Median Filter
Figure 10: Crop after Median Filter
Now, for many images, the procedure that has been completed up to this point may be just fine. After all, these are 100% crops of the unsharpened image. Once the image has been sharpened and printed, it will look much better. So, for some images, the photographer may want to stop the noise reduction work at this point. On the other hand, the image can be further improved.

Put an Edge on It

To further improve the image, it is necessary to apply the noise reduction that was just performed to the smooth areas (where the noise is the most noticeable) but not to the edges (where the noise reduction reduces detail). This can be done be creating a mask that protects the edges from the noise reduction.

Figure 11: Layers Palette after Edge Layer Added

The next step is to duplicate the Median layer by dragging the layer to the Create a new layer icon on the Layers palette. The new layer is renamed the Edge layer (see Figure 11).

Figure 12: Unsharp Mask Dialogue Box

The Edge layer is now sharpened with Unsharp Mask (choose Filter/Sharpen/Unsharp Mask). The purpose of this step is to sharpen the Edge layer so that it will be easier to detect the edges in the next step.

During this sharpening step, it is important to pay attention to the Threshold setting. The goal is to sharpen the detail without sharpening the noise. The Threshold setting is the key to this. The threshold should be set to a level that will prevent the minor tonal differences, which are caused by the noise, from being sharpened while allowing the more significant tonal differences, which are caused by the detail, to be sharpened. This will require some experimentation. For this image, the experimentation showed that a Threshold of 2 worked best.

Keep in mind that the purpose of this layer is simply to create a mask. This layer will not be part of the final image. Rather, before the procedure is done, this layer will be thrown away. So, don't spend too much time trying to create the perfect sharpening. The settings used for this image are shown in Figure 12.

Figure 13: Image after Find Edges Filter

With the Edge layer still selected, the Find Edges filter is run by choosing Filter/Stylize/Find Edges. The Find Edges filter will do just what its name implies. It will find the edges in the image. The image now appears as show in Figure 13.

Unfortunately, this is a challenging image. The problem is that some of the minor detail doesn't have much more tonal variation than the noise. This is shown in Figure 14.

Figure 14: Crop of Image after Find Edges Filter
Figure 15: Channels Palette
For the mask to have maximum effectiveness, it is necessary to reduce the noise while enhancing the detail. To achieve this, it is necessary to move to the Channels palette (see Figure 15) and examine the noise characteristics of the three channels.
Figure 16: Red Channel
Figure 17: Green Channel
Figure 18: Blue Channel
Looking separately at the red, green, and blue channels (see Figures 16 -- 18) indicates that the green channel has the best separation of the minor detail from the noise. The blue and red channels have a greater problem with noise. It is difficult to see in these web shots, but in Photoshop, it can be seen that the blue channel has the greatest problem with differentiating the noise from the detail. Consequently, the trick is now to move back to the Layers palette, select the Edge layer, and use the Channel Mixer (choose Image/Adjustments/Channel Mixer) to change the tonal distribution in the Edge layer so that more of the information comes from the green layer and less from the blue layer.
Figure 19: Channel Mixer Dialogue Box

Figure 19 show the Channel Mixer dialogue box settings used for this step. It can be seen that the Channel Mixer is bringing in most of the detail from the green channel, a little bit from the red channel, and very little from the blue channel (make sure that the Monochrome box is checked at the bottom of the dialogue box).

Figure 20 shows the results of the Channel Mixer. The Edge layer now has much less noise, but it still has the detail.

Figure 20: Crop of Image after Channel Mixer
Figure 21: Threshold Dialogue Box
The next step is to make the detail darker. This can be done using Threshold (choose Image/Adjustments/Threshold). The Threshold dialogue box appears as in Figure 21. Threshold is a tool that turns all of the pixels either black or white. Pixels lower than the Threshold Level become black. Pixels above the Threshold Level become white. The goal with this tool is to select a Threshold Level that will turn the detail black while leaving the noise white. For this image, some experimentation determined that a Threshold Level of 242 produced the best results, as shown in Figure 22. This figure shows that the major detail really stands out and that a pretty good job has been done with the minor detail considering that the minor detail was fairly faint in the original image.
Figure 22: Crop of Image after Threshold
Figure 23: Edge Layer after Inverting
Since this layer is going to be used to create a mask that reveals the edges and hides the smooth areas, it is necessary to invert the image (so that the edges are white) by choosing Image/Adjustments/Invert. The result is shown in Figure 23.
Figure 24: Channels Palette
The Edge layer is now turned into a selection by moving to the Channels palette and clicking on the Load channel as selection icon (see Figure 24).
Figure 25: Selection
Moving back to the Layers palette and turning off the eye icon on the Edge layer reveals the selection (see Figure 25).
Figure 26: Selection

It is best to save this selection by choosing Select/Save Selection. The Save Selection dialogue box appears as seen in Figure 26.

Once the selection has been saved, the Edge layer is no longer needed. So, the layer is dragged down to the Delete layer icon at the bottom of the Layers palette.

Figure 27: Layers Palette after Edge Layer Deleted
The Layers palette, at this point, is shown in Figure 27.
Figure 28: Layers Pallet after Detail Layer Added

The next steps are designed to add some of the detail back into the image. This is done by duplicating the Background layer by dragging the Background layer to the Create a new layer icon on the Layers palette. The Background Copy layer is renamed the Detail layer. The Detail layer is then moved above the Median layer. The Layers palette now looks as shown in Figure 28.

The Detail layer is a copy of the original image. The Median filter has not been applied to this layer. Thus, the detail (i.e., the edges) in this layer has not been affected by the Median filter. It is necessary to add the edges from this layer to the image without adding any information from the smooth areas. This is accomplished by using the selection that was just created to generate a mask for the layer (if the selection is no longer active, choose Select/Load Selection). With the Detail layer selected, choose Layer/Layer Mask/Reveal Selection.

Figure 29 shows a crop of the image after the mask was added. Notice that the smooth areas have little luminance noise. However, there is some noise along the edges. This noise can be reduced by clicking on the mask and applying a slight Gaussian Blur by choosing Filter/Blur/Gaussian Blur (see Figure 30).
Figure 29: Crop of Image after Channel Mixer
Figure 30: Gaussian Blur Dialogue Box
Figure 31: Final Layers Palette
The last step is to adjust the Opacity of the Detail layer to fine tune the detail in the image. For this image, the Opacity was left at 100%. Figure 31 shows the final Layers palette.
Figures 32 -- 34 show the effectiveness of this technique in reducing noise in smooth areas. Figure 32 shows the original image. Figure 33 shows the image after the Median filter (before the Detail layer was created). Figure 34 shows the final image (with the Detail layer). It can be seen that the noise has been significantly reduced by the Median filter.
Figure 32: Original Image
Figure 33: Image after Median Filter
Figure 34: Final Image
Figures 35 -- 37 show the effectiveness of adding the Detail layer. The original image (Figure 35) has detail, but there is a large amount of noise. Applying the Median filter (Figure 36) removes the noise, but this step also makes the detail less sharp. Adding the Detail layer (Figure 37) greatly improves the detail but still keeps the noise very low.
Figure 35: Original Image
Figure 36: Image after Median Filter
Figure 37: Final Image

The image is now ready for further editing, sharpening, and printing.

This technique is a great way to remove luminance noise. However, it does not handle color noise very well. For that, one more step needs to be added.

Articles

Noise -- Part I     Noise -- Part III