--- Saving session to: ECE480.PH437_22-Jan-2002.txt --- Processed startup.m --- doc ; ; ; ; ; ; ; trans1d Waiting for keypress... Waiting for keypress... Done! trans2d Waiting for keypress... Waiting for keypress... Waiting for keypress... Waiting for keypress... Waiting for keypress... helpwin ifft type trans1d % EE437 Intro to Image Processing, S96 % Day 18: Translation property: 1-D % updated Winter 2001-02 % Image size (square image) n=64; % Pulse width w=10; % f(x,y): Square pulse at center of image fxy = zeros(n); fxy((n/2)-(w/2):(n/2)+(w/2),(n/2)-(w/2):(n/2)+(w/2)) =... ones(w+1); f1=figure(1); bigfig plot(fxy(n/2,:)); axis([0 n-1 -2 2]) bigtitle('f(x)'); xlabel('x'); ylabel('f(x)') disp('Waiting for keypress...') pause % Adjust the phase of the input terms for x=1:n, for y=1:n, fxy(y,x)=fxy(y,x)*(-1)^(x+y); end, end f2=figure(2); bigfig plot(fxy(n/2,:)); axis([0 n-1 -2 2]) bigtitle('f(x)(-1)^{(x)}'); xlabel('x'); ylabel('Amplitude') disp('Waiting for keypress...') pause % Transform to frequency domain Fuv=fft2(fxy); f3=figure(3); bigfig plot(abs(Fuv(n/2,:))) bigtitle('|F(u)|'); xlabel('u'); ylabel('Amplitude') disp('Done!') type trans2d % EE437 Intro to Image Processing, S96 % Day 18: Translation property: 2-D % updated Winter 2001-02 % Image size (square image) n=64; % Pulse width w=10; % f(x,y): Square pulse at center of image fxy = zeros(n); fxy((n/2)-(w/2):(n/2)+(w/2),(n/2)-(w/2):(n/2)+(w/2)) =... ones(w+1); f1=figure(1); bigfig mesh(fxy); axis('ij') bigtitle('f(x,y)'); xlabel('x'); ylabel('y') disp('Waiting for keypress...') pause % Adjust the phase of the input terms for x=1:n, for y=1:n, fxy(y,x)=fxy(y,x)*(-1)^(x+y); end, end f2=figure(2); bigfig mesh(fxy); axis('ij') bigtitle('f(x)(-1)^{(x+y)}'); xlabel('x') disp('Waiting for keypress...') pause % Transform to frequency domain Fuv=fft2(fxy)/(n^2); f3=figure(3); bigfig mesh(abs(Fuv)) axis('ij') bigtitle('|F(u,v)|'); xlabel('u'); ylabel('v') disp('Waiting for keypress...') pause f4=figure(4); bigfig imagesc(abs(Fuv)) colormap(gray) axis('ij') bigtitle('|F(u,v)|'); xlabel('u'); ylabel('v') disp('Waiting for keypress...') pause f5=figure(5); bigfig imagesc(log(1e-6+abs(Fuv))) colormap(gray) axis('ij') bigtitle('log(1e-6 + |F(u,v)|)'); xlabel('u'); ylabel('v') disp('Waiting for keypress...') pause exit