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

RLC, a 49pf cap,a 50 uH inductor, and a 100 ohms resister are in parallel: ...

a 49pf cap,a 50 uH inductor, and a 100 ohms resister are in parallel: what is the resonance freq? And what is the complex impedance vector at 100MHZ?

Explain rotameter and hot wire anemometer, Write down about the following t...

Write down about the following terms: (i) Pirani Gauge (ii) Rotameter (iii) Hot wire Anemometer (iv) Drag Force Flow Meter

What are the functional types used in control words of 8251a, What are the ...

What are the functional types used in control words of 8251a? The control words of 8251A are divided into two functional types. 1. Mode Instruction control word 2. Comman

Energy stored in the coil, The term representing the energy stored in the c...

The term representing the energy stored in the coil may be written in terms of the inductance of the coil as... The energy stored in the coil increases with the square of t

Pentium processor has a superscalar architecture, Q.‘Pentium processor has ...

Q.‘Pentium processor has a superscalar architecture'. Describe the meaning of statement. Ans:Pentium microprocessor is organized with three execution units. One executes float

Turn off time - thyristor, Turn off Time The time  interval  between...

Turn off Time The time  interval  between  the instant when  the SCR  current  has  decreased to zero  after external  switching  of the SCR  voltage  circuit  and the  inst

Npn bipolar junction transistor, NPN: Figure: The symbol of an ...

NPN: Figure: The symbol of an NPN Bipolar Junction Transistor. NPN is one of the two sorts of bipolar transistors, where the letters "N" (negative) and "P" (positi

Applications of hall effect, Applications of Hall Effect: (i)  To dete...

Applications of Hall Effect: (i)  To determine whether semiconductor is of n type or p type. (ii) To determine carrier concentration. (iii) Measurement of carrier mobili

Define characteristics of discrete time systems - linear, Define Characteri...

Define Characteristics of Discrete Time Systems - Linear? A discrete-time system is said to be linear if it obeys the principles of superposition. That is, the response of a li

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