[mmseline] [Up] [mmseshow] Structuring Elements

mmserot
Rotate a structuring element.

Synopsis

function BROT = mmserot ( B , theta , DIRECTION )

Input

B Structuring Element
theta Double

Default: 45

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

DIRECTION String

Default: 'CLOCKWISE'

'CLOCKWISE' or ' ANTI-CLOCKWISE'.

Output

Description

mmserot rotates a structuring element B of an angle theta.

Examples

b = mmimg2se([0 0 0; 0 1 1; 0 0 0]);
Warning: converting image from double to binary uint8
mmseshow(b)
ans =
     0     1     1
mmseshow(mmserot(b))
ans =
     0     0     0
     0     1     0
     0     0     1
mmseshow(mmserot(b,45,'ANTI-CLOCKWISE'))
ans =
     0     0     1
     0     1     0
     0     0     0

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]