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 what is linker, Explain what is Linker? Linker: A huge progra...

Explain what is Linker? Linker: A huge program is divided in smaller programs termed as modules. A linker is a program that links smaller programs together to by a large prog

Find fmax for circuit, Q. (a) An audio amplifier with R i = 10 k, R o ...

Q. (a) An audio amplifier with R i = 10 k, R o = 0, and ¯A(ω), as shown in Figure (a), is used in the circuit shown in Figure with R S = 1 k,R L = 16 , and C = 0.2 µF. Sk

Unconditional return, Unconditional Return RET Instruction: This  instr...

Unconditional Return RET Instruction: This  instruction is used to transfer the program sequence  from subroutine to the calling  program unconditionally. The instruction forma

Explain about automatic stabilizers, Q. Explain about Automatic Stabilizers...

Q. Explain about Automatic Stabilizers? Automatic Stabilizers: Government fiscal policies which have effect of automatically moderating cyclical ups and downs of capitalism.

Merits and demerits of collector-to-base bias, Merits and Demerits of Colle...

Merits and Demerits of Collector-to-base bias: Merits: In this type of circuit the circuit stabilizes the operating point against differences in temperature and β (that i

Define series var compensation, Define Series VAr Compensation? For ver...

Define Series VAr Compensation? For very long transmission lines, the inductive reactance of the line becomes so high that not much power can be transmitted through the line, s

Find the equivalent series impedance, Q. 10-kVA, 4800:240-V, 60-Hz, single-...

Q. 10-kVA, 4800:240-V, 60-Hz, single-phase transformer has an equivalent series impedance of 120 + j300  referred to the primary high- voltage side. The exciting current of the tr

Determine the h-parameters for the network., Q. A negative impedance conver...

Q. A negative impedance converter circuit shown in Figure is used in some applications where inductors cannot be utilized or where negative resistance is beneficial. (a) Determi

Explain steady-state stability, Q. Explain Steady-State Stability? The ...

Q. Explain Steady-State Stability? The property of a power system that ensures that it will remain in equilibrium under both normal and abnormal conditions is known as power-sy

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