[mmsecross] [Up] [mmseline] Structuring Elements

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

Synopsis

function B = mmsedisk ( r , DIM , METRIC , FLAT , h )

Input

r Double Non-negative integer.

Default: 3

Disk radius.

DIM String

Default: '2D'

'1D', '2D, or '3D'.

METRIC String

Default: 'EUCLIDEAN'

'EUCLIDEAN', ' CITY-BLOCK', 'OCTAGON', or ' CHESSBOARD'.

FLAT String

Default: 'FLAT'

'FLAT' or 'NON-FLAT'.

h Double

Default: 0

Elevation of the center of the semi-sphere.

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); 
a b 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','NON-FLAT'));
mmshow(d); 
Warning: converting image from int32 to uint16
mmshow(e); 
Warning: converting image from int32 to uint16
mmshow(f); 
Warning: converting image from int32 to uint16
d e f
g=mmsedisk(3,'2D','EUCLIDEAN','NON-FLAT');
mmseshow(g)
ans =
 -2147483647 -2147483647           1           1           1 -2147483647 -2147483647
 -2147483647           2           2           2           2           2 -2147483647
           1           2           3           3           3           2           1
           1           2           3           3           3           2           1
           1           2           3           3           3           2           1
 -2147483647           2           2           2           2           2 -2147483647
 -2147483647 -2147483647           1           1           1 -2147483647 -2147483647
h=mmsedisk(3,'2D','EUCLIDEAN','NON-FLAT',5);
mmseshow(h)
ans =
 -2147483647 -2147483647           6           6           6 -2147483647 -2147483647
 -2147483647           7           7           7           7           7 -2147483647
           6           7           8           8           8           7           6
           6           7           8           8           8           7           6
           6           7           8           8           8           7           6
 -2147483647           7           7           7           7           7 -2147483647
 -2147483647 -2147483647           6           6           6 -2147483647 -2147483647

Equation

Flat structuring element:
Euclidean distance:
City block distance (4-connectivity):
Chess board distance (8-connectivity):
Octagon distance:
Non-flat structuring element:
Euclidean distance:
city block distance:
chess board distance:

See also

mmfreedom Control automatic data type conversion.
mmsebox Create a box structuring element.
mmsecross Diamond structuring element and elementary 3x3 cross.
mmseline Create a line structuring element.
mmimg2se Create a structuring element from a pair of images.
mmseshow Display a structuring element as an image.
mmdil Dilate an image by a structuring element.
[mmsecross] [Up] [mmseline]