Scilab Function
Last update : 1/11/2005

randzone - contour lines of a binary image

Calling Sequence

[Sumriss,csout] = randzone(S)

Parameters

Description

The contour lines of areas of a matrix are calculated. The matrix Sumriss has points (1), where an area edge of S occures. When two output arguments are used, the 2nd argument csout contains vector data of the edges. With "showcs(csout)" the vector data can be displayed.

The area contours are evaluated by a combination of several binary erosions.

Examples

x=linspace(-%pi,%pi,200); y=x;
[X,Y]=meshgrid(x,y);
R=sqrt(X .^2 + Y .^2);
Z=sin(3 .*R);
Zbin=bool2s(Z>0.1);
// Only Binary Contour Image
Sr1=randzone(Zbin);
f=gcf();
f.color_map=graycolormap(2);
Matplot(Sr1+1);
xclick();
delete(f);
// Binary Contour Image + Contour data
[Sr2,csout]=randzone(Zbin);
showcs(csout);
// End of example randzone

See Also

sperob ,   spdilb ,  

Authors

Dr. Andreas Geissler geisslea@web.de

Used Function

sperobspdilbrot90