Fourier transform - filtering, Electrical Engineering

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?

Posted Date: 2/26/2013 12:05:39 AM | Location : United States







Related Discussions:- Fourier transform - filtering, Assignment Help, Ask Question on Fourier transform - filtering, Get Answer, Expert's Help, Fourier transform - filtering Discussions

Write discussion on Fourier transform - filtering
Your posts are moderated
Related Questions
Q. Input bias current of operational amplifier? When operated at extremely low quiescent current values, the base bias currents will be low; but they do have to be taken into c

how does the increase in the kinetic energy of a proton compare with the increase in kinetic energy of the alpha particle in part?

Explain RS232C Standard. RS232C: 1. Standard described for asynchronous communications where there is given timing among data bits and no fixed timing among the characters

PID controllers are popularly adopted in a wide range of industrial processes. The objective of this design practical is to study the way this PID controller changes system dynamic

Comparison with vacuum tubes: Prior to the growth of transistors, vacuum (electron) tubes (or in the UK (United Kingdom) "thermionic valves" or just "valves") were the major a

Consider a forward-biased diode with a load resistance. Let the static volt-ampere characteristic of the diode be given by Equations, and typically represented by Figure. (a) Fo

In a CDMA system, the signal is spread over a large bandwidth by multiplying the transmitted symbol by a sequence of short pulses, also called chips. The

The Problem Based Learning is an approach to learning prepares the students to engage with challenges similar to real world problems.The VEB3001-Problem Based Learning has been an

Q. For a p-channel JFET in its active region, specify the polarities of voltages and the directions of conventional currents.

Q. Give a general account of common drain amplifier? The output is taken over the source terminal and when the dc supply is replaced by its short circuit equivalent, the drain