Cut off frequency radius of the ideal filter

Assignment Help MATLAB Programming
Reference no: EM132569451

ENGI 7854 Image Processing and Applications - Memorial University of Newfoundland

Introduction

The objective of this laboratory exercise is to get familiarized with frequency domain filtering concepts.

Frequency Domain Procedure Review

The frequency domain image filtering process can be performed as follows:
1. Given the input image f (x, y) of size M × N , obtain the padding sizes P = 2M and Q = 2N .
2. Form a padded image of size P × Q using zero padding.
3. Multiply f (x, y) by (-1)x+y to centre the Fourier transfrom (FT) on the P × Q frequency rectangle.
4. Compute the DFT, F (u, v) of the centred image
5. Construce a real, symmetric filter transfer function, H(u, v), of size P × Q with centre at (P/2, Q/2).
6. Form the product G(u, v) = H(u, v)F (u, v) using element-wise multiplication.
7. Obtain the Inverse Fourier transform of G(u, v), ignoring parasitic complex components:
gp(x, y) = (real[F-1G(u, v)])(-1x+y)

8. Obtain the final result, g(x, y), of the same size as the input image by extracting the M × N region from the top left quadrant of gp(x, y).

Note that centering the transform helps to visualize the filtering process and to generate the filter functions, but centering is not a fundamental requirement.

Part 1: Low pass and High pass filter design

1. Download the test image (puppy.jpg) and lp hp filters.m from D2L under Lab 3 and save it in the MATLAB working directory. Read the file and understand the implementation.

2.Read the image and convert the image to a grayscale image. Obtain the padding parameters and FT the image.

F_rgb=imread('puppy.jpg'); % read the gs image
F=rgb2gray(F_rgb);
im_size=size(F); % Obtain the size of the image
P=2*im_size(1);Q=2*im_size(2); % Optaining padding parameters
as 2*image size
FTIm=fft2(double(F),P,Q); % FT with padded size

3. Design the ILPF
D0 = 0.1*im_size(1); %Cutoff freqency radius is 0.1 times the
the hight of the image
n=0; %For use only in Butterworth filters. For BTW filters,
Order(n)>0
%Filter_type=('ideal' or 'btw' or 'gaussian')
%lp_or_hp=('lp' or 'hp' for low pass or high pass),
Filter = lp_hp_filters('ideal','lp', P, Q, D0,n); % Calculate
the LPF
4. Implement the filter by multiplying the FT of the image with filter. Undo padding.
Filtered_image=real(ifft2(Filter.*FTIm)); % multiply the FT of
image by the filter and apply the IDFT
Filtered_image=Filtered_image(1:im_size(1), 1:im_size(2)); %
Resize the image ( undo padding)

5. Move the origin of frequency spectrum to the center and display the results

Fim=fftshift(FTIm); % move the origin of the FT to the center

