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

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

Synopsis

y = mmskiz ( f , Bc = NullStrel, LINEREG = "LINES", METRIC = Null )

Input

f Image Binary image

Bc Structuring Element

Connectivity for the distance measurement.

Default: NullStrel (3x3 elementary cross)

LINEREG String

'LINES' or 'REGIONS'.

Default: "LINES" ('LINES')

METRIC String

'EUCLIDEAN' if specified.

Default: Null

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,100)))
Warning: downcasting image from double to int32 (may lose precision)
f[30,25],f[20,75],f[50,50],f[70,30],f[80,70] = 1,1,1,1,1
y = mmskiz(f,mmsebox(),'LINES','EUCLIDEAN')
mmshow(f,y)
f,y

Limitations

For Euclidean metric, please see mmdist .

See also

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