ontour lines
of a function. We start by</p>

<precode type='matlab'>
M = zeros(size(I)) ;
for x=r'
 s = vl_erfill(I,x) ;
 M(s) = M(s) + 1;
end
</precode>

<p>which computes a matrix <code>M</code> whose value are equal to the
number of overlapping extremal regions. Next, we use <code>M</code>
and <code>contour</code> to display the region boundaries:</p>

<precode type='matlab'>
figure(2) ;
clf ; imagesc(I) ; hold on ; axis equal off; colormap gray ;
[c,h]=contour(M,(0:max(M(:)))+.5) ;
set(h,'color','y','li