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

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

Resultant force, State and prove parallelogram law of forces and explain i...

State and prove parallelogram law of forces and explain it''s applications

Digital electronics, Design a logic circuit when to provide an output when ...

Design a logic circuit when to provide an output when any two or three of four switches are closed.

Compute force vector, Q. Consider a current element I 1 d ¯l 1 = 10 dz ¯a...

Q. Consider a current element I 1 d ¯l 1 = 10 dz ¯az kA located at (0,0,1) and another I 2 d ¯ l 2 = 5dx ¯ax kA located at (0,1,0). Compute d ¯F 21 and d ¯F 12 experienced by

Characteristics of unijunction transistor, Characteristics of  unijunction...

Characteristics of  unijunction transistor: Characteristics : The static emitter characteristic of UJT at a given inter base voltage VBB in shown in fig. From fig., it is no

Why equalizing connection are used in lap winding dummy coil, Q.   Explain ...

Q.   Explain why equalizing connection are used in lap winding and dummy coils are some time used in wave winding. Sol.  For batteies operating in parallel, the circulating c

Cro, role of trigger circuit in cro

role of trigger circuit in cro

Explain about hybrid network, Q. Explain about Hybrid network? Hybrid n...

Q. Explain about Hybrid network? Hybrid network (sometimes known as a hybrid coilor duplex coil) in a telephone set is a special balanced transformer used to convert a two-wire

Design an appropriate system, From a source with P in = 2.4 mW, we want to...

From a source with P in = 2.4 mW, we want to get P out = 60 mW at a distance l = 20 km from the source. α for the transmission line is given to be 2.3 dB/km. The available amplif

Discuss dma operation in brief, Discuss DMA operation in brief. The fun...

Discuss DMA operation in brief. The fundamental idea of DMA is to transfer blocks of data directly among memory and peripherals. The data don't suffer the microprocessor but th

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