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

Compute current in given the circuit configuration, Q. Consider the circuit...

Q. Consider the circuit configuration shown in Figure. Let V i = 1V, R 1 = 1000, R 2 = 2000, and A = 3. (a) Compute i 2 . (b) If R 1 changed to 500 , recompute i 2 .

Circuit board packaging, Topics for the projects 1. Power supply design:...

Topics for the projects 1. Power supply design: One source, multiple source. Project process: 1.  Design(circuit analysis, diagram, list of components). 2.   Hardware e

Find resistance when the bridge is balanced, Q. Consider the bridge circuit...

Q. Consider the bridge circuit given in Figure with R 1 = 24 k, R 2 = 48 k, and R 3 = 10 k. Find R when the bridge is balanced with V = 0.

Explain the properties and application of glass, Explain the properties and...

Explain the properties and application of glass. Glass: Ordinary glass is a fine insulator but is too brittle to be used for anything although scientific instrument parts, accu

Explain digital control systems, Q. Explain Digital control systems? Si...

Q. Explain Digital control systems? Significant progress has been made in recent years in discrete-data and digital control systems because of the advancesmade in digital compu

Design the high-pass filter, Q. Design the high-pass filter shown in Figure...

Q. Design the high-pass filter shown in Figure (by determining C) to have a half-power frequency of 1 MHz.

Name the materials used in case of fuses, Name the materials used in case...

Name the materials used in case of Fuses . Also give reasons. Fuses : For rewirable fuses, copper-tin and lead-tin alloy is used. For HRC and cartridge fuses silve

What are tightly coupled systems, What are tightly coupled systems or close...

What are tightly coupled systems or closely coupled systems? In a tightly coupled systems the microprocessor (either coprocessor or independent processors) might be share a com

Find percent error of both meters when measuring a current, Q. Error specif...

Q. Error specifications on a 10-A digital ammeter are given as 0.07% of the reading, 0.05% of full scale, 0.005% of the reading per degree Celsius, and 0.002% of full scale per deg

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