--- Saving session to:
    ECE480.PH437_15-Jan-2002.txt
--- Processed startup.m ---
doc
; ; ; ; ; ; ; 
geom2
type geom2

% EE437 Intro to Image Processing, S97
% Geometric image manipulation (2nd time)
% updated for ver 5.3 (S00)

% Load the image
f=imread('camera.png');
f=double(f);

% Show the image
figure
imshow(uint8(f)),truesize
drawnow

% Image dimensions
fnumrow=size(f,1);
fnumpix=size(f,2);



% Image coordinates for output image
[xnew ynew]=meshgrid(-1:2/fnumpix:1-1/fnumpix,...
   -1:2/fnumrow:1-1/fnumrow);

% Compute the coordinates for the input image
xold=xnew./(1-abs(ynew)+abs(ynew)/10);
yold=ynew;

% Display the new image
g=interp2(xnew,ynew,f,xold,yold,'*linear');
figure
imshow(uint8(g)),truesize



geom1
delfigs
geom3

swirl
swirl
edit swirl
type swirl

% EE437 Intro to Image Processing, S97
% Geometric image manipulation: Image twisting


% Load the image
f=imread('camera.png');
f=double(f);

% Show the image
figure
imshow(uint8(f)),truesize
drawnow

% Image dimensions
fnumrow=size(f,1);
fnumpix=size(f,2);
ftot=fnumrow*fnumpix;



% Image coordinates for output image
[xnew ynew]=meshgrid(-1:2/fnumpix:1-1/fnumpix,-1:2/fnumrow:1-1/fnumrow);


% Compute the coordinates for the input image
%for p=1:fnumpix, for r=1:fnumrow,
%    cosfnc = cos((-pi/4)*sqrt(xnew(r,p)^2 + ynew(r,p)^2));
%    sinfnc = sin((-pi/4)*sqrt(xnew(r,p)^2 + ynew(r,p)^2));
%    xold(r,p) = xnew(r,p)*cosfnc - ynew(r,p)*sinfnc;
%    yold(r,p) = xnew(r,p)*sinfnc + ynew(r,p)*cosfnc;
%end,end

znew = xnew+j*ynew;
znewmag = abs(znew);

% Define the range of angles
angles=0:pi/8:2*pi;

% Create the initial figure 
image(f),colormap(gray(256)),axis off,axis('square'),truesize

% Create array large enough to hold the movie
M = moviein(length(angles));

% Generate the frames
for th=1:length(angles),
    zold = znew.*exp(j*angles(th)*znewmag);

    % Display the new image
    image(interp2(xnew,ynew,f,real(zold),imag(zold),'*linear'));
    colormap(gray(256)),axis off,axis('square'),truesize

    % Save the image
    M(:,th)=getframe;

end

% Play the movie
movie(M,-2)


exit