%Ben Graf  &  Michael Victory
%created: 12/11/99
%updated: 12/12/99
%filename: /mvictory/elec301/findleft.m

function fl=findleft(bigpic,point)

% now we slide down the topleft edge of the card
% to find the left corner

threshold=200;
%point
while ((point(2) ~= 1) & (bigpic(point(1),point(2)-1) > threshold))
  %disp('iterate while')
  point(2)=point(2)-1;
end;
if (bigpic(point(1)+1,point(2)) > threshold)
  %disp('in if')
  downval=findleft(bigpic,[point(1)+1,point(2)]);
  if (downval < point(2))
    fl=downval;
  else
    fl=point(2);
  end;
else
  fl=point(2);
end;


