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 importance of planning in an organisation, Question 1: Plan...

Question 1: Planning is one of the primary functions of management. (a) Explain the importance of planning in an organisation. (b) How can managers develop an effective a

Induction motor, This is a synchronous motor that does not require a specia...

This is a synchronous motor that does not require a special start-up auxiliary motor. The  rotor  consists  of  stout  copper  (or aluminium)  conductors  arranged  in  the form of

Daa decimal adjust accumulator instruction , DAA Decimal Adjust Accumulator...

DAA Decimal Adjust Accumulator Instruction This  instruction adjusts the contents  of the accumulator  into BDC (Binary Coded Decimal )  form  after a BCD  addition. It should

amp circuit , Refer to the op amp circuit shown below. Let R 1 = ...

Refer to the op amp circuit shown below. Let R 1 = 140 k_, R 2 = 10 k_, R 3 = 10 k_, R 4 = 20 k_, RL = 10 k_. Assume the op amp is ideal. Find the equation relating the

Calculate the ratio v/i for an ideal diode, Q. Assuming the diode to obey I...

Q. Assuming the diode to obey I = IS (e V/0.026 -1), calculate the ratio V/I for an ideal diode with I S = 10 -13 A for the applied voltages of -2,-0.5, 0.3, 0.5, 0.7, 1.0, and

Explain the alphanumeric coding - bcd to decimal conversion, Explain the Al...

Explain the Alphanumeric Coding - bcd to decimal conversion? For the inherently binary world of computer, it is necessary to put all symbols, letters, numbers, and so on into bin

Decrement contents of register - dcr decrement , Decrement  contents of Re...

Decrement  contents of Register The contents of register R will be decremented  by one and  the result is stored  in the same register  R. It is also  an exceptional  case i

Mention the three transistor configurations, Q. Mention The Three Transisto...

Q. Mention The Three Transistor Configurations? The three transistor configurations are 1)Common emitter configuration 2)Common base configuration 3)Common collector c

Integrator circuit, Q. Addition and integration can be combined by the summ...

Q. Addition and integration can be combined by the summing integrator circuit shown in Figure. With the given component values and input waveforms, sketch v o when S is opened at

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