[mmserot] [Up] [mmsesum] Structuring Elements

mmseshow
Display a structuring element as an image.

Synopsis

y = mmseshow ( B , option = "NORMAL" )

Input

B Structuring Element

option String

'NORMAL', ' EXPAND' or ' NON-FLAT'

Default: "NORMAL" ('NORMAL')

Output

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

Description

mmseshow used with the option EXPAND generates an image y that is a suitable graphical representation of the structuring element B. This function is useful to convert a structuring element to an image. The origin of the structuring element is at the center of the image. If B is flat, y is binary, otherwise, y is signed int32 image. When using the option NON-FLAT, the output y is always a signed int32 image.

Examples

Flat structuring element
b=mmsecross(3);
print mmseshow(b)
[[False False False  True False False False]
 [False False  True  True  True False False]
 [False  True  True  True  True  True False]
 [ True  True  True  True  True  True  True]
 [False  True  True  True  True  True False]
 [False False  True  True  True False False]
 [False False False  True False False False]]
a = mmseshow(b,'EXPAND')
mmshow(a)
print mmseshow(b,'NON-FLAT')
[[-2147483647 -2147483647 -2147483647           0 -2147483647 -2147483647
  -2147483647]
 [-2147483647 -2147483647           0           0           0 -2147483647
  -2147483647]
 [-2147483647           0           0           0           0           0
  -2147483647]
 [          0           0           0           0           0           0
            0]
 [-2147483647           0           0           0           0           0
  -2147483647]
 [-2147483647 -2147483647           0           0           0 -2147483647
  -2147483647]
 [-2147483647 -2147483647 -2147483647           0 -2147483647 -2147483647
  -2147483647]]
a
Non flat structuring element
b=mmsedisk(2,'2D','EUCLIDEAN','NON-FLAT')
print mmseshow(b)
[[-2147483647           1           1           1 -2147483647]
 [          1           2           2           2           1]
 [          1           2           2           2           1]
 [          1           2           2           2           1]
 [-2147483647           1           1           1 -2147483647]]

See also

mmfreedom Control automatic data type conversion.
mmimg2se Create a structuring element from a pair of images.
mmsebox Create a box structuring element.
mmsecross Diamond structuring element and elementary 3x3 cross.
mmsedisk Create a disk or a semi-sphere structuring element.
mmseline Create a line structuring element.
[mmserot] [Up] [mmsesum]