Posted: May 22nd, 2023

Write a program to implement the Gaussian low pass filter

Formula

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
Order Essay

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

%% Q# 4 Gaussian Low Pass Filter

clc

clear all;

close all;

I = imread(‘img03.jpg’); %% Reading Input Image

[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
Open chat
1
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.