function e = elim1(a,l)
%
%  elim1: eliminates all labeled segments that have less than l elements
%  on input:
%    a: 	2D array of labeled segments
%    l:         minimum length segment
%  on output:
%    e:		2D array of segments of length greater than l
% Call:
%       e = elim1(a,l)
%
%  Authors:	Tom Henderson
%		Univ of Utah
%		8 Sept 1996
%

e = a;
lmax = max(max(a)); [m,n] = size(a);
for l1 = 1:lmax
  if sum(sum(l1*ones(m,n)==a)) <= l
    e = e.*(~(l1*ones(m,n)==e));
  end
end
e = labelr8(e);
