In MATLAB, write codes of following steps please 1. Load lena.tif. a. Calculate
ID: 3704399 • Letter: I
Question
In MATLAB, write codes of following steps please 1. Load lena.tif. a. Calculate and display Fourier Transform of the image. b. Add Gaussian noise to the original image by using imnoise function with variance of 0.1. Calculate and display Fourier 1 c. Apply ideal lowpass filter in the frequency domain to remove this noise. d. Predefined gaussian lowpass filter by using fspecial function and giving the radius 10,30 and 50 in the frequency domain to remove this noise. e. Display filtered images both in frequency and in time domain f. Write your comments by comparing noisy and filtered imageExplanation / Answer
a. To get Fourier Transform of an image
imgA=im2double(imread('lena.tif'));
title('Original Lena Image');
imshow(imgA)
F=fftshift(fft2(imgA)); // This gives you the Fourier Transfrom of an image
plot(F)
b.
I = imread('lena.tif');
imshow(I)
//To add noise: I am taking mean as value= 0.01
J = imnoise(I,'gaussian',0.01, 0.1);
imshow(J)
To get filtered Image
ImgA = imread('lena.tif');
ImN=im2double(ImgA);
filteredImage = conv2(ImN, ones(5,5));
figure;
imshow(filteredImage, []);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.