function r = relint(segs,t)
%
% relint: computes the same intensity relation
% 
% On input:
%    segs: output of seginfo
%    t: intensities must be within this amount to be same
% On output:
%   r: Boolean encoding of same intensity 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,4)-segs(i2,4))<t
	      r(i1,i2) = 1;
	    end
	  end
    end
  end
end
