Assignment # II-01: Topic

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Assignment # II-01

Topic Noise Reduction

Course Instructor: Dr. Syed M. Adnan


Total Marks: 20
Issue Date: 6/21/2020
Submission Date: 6/26/2020

Registration# Name
Submitted by: 17-CS-02 Zain Ul Abidian

Obtained Marks:
Q. No. 1:

How can you defend this statement that circularly symmetric filter gives more smooth
effect then box averaging filter?

Answer :

In circularly symmetric filter Nearest neighboring pixels have the most influence so it has one
parameter which is sigma : isotropic and it give more smooth effect

While In averaging filter :

As squares aren't smooth and filtering an image with a filter that is not "smooth" seems wrong if
we're trying to blur the image.

The outcome is that :


Sigma as a width of a the Gaussian filter, as the variance of smoothing of the blurring.

Q. No. 2:
i. Load a good quality image of your choice. Add some noise in it using some scaling
factor Sigma.

ii. Display the noisy image.

iii. Create a Gaussian filter using fspecial function

iv. Apply your filter to remove noise from that particular noisy image.

v. Try out different parameters/values for noise generation and smooth effect.

Answer :
I = imread('eight.tif');
figure
imshow(I)

Add salt and pepper noise to the image:

J = imnoise(I,'salt & pepper',0.02);


figure
imshow(J)
iii. Create a Gaussian filter using fspecial function
H = fspecial('motion',20,45);
MotionBlur = imfilter(I,H,'replicate');
imshow(MotionBlur)

iv. Apply your filter to remove noise from that particular noisy image.
Filter the noisy image, J, with an averaging filter and display the results. 

Kaverage = filter2(fspecial('average',3),J)/255;
imshow(Kaverage)
Now use a median filter to filter the noisy image, J

Kmedian = medfilt2(J);
imshowpair(Kaverage,Kmedian,'montage')

v.
 Image smoothing is a method of improving the quality of images. • Smoothing is performed by
spatial and frequency filters 2. Spatial filtering • Spatial filtering term is the filtering operations
that are performed directly on the pixels of an image

You might also like