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

Explain the asynchronous decade counter, Explain the Asynchronous Decade Co...

Explain the Asynchronous Decade Counter? The binary counters earlier introduced have two to the power n states. But the counters with states less than this number are as well

EDC, What is hall effect?

What is hall effect?

Transformer, how much transformer oil is used in transformers

how much transformer oil is used in transformers

Transfer characteristics of jfets, Q. Give the Shockley's equation for the ...

Q. Give the Shockley's equation for the transfer characteristics of JFET's? Where ID is the drain current and VGS is the voltage across gate and source. The squared term o

What is enhancement mosfets, Q. What is Enhancement MOSFETS? Figure ill...

Q. What is Enhancement MOSFETS? Figure illustrates the cross-sectional structure of an n-channel enhancement MOSFET and its symbol showing as a normally off device when used fo

Find the rms induced voltage, A two-pole, three-phase, 60-Hz, wye-connected...

A two-pole, three-phase, 60-Hz, wye-connected, round-rotor synchronous generator has N a = 12 turns per phase in each armature phase winding and flux per pole of 0.8Wb. Find the r

Field effect transistor, Field effect transistor: Primarily difference...

Field effect transistor: Primarily difference between bit and jet is that bit transistor is a current controlled device while jet is a voltage controlled device.  Is a direct

Explain shunt-field control process, Q. Explain Shunt-field control process...

Q. Explain Shunt-field control process? Shunt-field control, armature-resistance control offers a constant-torque drive because both flux and, to a first approximation, allowab

What is button, A button does some command in a program when it is clicked....

A button does some command in a program when it is clicked. Buttons generally have a 3-dimensional look, although you may have to move the mouse over the button for it to look 3D.

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