Explain filtering in spatial domain.
1 Answer

i. The use of spatial masks for image processing is called spatial filtering and the masks are called spatial filters.

ii. Spatial filtering involves passing a weighted mask or kernel over the image and replacing the original image pixel value corresponding to the centre of the kernel with the sum of original pixel values in the region corresponding to the kernel multiplied by the kernel weight.

iii. For example consider digital sub-image F and 3X3 filter mask was given below:

Input image $F = \begin{bmatrix} \ z_1 & z_2 & z_3 \\ \ z_4 & z_5 & z_6 \\ \ z_7 & z_8 & z_9 \\ \end{bmatrix} $and Filter mask $w = \begin{bmatrix} \ w_1 & w_2 & w_3 \\ \ w_4 & w_5 & w_6 \\ \ w_7 & w_8 & w_9 \\ \end{bmatrix} $

The response of a linear mask is given as,

$R=Z_1 w_1+Z_2 w_2+⋯+Z_9 w_9$

iv. If the centre of the mask is at location (x, y) in the image the gray level of the pixel located at (x, y) is replaced by R. The mask is then moved to the next pixel location in the image and the process is repeated. This continues until all pixel locations are covered.

v. The different types of filters can be given as follows:

  • Smoothing Linear Filters: Examples of smoothing linear filters are Low Pass Averaging Filter, Weighted Averaging Filter and Trimmed Averaging Filter. The masks can be given as,

enter image description here

  • Smoothing Non-Linear Filters: They are also known as Ordered Statistic Filters. Examples of Non-Linear filters are Median, Max and Min Filter.
  • Sharpening First Order Derivative Filters: Examples are Robert, Prewit, Sobel and Fri-Chen filter.

enter image description here

  • Sharpening Second Order Derivative Filters: Examples are Laplacian, High Pass and High Boost Filter.

enter image description here

Please log in to add an answer.

Continue reading...

The best way to discover useful content is by searching it.