function f = f27(p,la)
%
[m,n] = size(la);
[numsegs,numprops] = size(p);
clobber = zeros(numsegs);
f = la;

for i1 = 1:numsegs
  if p(i1,5) < 5  % size check
    clobber(i1) = 1;
  end;
  if (p(i1,6)<2*p(i1,7))   % width should exceed height
    clobber(i1) = 1;
  end;
end;

% Eliminate bad segs

for i1=1:m
  for j1 = 1:n
    if la(i1,j1)>0
      if clobber(la(i1,j1))>0
        f(i1,j1) = 0;
      end;
    end;
  end
end
