3.1.2. Highpass Filtering and Unsharp Masking


    Highpass filtering emphasizes the high-frequency components of a signal while reducing the low-frequency components. Because edges or fine details of an image are the primary contributors to the high-frequency components of an image, high­pass filtering often increases the local contrast and sharpens the image.

    Unsharp masking, which has been known to photographic artists for a long time, is closely related to highpass filtering. In unsharp masking, the original image is blurred (unsharpened) and a fraction of the unsharp image is subtracted from, or masks, the original. The subtraction is performed by adding the negative of the unsharp image to the original. The image processed by unsharp masking can be expressed as


                        g(n1,n2) = af(n1,n2)- bfL(n1,n2)                                                                (3.2)


where f(n1,n2) is the original image, fL(n1,n2) is the lowpass filtered or unsharp image, a and b are positive scalars with a> b, and g(n1,n2) is the processed image. Rewriting f(n1,n2) as a sum of the lowpass filtered image fL(n1,n2) and the highpass filtered image fH(n1,n2), we can write (3.2) as


                        g(n1,n2) = (a-b). fL(n1,n2) +a.fH(n1,n2)                                                     (3.3)


From (3.3), it is clear that high-frequency components are emphasized over low- frequency components and that unsharp masking is some form of highpass filter­ing.

    Some typical examples of the impulse response of a highpass filter used for contrast enhancement are shown in Figure 3.8. One characteristic of all the filters in Figure 3.8 is that the sum of all amplitudes of each impulse response is one, so that the filter frequency response H(w1,w2) is one at w1=w2= 0 and passes the DC component unaltered. This characteristic has the effect of preservingthe average intensity of the original image in the processed image. It should be noted that this characteristic does not itself guarantee that the intensity of the processed image will remain in the range between 0 and 255. if  intensities of some pixels in the processed image lie outside this range, they can be clipped to 0 and 255, or the image can be rescaled so that the intensities of all pixels in the processed image lie in the range between 0 and 255.



    Figure 3.9 illustrates the performance of highpass filtering. Figure 3.9(a) shows an original image of 256 x 256 pixels, and Figure 3.9(b) shows the result of highpass filtering using the filter in Figure 3.8(a). Although the original image is not degraded, some highpass filtering increases the local contrast and thus gives it a sharper visual appearance. However, because a highpass filter emphasizes high-frequency components, and background noise typically has significant high­-frequency components, highpass filtering tends to increase the background noise power. A comparison of the background regions of Figures 3.9(a) and 3.9(b) shows that the highpass filtered image appears more noisy than the unprocessed image. The accentuation of background noise is a limitation of any algorithm that attempts to increase the local contrast and sharpen the visual appearance of an image.