20111ee114_1_CA5_sol

20111ee114_1_CA5_sol - EE114, Winter 2011 Computer...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
EE114, Winter 2011 Computer Assignment 5 Solution ________________________________________________________________________ 1/9 1 Matlab functions 1.1 ScaleFTAmp.m function FAmp = ScaleFTAmp(F) % shift the FT with shift, log, and rescale c = 4.; % take the log of the amplitude FAmp = log10(abs(F)/max(max(abs(F))) + 0.000001); % normalize the max number to 255 FAmp = (FAmp + c) * 255 / c; FAmp = fftshift(FAmp); 1.2 ReduceFT.m function out = ReduceFT(in, range) % reduce the FT coefficients to only those chosen % around DC [x_size, y_size] = size(in); out = in; out(range + 1 : x_size - range, : ) = 0.0001; out( :, range + 1 : x_size - range) = 0.0001; 2 Results 2.1 Task a Typing im = imread('ca2.tif'); imagesc(im); colormap(gray); axis square; yields the result in Figure 1.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Computer Assignment 5 Solution EE114, Winter 2010 2/9 50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500 Figure 1 Bridge original Typing ft = fft2(im); sft = ScaleFTAmp(ft); imagesc(sft); colormap(gray); axis square; yields the result in Figure 2.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

20111ee114_1_CA5_sol - EE114, Winter 2011 Computer...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online