Hi Pass Filter/Edge Detection               


To preserve edges when scaling, we need to first detect where edges occur, then enhance them before scaling up. The blurring effect of the interpolating filter is averaged out with the enhanced edges. The resulting edge sharpness is perceptually similar to the original.. The blurring effect and the edge detection is shown in Fig 3. below.

 

Fig 3: Edge Detection to improve blurring.

Edge detection is achieved with a high-pass filter. There are various edge detection filters like,

which are all directional, meaning they detect edges in specific directions. Operators that are able to detect all edges regardless of direction are called "isotropic". This is achieved by using filters that operate on both image axes simultaneously.

 

The most common isotropic edge detection filter is the laplacian mask which is what we have chosen for this project. The laplacian is a second order derivative given by equation 1:
 

                (1)

 

This can be represented by the convolution kernel:

[ -1  2  -1 ] ´ a

The multiplier 'a' is the scaling factor that controls the extent of edge detection.

This is extended to two dimensions by multiplying the kernel with its transpose as shown in Fig. 4.
 

Fig 4: Edge detection convolution kernel.

 

In Fig 5 we can see how the second derivative detects edges. Adding these detected edges to the original image enhances the edges on the image. The effect of the blurring filter is then reduced as shown in Fig 6 , which shows the image Lena, again scaled up by 3 in each dimension from 128 by 128. This time the laplacian is used to enhance the edges. The improvement offered by the edge detection filter should be apparent.

 

Fig 5: Second Derivative Edge Detection.

 

Lena Blurred                       

  Lena with Enhanced Edges

Figure 6: Lena Blurred & with Enhanced edges

The limitation of this edge-preservation method is that, if the original image has a lot of shot noise (high-frequency), the noise is also enhanced by the laplacian. After scaling this noise is amplified and could result in a perceptual loss of quality rather than gain. The figure 7 below shows the same edge-detection and scaling procedure on image Lena but with additive Gaussian noise. The original image is still relatively perceptually noiseless, However the noise has been amplified by the edge-preservation/scaling algorithm.

 

Fig 7: Up-scaling noisy image by 3 with edge detection. Noise is also amplified.


Shot noise as shown above can be limited by low-pass filtering, effectively smoothing out the noise. Since the smoothing operation is linear across the entire image, the edges that were to be preserved are also washed out by the Gaussian filter. So there is a trade off between edge-preservation and noise reduction and this limits the effectiveness of this method while scaling images. It is hence desirable to be able to preserve edges while washing out noise. This can be achieved by a non-linear filter that distinguishes between noise (filter out) and edges (enhance). we explore the bilateral filter proposed in [1] as a solution. This is discussed in the next section.

 

<Previous Page>                                                                                                                      <Next Page>

Home