You are on page 1of 8

Spatial filters

Ministry of Higher Education and Scientific Research

Middle Technical University

Engineering Technical College – Baghdad

Mechatronics Department

Fourth Stage

Image Processing

The final Report : Spatial filters with smoothing & sharpening filter

The supervisor: Sura Ghanim

Name: Thoalfokar Ali khalaf

Date : 23/6/2020

Image Processing I
Spatial filters

IMAGE ENHANCEMENT

Image enhancement is to improve the brightness, contrast and


appearance of an images.

IMAGE ENHANCEMENT TECHNIQUES

Introduction To Filters:

Filter is a process that removes some unwanted components or small


details in a image.

TYPES OF FILTERS :

 SPATIAL DOMAIN FILTERS .


 FREQUENCY DOMAIN FILTERS.

Image Processing II
Spatial filters

Spatial filters

The spatial filter is just moving the filter mask from point to point in
an image. The filter mask may be 3x3 mask or 5x5 mask or to be 7x7
mask.
Example:
3x3 mask in a 5x5 image

Generating Spatial Filter mask:


Generate mxn linear Spatial filter requires mn mask
coefficients.These are selected based on the type of filter. so it
computes the sum of products.
Example ,the average of 3x3 neighborhood on (x,y) is calculated by
using the formula

 If we take Gaussian function of 2 values the basic formula as


follows

 ‘σ’ is standard deviation , x and y are integers.

Image Processing III


Spatial filters

The Approaches of Spatial Filtering


Spatial filter consist of two steps

 A neighborhood (small rectangle)


 A predefined operation performed on image pixels.

Filtering creates a new pixel value replaced by old pixel value.

3*3 mask and the image section

Types Of Spatial Filters:

There are two types of filter,

1.Linear Spatial Filter.

2.Non Linear Spatial Filter.

 Each pixel in an image can be replaced with constant value then it is


called as linear spatial filter otherwise it is called as non-linear.

Image Processing IV
Spatial filters

Spatial Filter Expression:


For m x n size of image,
we assume m=2a+1 & n=2b+1 where a,b are positive integers. so the
linear spatial filter of image MxN with filter size mxn is by following
expression.

Spatial Correlation & Convolution:


 Correlation is moving the filter over the image find the
sum of products in each location.
 Convolution process is same as correlation but the filter is
first rotate by 180 degree.
Smoothing Spatial Filters
 Smoothing filters are used for blurring and for noise reduction.
 Blurring is used as preprocessing such as removal of small details
from image.
 Noise reduction is blurring with linear or non-linear filter.
Image smoothing

Image Processing V
Spatial filters

TYPES OF SMOOTHING FREQUENCY FILTER:

Sharpening Spatial Filters

 The sharpening spatial is to highlight the transactions in intensity .


 There are many applications, such as electronic priming, medical
images, military systems are used this sharpening technique.

Image sharpening

Image Processing VI
Spatial filters

Example for sharpening:

Image Processing VII


Spatial filters

References

1. Simonoff, Jeffrey S. (1998) Smoothing Methods in Statistics, 2nd


edition.
2. O'Haver, T. (January2012).
3. Easton, V. J.; & McColl, J. H. (1997)"Time series".

Image Processing VIII

You might also like