%Ben Graf  &  Michael Victory
%created: 11/29/99
%updated: 11/30/99, 12/1/99, 12/9/99
%filename: /mvictory/elec301/rot8.m

% rot8 takes in a (rotated) image of a card and returns it to the full
% upright locked position
%rot8 is pronounced "rotate"

function blah=rot8(pic)

% the card is first edged so that the two long 
% sides will stand out in the Radon transform
e=edge(pic,'roberts');
theta = 0:180;
[radpic,xp] = radon(e,theta);

ubertheta=findang(radpic);

%bak=rotback(e,ubertheta);
bak=rotback(pic,ubertheta);

blah=bak;



% We are on a mission from God.