4. 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
5. 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
6. Generating Spatial Filter mask
O 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
O If we take Gaussian function of 2 values the basic formula as
follows
O âÏâ is standard deviation , x and y are integers.
7. 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.
9. Types Of Spatial Filters
There are two types of filter,
1.Linear Spatial Filter
2.Non 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.
10. 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.
11. 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.
12. Vector Representation Of
Linear Filtering
O The vector representation R should be formed for the
linear filter as follows,
R = w1 z1+w2 z2+ -------- Wmn Zmn
O For example,
Here we rotate the mask by 180 ,this shown by 3x3 as
follows,
w1 w2 w3
w4 w5 w6
w7 w8 w9
13. 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.
15. TYPES OF SMOOTHING
FREQUENCY FILTER
SMOOTHING
FILTERS
NON-LINEAR
FILTERS
MEDIAN
FILTERS
MINMAX
FILTERS
LINEAR
FILTERS
AVERAGING
FILTERS
16. 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/9 x 1/16 x
1 1 1
1 1 1
1 1 1
1 2 1
2 4 2
1 2 1
17. 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.
18. 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.
19. MAX FILTER:
OThe max filter also used for spatial
filtering.This is used for finding the
brightest points of an image.
OExpression of max filter is
R=max {Zk| k= 1,2,3,âŠâŠ.9}
20. 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}
21. 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.
22.
23. Foundation
Sharpening filters that are based on two
derivatives.
1.First derivatives.
2.Second 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).
24. 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.
25. 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,
26. 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