0% found this document useful (0 votes)
106 views1 page

Low Pass Filter on Noisy Image

The document describes applying a low pass average filter and high pass filter to an image with Gaussian noise. It loads an image, adds Gaussian noise, then applies a 3x3 averaging filter using different masks - a uniform low pass filter and edge-detecting high pass filter. It displays the original, noisy, low pass filtered, and high pass filtered images for comparison.

Uploaded by

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

Low Pass Filter on Noisy Image

The document describes applying a low pass average filter and high pass filter to an image with Gaussian noise. It loads an image, adds Gaussian noise, then applies a 3x3 averaging filter using different masks - a uniform low pass filter and edge-detecting high pass filter. It displays the original, noisy, low pass filtered, and high pass filtered images for comparison.

Uploaded by

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

Practical 5

Aim : Low pass Average filter and High pass filter used on an image with
Gaussian noise
clear all;
clc;
aa=imread('[Link]');
ab=imnoise(aa,'gaussian'); %Adding noise
q=double(ab);
[row col]=size(q);
w=[1 1 1 ; 1 1 1 ; 1 1 1]/9; %Creating the low pass average mask
v=[-1 -1 -1 ; -1 8 -1 ; -1 -1 -1]; %Creating the high pass average mask
for i=[Link]row-1
for j=[Link]ol-1
q1(i,j) = (w(1) * q(i-1,j-1)) + (w(2) * q(i-1,j)) + (w(3) * q(i1,j+1)) + (w(4) * q(i,j-1)) + (w(5) * q(i,j)) + (w(6) * q(i,j+1)) + (w(7) *
q(i+1,j-1)) + (w(8) * q(i+1,j)) + (w(9) * q(i+1,j+1)) ;
end
end
for i=[Link]row-1
for j=[Link]ol-1
q2(i,j) = (v(1) * q(i-1,j-1)) + (v(2) * q(i-1,j)) + (v(3) * q(i1,j+1)) + (v(4) * q(i,j-1)) + (v(5) * q(i,j)) + (v(6) * q(i,j+1)) + (v(7) *
q(i+1,j-1)) + (v(8) * q(i+1,j)) + (v(9) * q(i+1,j+1)) ;
end
end
subplot(2,2,1),
imshow(uint8(aa));title('Original Image');
subplot(2,2,2);
imshow(uint8(ab));title('Original Image with Gaussian Noise');
subplot(2,2,3);
imshow(uint8(q1));title('Image after using Low Pass Average Filter on
Gaussian Noised image');
subplot(2,2,4);
imshow(uint8(q2));title('Image after using high Pass Average Filter on
Gaussian Noised image');

You might also like