Question

Matlab Exercise

a)Filter the image using both filters and display the original image(By loading and displaying ‘rice.png’ image by converting variable format to “double”.) and filtered images. (Image must be displayed in gray scale. Axis spacings must be equal and axis labels must be turned off. Each image must have its own color bar.)

b). Take [256, 256] Fourier Transform of the image ,[256, 256] Fourier Transform of the filters and take inverse Fourier Transform of filtered images.

b)What kind of filters are filt1 ve filt2 and what is the difference between them

11211 12421 11211 12 121 242 121

0 0
Add a comment Improve this question Transcribed image text
Answer #1

close all,
clear all,
clc,

Orig = imread('rice.png');
subplot(1,3,1); imshow(Orig); title('Original Image');

Filt_1 = [1,2,1;2,4,2;1,2,1]; Filt_1 = (1/16)*Filt_1;
Mask_1_Filter_Image = imfilter(Orig,Filt_1);
subplot(1,3,2); imshow(Mask_1_Filter_Image); title('Filter Image using Filt_1');

Filt_2 = [1,1,1,1,1;1,1,2,1,1;1,2,4,2,1;1,1,2,1,1;1,1,1,1,1]; Filt_2 = (1/32)*Filt_2;
Mask_2_Filter_Image = imfilter(Orig,Filt_2);
subplot(1,3,3); imshow(Mask_2_Filter_Image); title('Filter Image using Filt_2');

figure,
Y = fft2(Orig,256,256);
subplot(2,2,1); imshow(Y); title('FFT of Original Image');
InverseFFT = ifft2(Y);
subplot(2,2,2); imshow(Y); title('Inverse Transform');


Y = fft2(Filt_1,256,256);
subplot(2,2,3); imshow(Y); title('FFT of FILT_1');

Y = fft2(Filt_2,256,256);
subplot(2,2,4); imshow(Y); title('FFT of FILT_-2');

Filter Image using Filt, Filter Image using Filt Original Image

FFT of Original Image Inverse Transform FFT of FILT FFT of FILT2

Add a comment
Know the answer?
Add Answer to:
Matlab Exercise a)Filter the image using both filters and display the original image(By loading and displaying ‘rice.png...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT