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

Determine the percentage drop in load current, Q. A practical current sourc...

Q. A practical current source is represented by an ideal current source of 200 mA along with a shunt internal source resistance of 12 k. Determine the percentage drop in load curr

Requirement specification for the monitor and alarm system, Prepare a User ...

Prepare a User Requirement Specification for the monitor and alarm system. User Requirements Specification should be written in a clear and unambiguous manner to state: • The

Explain the suitability of copper, Explain  the  suitability  of  coppe...

Explain  the  suitability  of  copper that  is  used  as  electrical  conducting materials. Copper : Pure annealed is utilized for the winding of electrical machines. High pur

Cpi compare immediate instruction , CPI Compare Immediate Instruction ...

CPI Compare Immediate Instruction The 8 bit  data  specified  in the  instruction is  compared with the  contents of the accumulator. The comparison  is done by  subtracting

Sbi subtract immediate with borrow instruction, SBI Subtract Immediate  w...

SBI Subtract Immediate  with Borrow  Instruction This  instruction is  used to subtract 8 bit  data and  borrow from the  accumulator. The  result of  the operation is  stored

Growth in communications, The growth in communications over the past 60 yea...

The growth in communications over the past 60 years has been phenomenal. The invention of the transistor in 1947 and the integrated circuit and laser in 1958 have paved the way to

The relationship between cell and batteries, The relationship between cell ...

The relationship between cell and batteries  Generally, a cell delivers a certain voltage that is a function of what chemical reactions are taking place to generate the voltage

Jfet common source amplifier, Q. JFET Common Source Amplifier? The comm...

Q. JFET Common Source Amplifier? The common source configuration for a FET is similar to the common emitter bipolar transistor configuration, and is shown in figure. The common

Make a plot of the signal, In order to demonstrate aliasing, make a plot of...

In order to demonstrate aliasing, make a plot of the signal x(t) = 3 cos 2π10t - cos 2π30t which approximates a square wave with W = 30 Hz. If the sample points are taken 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