FTI=log(1+abs(Fim)); % compute the magnitude
display)
(log to brighten
Ff=fftshift(Filter); % move the origin of the FT to the center
FTF=log(1+abs(Ff)); % compute the magnitude (log to brighten

display)
subplot(2,2,1), imshow(F,[]), title('Original Image'); % show
the image
subplot(2,2,2), imshow(FTI,[]), title('FT of Original'); %
show the image
subplot(2,2,3), imshow(FTF,[]), title('Filter in frequency
domain'); % filter
subplot(2,2,4), imshow(Filtered_image,[]), title('Filtered
Image'); % show the image

928_figure5.jpg

Figure 1: Result of ILPF the image

Part 2

1.Implement an Ideal low pass filter for cutoff frequencies (0.3 and 0.7 of image height). 2.Implement a Butterworth low pass filter for cutoff frequencies (0.1 and 0.5 of image height) and order n = 1, 5, 20.
3. Implement a Gaussian low pass filter for cutoff frequencies (0.1, 0.3 and 0.7 of image height) .
4. Implement an Ideal high-pass filter for cutoff frequencies (0.1, 0.3 and 0.7 of image height). 5.Implement a Butterworth high pass filter for cutoff frequencies (0.1 and 0.5 of image height) and order n = 1, 5, 20.
6.Perform a Gaussian high pass filtering for cutoff frequencies (0.1, 0.3 and 0.7 of image height).

Discussion

1. What can you observe when increasing the cut off frequency radius of the Ideal filter?

2. What can you observe when increasing the order of the Butterworth filter when the cut-off frequency remains the same?

3. Discuss the general performance of the Gaussian filters in comparison to the Ideal and Butterworth filters. You do not need to discuss each possible comparison case. Only discuss any interesting phenomenon or performance observations.

Note: Include your MATLAB code in your lab report along with your results.

Reference no: EM132569451

Questions Cloud

Identify different personality types or behaviors : As a leader, it is expected for you to be able to identify with the workers within the organization. This process can take place during basic observation.
Media options traditional vs. modern social media : Table or chart of differences between the two media options traditional vs. modern social media in regards to audience, reach, channel,
Explain personal financial management : Explain personal Financial management and why it is important to your professional success. What tips could you give to a colleague who may be struggling.
What is Kevin allowable rebate for the current tax year : Kevin has an invalid brother JO who lives with him. JO receives a disability support pension. What is Kevin's allowable rebate for the current tax year
Cut off frequency radius of the ideal filter : What can you observe when increasing the cut off frequency radius of the Ideal filter and What can you observe when increasing the order of the Butterworth
Prepare an estimate of the resources : Prepare an estimate of the resources (operational, human, and length of time) that are needed to implement each of these recommendations.
What are digital native and digital immigrant : What are a digital native and a digital immigrant? Which of the characteristics described contribute most to your placement in either group?
Organizational behavior : The field of organizational behavior can be organized around three levels: individual level, team level, and organizational level.
Describe the types of policies and coverage needed : Describe the types of policies and coverage needed for a typical small business.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Design of a pid controller for an aircraft pitch system

Design of a PID Controller for an Aircraft Pitch System - Present a state-space equation for the dynamical system - Design a unity closed-loop control system

  Create a function that will determine the total resistance

Create a function that will determine the total resistance of a number of resistors that are connected in parallel. This function should accept a row vector for input,

  Undertake in-depth design of digital filters

Designing a low pass FIR filter using Windowed Fourier Series approach - Develop and implement signal processing algorithms in Matlab

  Develop mathematical equations for the motor system

Develop mathematical equations for the motor system to relate the input voltage to armature current, shaft speeds (including main shaft's speed and gearbox's speed) and angular displacement

  Approximate the solution to the above initial value problem

dydt te3t - 2y 0 le t le 1 y0 0approximate the solution to the above initial value problem usinga modified-euler

  Find the average score of KU

EECS 138: Introduction to Computing - MATLAB Programming Lab Assignment - KU Basketball Analysis, University of Kansas, USA. Find the average score of KU

  An interface for image processing

An interface for image processing - An interface is given to upload the concerned images - Evaluate the proposed work with any existing methods

  Write a matlab script to implement the sum-product decoding

Sum-Product Decoder] Write a MATLAB script to implement the sum-product decoding algorithm for a linear block code with parity check matrix H when BPSK.

  Write a matlab script and calculate the normalized scores

Write a MATLAB script that, when given a vector of numbers, nums, creates a vector newNums containing every other element of the original vector, starting with the first element.

  Make a function of the coding

Generate Plot of the Example 1-10 on MATLAB,Use INPUT for variable external force

  Write a matlab program using genetic algorithm

You need a Matlab program using Genetic Algorithm for optimization of Emergency Department resources.

  Study of decimation and interpolation techniques

ME606 - Digital Signal Processing -Melbourne Institute of Technology - Study of decimation and interpolation techniques - Review of Decimation and Interpolation

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd