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

Dc generator, Why dummy coil is used in wave winding porpose of dc generato...

Why dummy coil is used in wave winding porpose of dc generator

Electrical machine, transformer voltage induced in armatur of ac commentato...

transformer voltage induced in armatur of ac commentator machin in case tha field flux in sinosoidal?..

Explain the term simplex transmission, Explain the term simplex transmissio...

Explain the term simplex transmission. Data in a simplex channel is always one method. Simplex channels are not frequently used because this is not possible to send back error

Representation of the control system, Question: (a) The forward path t...

Question: (a) The forward path transfer function of a unity feedback control system is given by: (i) Draw the labelled block diagram representation of the control system.

Determine the voltage drop, A 15 volts source is applied to a series 150 mH...

A 15 volts source is applied to a series 150 mH inductor and 169 pF capacitor. The resistance of the inductor plus the connecting wires is 1,6 W. Determine the voltage drop and

For carry flag - return instructions , For Carry Flag  RC (Return of ...

For Carry Flag  RC (Return of Carry) and RNC ( Return on no Carry) Instruction RC returns from  the subroutine  to the calling  program if carry  flag is et (CY= 1). The

Transfer function, how can i do a question concerning a transfer function

how can i do a question concerning a transfer function

Block diagram and the truth table of a demultiplexer, Q. Given the block di...

Q. Given the block diagram and the truth table of a demultiplexer, as shown in Figure, obtain its implementation.

Explain series circuit, Series circuit Total resistance, R T = R1 + R2...

Series circuit Total resistance, R T = R1 + R2 + R3 The current I is the same in all parts of the circuit , I = I 1 = I 2 = I 3 The voltage drop at each resistor, V1,

Calculate the open circuit voltage, This question is designed to give you ...

This question is designed to give you practice in manipulating circuit equations using j notation, and to demonstrate that techniques that you have already studied in the d.c. c

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