0% found this document useful (0 votes)
8 views25 pages

Spatial Domain Filtering

The document discusses image enhancement techniques, focusing on spatial and frequency filtering methods. It explains various types of spatial filters, including linear and non-linear filters, and their applications in smoothing and sharpening images. Key concepts such as correlation, convolution, and specific filter types like median, max, and min filters are also covered to illustrate their roles in image processing.

Uploaded by

swagatkarve
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views25 pages

Spatial Domain Filtering

The document discusses image enhancement techniques, focusing on spatial and frequency filtering methods. It explains various types of spatial filters, including linear and non-linear filters, and their applications in smoothing and sharpening images. Key concepts such as correlation, convolution, and specific filter types like median, max, and min filters are also covered to illustrate their roles in image processing.

Uploaded by

swagatkarve
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

By

Mr. S. M. Karve
IMAGE ENHANCEMENT
TECHNIQUES
IMAGE
ENHANCEMENT

SPATIAL FREQUENCY
FILTERING FILTERING

[Link] [Link]
[Link] [Link]
Introduction To Filters
FILTER:
Filter is a process that removes some unwanted
components or small details in a image.

TYPES OF FILTERS :
O SPATIAL DOMAIN FILTERS
O FREQUENCY DOMAIN FILTERS
SPATIAL FILTER
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
O Generate mxn linear Spatial filter requires mn mask
[Link] 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

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


follows

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


The Approaches
of
Spatial Filtering
Spatial filter consist of two steps
O A neighborhood (small rectangle)
O 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,
[Link] Spatial Filter
[Link] Linear Spatial Filter

O 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.
Spatial Filter Expression
O 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
O Correlation is moving the filter over the image
find the sum of products in each location.

O Convolution process is same as correlation but


the filter is first rotate by 180 degree.
Smoothing Spatial Filters
OSmoothing filters are used for blurring
and for noise reduction.
OBlurring is used as preprocessing such
as removal of small details from
image.
ONoise reduction is blurring with linear
or non linear filter.
IMAGE
SMOOTHING
TYPES OF SMOOTHING
SPATIAL FILTER

SMOOTHING
FILTERS

NON-LINEAR LINEAR
FILTERS FILTERS

MEDIAN MINMAX AVERAGING


FILTERS FILTERS FILTERS
Smoothing With Linear Filter
AVERAGING FILTER:
O The output of linear spatial filter computes the average
of pixels is called averaging filter or low pass filter.
O The major usage of average filter is reduction of
irrelevant detail in an image.

1 1 1 1 2 1

1/9 x 1 1 1 1/16 x 2 4 2

1 1 1 1 2 1
Cont,.
O Standard average of pixels calculated as follows

O At the end of filtering the entire image is divided by 9.


O So mxn is equal to 1/mn. Thus the coefficients pixels
are equal, so the filter is called box filter.
Non- Linear Spatial
Filter(order Statistic Filter)
MEDIAN FILTER:
O This filter ordering the pixels by replacing the value of
the center pixel with the value of rank list. The best
know filter in this category is median filter. This is best
for noise reduction.
O This median filter is effective for impulse noise called
as salt & pepper noise.
MAX FILTER:
O The max filter also used for spatial
[Link] is used for finding the
brightest points of an image.
O Expression of max filter is
R=max {Zk| k= 1,2,3,…….9}
MIN FILTER:
The min filter also used it is opposite of
max that is find the dull points of an image.

Expression of max filter is


R=min{Zk| k= 1,2,3,…….9}
Sharpening Spatial Filters

O The sharpening spatial is to highlight the transactions


in intensity .
O There are many applications, such as
electronic priming,
medical images,
military systems are used this sharpening
technique.
Foundation
Sharpening filters that are based on two
derivatives.
[Link] derivatives.
[Link] derivatives.
First derivative :
O Must be zero for area of constant intensity.
O Must be nonzero of intensity step or map.
O Must be nonzero along ramp.
(σ f/σ x) = f (x +1) – f (x).
Second derivative

O Must be zero in constant areas.


O Must be nonzero at one end and other end of
intensity ramp.
O Must be zero along ramps.
Image Sharpening(the Laplacian)
O This approach uses the second order derivative for
construct the filter mask.
O The laplacian for the image function f(x,y) of two
variable is,

O The X direction,

O For Y direction,
By concluding the above three equations,

Taking the derivative of an image results in


sharpening of an image.

The derivative of an image cam be computing by


using gradient

You might also like