Professional Documents
Culture Documents
03/10/2019
1 Introduction
In the given lab we would work on high pass and low pass filtering by choosing appropriate kernel's in MATLAB.
The given lab work will give us better understanding regarding the effect of an filter on the image. We would also
be able to understand the predefined functions like "fspecial" and "imfilter" for edge detection, image smoothing
etc.
Applications of image filtering using high pass and low pass filters would be better understood by carrying out
the given lab work.
2 Methodology
In the given methodology initially I have used the FCC image of kanpur area to show Image Smoothing, edge
detection. Image of IIT Kanpur is used for Edge Strength and Edge Gradient image.
1
Lab Report 8 CE671A
2.4 Applying different filters on the image and delineating the results
2.4.1 Building 2 element filter
• Horizontal Low Pass Filter
3
Lab Report 8 CE671A
Horizontal
Low pass • We can observe
Filter smoothness in the
image.
• By applying hori-
zontal low pass filter
smoothness along
vertical direction
can be observed.
Horizontal
High Pass • The horizontal high
Filter pass filter defines
the vertical edges in
the image.
4
Lab Report 8 CE671A
Vertical
Low Pass • We can observe
Filter smoothness in the
image.
• By applying verti-
cal low pass filter
smoothness along
horizontal direction
can be observed.
Vertical
High Pass • The vertical high
Filter pass filter defines
the horizontal edges
in the image.
5
Lab Report 8 CE671A
Disk
• We can observe
smoothness in the
image.
• Circular Averaging
takes place by using
this option.
• The smoothing
intensity is higher
than normal average
filter.
Gaussian
• This being a low
pass filter we ob-
serve smoothness in
the image.
• The intensity of the
smoothness can be
defined by specify-
ing the standard de-
viation value.
• More the stan-
dard deviation
more smoothness is
observed.
laplacian
• This being a high
pass filter, it is used
for edge detection.
• Unlike horizontal
and vertical high
pass filter, a sin-
gle laplacian filter
emphasises all the
6 edges in the image.
Lab Report 8 CE671A
Log
• This filter is the
laplacian of gaussian
filter.
• Hence the image is
smoothned with the
help of gaussian fil-
ter and then edge
detection is carried
out using laplacian
filter.
Motion
• This filter is used to
stabilize the moving
image or the image
in motion.
• Here as the image
is stable image use
of motion filter, ap-
parently makes it
look like image is
captured through a
moving platform.
Prewitt
• This is a high pass
filter usedd for hor-
izontal edge detec-
tion.
• We can see that the
horizontal edges in
the image are em-
phasised over verti-
cal edges.
8
Lab Report 8 CE671A
• In edge gradient image we assign values according to the direction of the image.
• The edge gradient image for IIT Kanpur campus look like-
2.7 Using inbuilt MATLAB functions for Edge Detection, Edge Strength and Edge
Gradient
• In MATLAB we have inbuilt functions for edge detection also different methods of edge detection can be
adopted by MATLAB.
• For the following example I have consider Canny Edge detection, it can also be noted that sensitivity of
the edge detection can be altered.
9
Lab Report 8 CE671A
• We can find out the Gradient Magnitude image and Gradient Direction image using in built "imgradient"
and "imgradientxy".
• The Gradient Magnitude image for IIT kanpur campus usinng imgradient command-
• The Gradient Direction image for IIT kanpur campus usinng imgradient command-
10
Lab Report 8 CE671A
3 Discussion
• There are number of image filtering options some of which are predefined in MATLAB, the effect of every
image filter on the image is different.
• Depending upon the necessity we decide which image filter to be used or how many filters and in which
order should they be used.
• Image filters like "sobel", "prewitt" are high pass filters and are used for horizontal edge detection.
• Image filters like "laplacian" is also a high pass filter but it can be usedd for both horizontal and vertical
edge enhancement.
• The low pass filters like "average" or "gaussian" is used to reduce the noise from the image.
• The gradient magnitude image defines the intensity of the edge present in the image.
• The gradient direction image defines the direction of the edge present in the image.
4 Conclusion
• There are different types of image filters and for which different kernel operators are needed to be defined.
• Depending upon the input data and the output requirement the selection of image filter or filters is done.
• High pass filters are used for edge enhancement purposes and before applying any high pass filter we should
get rid of any noise present in the image.
• Low pass filters are used for smoothing the image hence reducing the noise of the image.
References
[1] https://in.mathworks.com
[2] https://blogs.mathworks.com
[3] https://tex.stackexchange.com
[4] https://en.wikipedia.org
[5] https://www.quora.com
[6] https://www.tutorialspoint.com
[7] https://theailearner.com
11