function r = relsize(segs,t)
%
% relsize: computes the same size relation
% 
% On input:
%    segs: output of seginfo
%    t: amount within which size must be to be same size
% On output:
%   r: Boolean encoding of same size relation (0 -> False; 1-> True)
%

[m,n] = size(segs);
r = zeros(m,m);
for i1 = 1:m-1
  if segs(i1,1)>4
    for i2 = i1+1:m
	  if segs(i2,1)>4
        if abs(segs(i1,1)-segs(i2,1))<t
	      r(i1,i2) = 1;
	    end
	  end
    end
  end
end
