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

Show the subtraction method, Q. Show the Subtraction Method? For this p...

Q. Show the Subtraction Method? For this procedure (method), start with a weighted position value greater that the number. If the number is greater than the weighted position f

Important function of common control subsystem, Q. Important function of co...

Q. Important function of common control subsystem? If a call is destined to a number in an exchange other than present one processing the digits, initial translator generates t

Explain working of three-phase transformers, Q. Explain working of three-ph...

Q. Explain working of three-phase transformers? Transformation in three-phase systems can be accomplished in either of two ways: (1) connecting three identical single-phase tra

Discuss applications of dielectrics, Discuss applications of dielectrics. ...

Discuss applications of dielectrics. Application of dielectrics: For various applications various properties of dielectric materials are required as: electrical, mechanical

Usage of transistor, Usage of transistor: The bipolar junction transis...

Usage of transistor: The bipolar junction transistor that is abbreviated as BJT was the most generally used transistor in the 1960s and 70s. Even later than MOSFETs became ext

Home energy management.., I need help to build a circuit diagram for home e...

I need help to build a circuit diagram for home energy management.It includes load controllers,a central system in which we should programme all of the control commands,and a two w

Explain sampling at the nyquist rate, Explain Sampling at the Nyquist Rate?...

Explain Sampling at the Nyquist Rate? What would happen if we reduced the sampling frequency? In the time domain, we would be getting less samples for each period. In the frequ

Effect of feedback on stability, Q. Effect of feedback on stability? Le...

Q. Effect of feedback on stability? Let us consider the direct transfer function of the unstable first-order system of Figure (a). The transfer function is given by whe

Determine the type of the semiconductor, Determine the Type of the Semicond...

Determine the Type of the Semiconductor An unknown semiconductor has E g =1.1 eV and N t =N v . lt is doped with 10 16 /cm 3 donor atoms. - (a) Determine the type of the s

Use of cro for frequency measurement, Q. Explain the use of CRO for frequen...

Q. Explain the use of CRO for frequency measurement.   Measurement of frequency: The frequency of the periodic signals is easily measured with a CRO. The frequency of a si

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