Filters

Filters can accomplish the task of sharpening or smoothing an image but can not modify the geometry of an image.

Filter is an operation that use more than one pixel from the original image for computing each new pixel value.5.1.png

Image will look sharp when rises or drops sharply of the local intensity.

Image will look blurred when adjusts smooth of the local intensity.

For the filter function in uses a local region of support that is centered at the current coordinate (u,v) such that 3×3, 5×5, 7×7 or even 21×21 pixels.

5.2.png

Each new pixel value I'(u, v) is computed as a function of the pixels in a corresponding region of source pixels Ru,v in the original image I.

Linear Filters

Linear filters combine the pixel value in the support region. For any linear filter, size and shape of the support region are specified by filter matrix or filter mask H(i,j).

5.4

5.3

The filter has its own coordinate system with the origin ‘hot spot’ located at the center of the filter matrix.

The principal operation of a filter

505

There are 2 different ways that require to storage space for the resulting image.

5.6.png

(a): The result of the filter is first stored in an intermediate image and then copied back to the original image.

(b): The original image is first copied to an intermediate image that serves as the source for the actual filter operation. The result replaces the pixels in the original image.

Types of Linear Filters

There are 2 types of linear filters as follow.

  1. Smoothing filters : All of the filter coefficients are positive. For example ‘Box filter’, ‘Gaussian filter’
  2. Difference filters : Some of the filter coefficients are negative. For example ‘Laplace or Mexican filter’

5.7.png

(a) Box filter,  (b) Gaussian filter,  (c) Laplace or Mexican filter

Properties of Linear filters

Linear convolution : combines 2 functions of the same dimension

5.8.png

The original image I is subjected to a linear convolution (∗) with the convolution kernel H, producing the resulting image I’.

https://github.com/Team17330/Filter

Box Filter

1.png

Gaussian Filter

2.png

Nonlinear Filters

The source pixel value are combined by some non-linear filter function that compute the result at same image position from the pixel inside the moving region of the original image.

Types of non-linear filter

1. Minimum filter

The minimum filter replaces every image pixel by the minimum of the pixels in the corresponding filter region R.

Minimum filter will remove the white dots but widens all the dark structure.

2. Maximum filter

The maximum filter replaces every image pixel by the maximum of the pixels in the corresponding filter region R.

Maximum filter will remove the dark dots but widens all the white structure.

5.9.png

Minimum and maximum filters applied to a grayscale image. The original image (a, b) is corrupted with “salt-and-pepper” noise. The 3 × 3 pixel minimum filter eliminates the bright dots and widens all dark image structures (c, d). The maximum filter shows the exact opposite effects (e, f).

3. Median filter

The median filter replaces every image pixel by the median of the pixels in the corresponding filter region R.

5.10.png

Advantage of median filter

  • Eliminate the noise dots
  • Keeps the remaining structure largely intact
  • regardless of its distance from the center

Disadvantage of median filter

  • create small spots of flat intensity that affect the sharpness

5.11.png

Linear smoothing filter vs. median filter. The original image is corrupted with “salt-and-pepper” noise (a, b). The linear 3 × 3 pixel box filter (c, d) reduces the bright and dark peaks to some extent but is unable to remove them completely. In addition, the entire image is blurred. The median filter (e, f)

4. Weighted median filter

Each pixel value is inserted into the extended pixel vector multiple times, as specified by the weight matrix W.

5.12.png

Reference

Principles of digital image processing, Fundamental techniques, Wilhelm Burger Mark J. Burg

Leave a comment

Create a free website or blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started