[mmcwatershed] [Up] [mmswatershed] Thinning And Thickening

mmskiz
Skeleton of Influence Zone - also know as Generalized Voronoi Diagram

Synopsis

function y = mmskiz ( f , Bc , LINEREG , METRIC )

Input

f Image Binary image
Bc Structuring Element

Default: 3x3 elementary cross

Connectivity for the distance measurement.

LINEREG String

Default: 'LINES'

'LINES' or 'REGIONS'.

METRIC String

Default: NULL

'EUCLIDEAN' if specified.

Output

y Image Gray-scale (uint8 or uint16) or binary image

Description

mmskiz creates the image y by detecting the lines which are equidistant to two or more connected components of f, according to the connectivity defined by Bc. Depending on with the flag LINEREG, y will be a binary image with the skiz lines or a labeled image representing the zone of influence regions. When the connected objects of f are single points, the skiz is the Voronoi diagram.

Examples

Skiz:
f=mmreadgray('blob2.tif');
y=mmskiz(f,mmsebox,'LINES','EUCLIDEAN');
mmshow(f,y);
f,y
Voronoi diagram:
f=mmbinary(zeros(100));
Warning: converting image from double to int32
f( [3025, 2075, 5050 7030, 8070]) = 1;                   
y = mmskiz(f,mmsebox,'LINES','EUCLIDEAN');
mmshow(f,y);
f,y

Algorithm

function y=mmskiz_equ( f, Bc, LINEREG, METRIC )
  aux = mmdist(mmneg(f),Bc,METRIC);
  y = mmcwatershed(aux,f,Bc,LINEREG);

Limitations

For Euclidean metric, please see mmdist.

See also

mmdist Distance transform.
mmcwatershed Detection of watershed from markers.
[mmcwatershed] [Up] [mmswatershed]