[mmseline] [Up] [mmseshow] Structuring Elements

mmserot
Rotate a structuring element.

Synopsis

BROT = mmserot ( B , theta = 45, DIRECTION = "CLOCKWISE" )

Input

B Structuring Element

theta Double

Degrees of rotation. Available values are multiple of 45 degrees.

Default: 45 (45)

DIRECTION String

'CLOCKWISE' or ' ANTI-CLOCKWISE'.

Default: "CLOCKWISE" ('CLOCKWISE')

Output

Description

mmserot rotates a structuring element B of an angle theta.

Examples

b = mmimg2se(mmbinary([[0, 0, 0], [0, 1, 1], [0, 0, 0]]));
mmseshow(b)
array([False,  True,  True], dtype=bool)
mmseshow(mmserot(b))
array([[False, False, False],
       [False,  True, False],
       [False, False,  True]], dtype=bool)
mmseshow(mmserot(b,45,'ANTI-CLOCKWISE'))
array([[False, False,  True],
       [False,  True, False],
       [False, False, False]], dtype=bool)

Equation

where
Reflection is given by

Limitations

Only 2-D structuring elements can be rotated. The rotation angles allowed are multiples of 45 degrees.

See also

mmfreedom Control automatic data type conversion.
mmseshow Display a structuring element as an image.
mmimg2se Create a structuring element from a pair of images.
[mmseline] [Up] [mmseshow]