0% found this document useful (0 votes)
26 views2 pages

% Expt 6: To Perform Image Filtering in Frequency Domain (LPF)

The document discusses performing image filtering in the frequency domain using a low pass filter on an image. It loads an image, takes its FFT, multiplies it with a Gaussian low pass filter, takes the inverse FFT and displays the filtered image.

Uploaded by

Shubham
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)
26 views2 pages

% Expt 6: To Perform Image Filtering in Frequency Domain (LPF)

The document discusses performing image filtering in the frequency domain using a low pass filter on an image. It loads an image, takes its FFT, multiplies it with a Gaussian low pass filter, takes the inverse FFT and displays the filtered image.

Uploaded by

Shubham
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
You are on page 1/ 2

%***********************************************************************************

*
%Name: Shubham Patil
%Division: A Roll no.: 439
%***********************************************************************************
*
% Expt 6 : To perform image filtering in frequency domain [LPF]
clear
close
clc

I= imread('cameraman.tif')
imshow(I);title("Original Image")

//create a low pass filter


H = mkfftfilter(I,"gauss",0.1);
//clf;
//figure();imsurf(H);title("Low pass filter, middle of plot shows the low frequencies components.");

//Take the FFT of the image


Ifft = fft2(im2double(I));
//clf;
figure();imsurf(log(Ifft),128);title("Image imformation on low frequencies - 4 corners")

//Multiply the transform image with the filter


Ishift = Ifft.*fftshift(H);
//clf;
figure();imsurf(log(Ishift),128);title("After applying low pass filter");

//Take the inverse FFT.


Iout= real(ifft(Ishift));
//clf;
figure();imshow(Iout); title("Low Pass Filtered Image");
%*************************************OUTPUT**************************************

You might also like