[Top] [Up] [Prev] [Next] [Up] [Basic Concepts] [Demonstrations] [Functions] SDC Morphology Toolbox V1.1 15Jan02

mmsedisk - Create a disk or a semi-sphere structuring element.


Synopsis
B = mmsedisk( r, DIM, METRIC, FLAT, h )
Input
r: Non-negative integer. Disk radius. Default: 3.
DIM: String. '1D', '2D, or '3D'. Default: "2D".
METRIC: String. 'EUCLIDEAN', ' CITY-BLOCK', 'OCTAGON', or ' CHESSBOARD'. Default: "EUCLIDEAN".
FLAT: String. 'FLAT' or 'NON-FLAT'. Default: "FLAT".
h: Elevation of the center of the semi-sphere. Default: 0.
Output
B: Structuring element.
Description
mmsedisk creates a flat structuring element B that is disk under the metric METRIC , centered at the origin and with radius r or a non-flat structuring element that is a semi-sphere under the metric METRIC, centered at (0, h) and with radius r. This structuring element can be created on the 1D, 2D or 3D space.
Examples

Examples of flat structuring elements.

a=mmseshow(mmsedisk(10,'2D','CITY-BLOCK'));
b=mmseshow(mmsedisk(10,'2D','EUCLIDEAN'));
c=mmseshow(mmsedisk(10,'2D','OCTAGON'));
mmshow(a);
mmshow(b);
mmshow(c); 
image
(a)
image
(b)
image
(c)

Examples of non flat structuring elements.

d=mmseshow(mmsedisk(10,'2D','CITY-BLOCK','NON-FLAT'));
e=mmseshow(mmsedisk(10,'2D','EUCLIDEAN','NON-FLAT'));
f=mmseshow(mmsedisk(10,'2D','OCTAGON'));
mmshow(d);
mmshow(e);
mmshow(f); 
image
(d)
image
(e)
image
(f)
g=mmsedisk(3,'2D','EUCLIDEAN','NON-FLAT');
mmseshow(g)

ans =
     0     0     2     2     2     0     0
     0     3     3     3     3     3     0
     2     3     4     4     4     3     2
     2     3     4     4     4     3     2
     2     3     4     4     4     3     2
     0     3     3     3     3     3     0
     0     0     2     2     2     0     0
h=mmsedisk(3,'2D','EUCLIDEAN','NON-FLAT',5);
mmseshow(h)

ans =
     0     0     7     7     7     0     0
     0     8     8     8     8     8     0
     7     8     9     9     9     8     7
     7     8     9     9     9     8     7
     7     8     9     9     9     8     7
     0     8     8     8     8     8     0
     0     0     7     7     7     0     0
Equation

Flat structuring element:

Euclidean distance:

equation

City block distance (4-connectivity):

equation

Chess board distance (8-connectivity):

equation

Octagon distance:

equation

Non-flat structuring element:

Euclidean distance:

equation

city block distance:

equation

chess board distance:

equation

See Also
mmdil - Dilate an image by a structuring element.
mmfreedom - Control automatic data type conversion.
mmimg2se - Create a structuring element from a pair of images.
mmsebox - Create a box structuring element.
mmsecross - Cross structuring element.
mmseline - Create a line structuring element.
mmseshow - Display a structuring element as an image.

[Top] [Up] [Prev] [Next] [Up] [Basic Concepts] [Demonstrations] [Functions] Valid XHTML 1.0!
Copyright (c) 1998-2002 by SDC Information Systems