Posted: May 22nd, 2023

# Write a program to implement the Gaussian low pass filter Plot the filter using â€œmeshâ€ or â€œsurfaceâ€; filter the test image â€œimg03.jpgâ€ with ideal low pass filter with cutoff frequencies set at radii values 5, 30, 80 and 230.

Don't use plagiarized sources. Get Your Custom Essay on
Write a program to implement the Gaussian low pass filter
Just from \$13/Page

The Gaussian Low pass filter code is given below. The values of the radial distance can be modified easily using the code .

%% Q# 4 Gaussian Low Pass Filter

clc

clear all;

close all;

[m,n]=size(I);%% finding size of image and stroing in m and n

D0 = 5;%% CHANGE the distance parameter and observe the result

[u,v]=dftuv(m,n);%% Creating

d= sqrt(u.^2 + v.^2);%% Calculating the distance

G_Lfilt = exp(-(d.^2)./(2*(D0^2)));

G_Lfilt_s = fftshift(G_Lfilt);

Iff = fft2(I);%% Fourier Transform of the image

Rf = Iff.*G_Lfilt; %Multiplying filter with the image both are in Fourier Domain

R = ifft2(Rf); % Inverse fourier transfrom of the above filtered image

figure;

% Displaying the original image

subplot (2,2,2); imshow(I);title(â€˜Original Imageâ€™)

% Displaying the final result

subplot (2,2,4); imshow(R,[]);title(â€˜Resultant Image after Filteringâ€™)

% Displaying the mesh plot of filter tranfer function

subplot (2,2,[1,3]); mesh(G_Lfilt_s);title(â€˜Filter Mesh Plot D0 = 5â€™)

### Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

## Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
\$0.00
Need assignment help? You can contact our live agent via WhatsApp using +1 718 717 2861

Feel free to ask questions, clarifications, or discounts available when placing an order.