Fourier transform - filtering, Electrical Engineering

Assignment Help:

Fourier transform  (filtering)

(i) Perform low pass filtering in the frequency domain. Write and m-file lowfft.m which does this operation.

lowfft.m

function lowfft
im=imread('class_f.png');
imd=double(im);FI=fft2(imd);
phase=angle(FI);
amplitude=abs(FI);
figure;imshow(log(amplitude),[]);
figure;imshow(phase,[]);

%Where is the energy concentrated? where is low frequency in that spectrum?

help fftshift
figure;imshow(log(fftshift(amplitude)),[]);
figure;imshow(fftshift(phase),[]);

%Where is the energy concentrated? Where is the low frequency in that spectrum?

FIc=fftshift(FI);
amplitude=abs(FIc);
figure;imshow(log(amplitude),[]);
[h w]=size(FIc);
w2=uint8(w/2)
h2=uint8(h/2)
s=50;
mask=zeros(h,w);
mask(h2-s:h2+s,w2-s:w2+s)=1;
figure;imshow(mask,[]);

%What is the role of the box filter here?

FFIc=FIc.*mask;
phase=angle(FFIc);
amplitude=abs(FFIc);
figure;imshow(log(amplitude),[]);
figure;imshow(phase,[]);
FFI=ifftshift(FFIc);
RI=ifft2((FFI));
figure;
imshow(real(RI),[]);

%What happens when you apply the mask filer?
%Where do the artifacts come from?

(ii) Perform high pass filtering in the frequency domain. Write and m-file highfft.m which does this operation.
replace the mask by

mask=ones(h,w);
mask(h2-s:h2+s,w2-s:w2+s)=0;

(iii) Filter the image for different values of parameter s.
What happens when you vary the size of the box filter?


Related Discussions:- Fourier transform - filtering

Basic structure of an scr and the common circuit symbol, Q. Draw the basic ...

Q. Draw the basic structure of an SCR and the common circuit symbol ? The SILICON CONTROLLED RECTIFIER, usually referred to as an SCR, is one of the families of semiconductors

Determine the speed at which the machine runs as a motor, A 100-kW, dc shun...

A 100-kW, dc shunt generator, connected to a 220-V main, is belt-driven at 300 r/min, when the belt suddenly breaks and the machine continues to run as a motor, taking 10 kW from t

Find the diode current and voltage in given circuit, We shall demonstrate l...

We shall demonstrate load-line analysis to find the diode current and voltage, and then compute the total power output of the battery source in the circuit of Figure (a), given the

Network theorems.., how to calculate voltage when 3 voltage sources are giv...

how to calculate voltage when 3 voltage sources are given?

Main difference between a latch and a flip flop, Question: a) What is ...

Question: a) What is the main difference between a latch and a flip flop? b) Draw the logic diagram of an SR-latch using only NAND gates. c) A positive edge triggered

Single Phase Induction Motor, How do I connect a Capacitor on the machine i...

How do I connect a Capacitor on the machine if it has a start mechanism

What are the cautions to be taken, What are the cautions to be taken before...

What are the cautions to be taken before starting work on electrical installations? Ans: Before starting any electrical works on installations disconnect the power supply to

Branch current method, if a resistor present in the middle of two branches ...

if a resistor present in the middle of two branches in such a way that their polarities coincide then how do we choose the polarity of that resistor

Pn diode, PN Diode The current-voltage characteristics are of major ...

PN Diode The current-voltage characteristics are of major concern in the learning of semiconductor devices with light entering like a third variable in optoelectronics devic

Electron, Electron congratulations

Electron congratulations

Write Your Message!

Captcha
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