[mmserot] [Up] [mmsesum] Structuring Elements

mmseshow
Display a structuring element as an image.

Synopsis

function y = mmseshow ( B , option )

Input

B Structuring Element
option String

Default: 'NORMAL'

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

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);
mmseshow(b)
ans =
     0     0     0     1     0     0     0
     0     0     1     1     1     0     0
     0     1     1     1     1     1     0
     1     1     1     1     1     1     1
     0     1     1     1     1     1     0
     0     0     1     1     1     0     0
     0     0     0     1     0     0     0
a = mmseshow(b,'EXPAND');
mmshow(a); 
format short g
mmseshow(b,'NON-FLAT')
ans =
 -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');
format short g
mmseshow(b)
ans =
 -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]