[mmhomothin] [Up] [mmintershow] Intervals (hit-or-miss templates)

mminterot
Rotate an interval

Synopsis

Irot = mminterot( Iab, theta = 45, DIRECTION = "CLOCKWISE" )

Implemented in Python.

Input

Iab Interval
theta Double

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

Default: 45

DIRECTION String

'CLOCKWISE' or ' ANTI-CLOCKWISE'.

Default: "CLOCKWISE"

Output

Irot Interval

Description

mminterot rotates the interval Iab by an angle theta.

Equation

Limitations

The rotation angles allowed are multiples of 45 degrees.

Source Code

def mminterot(Iab, theta=45, DIRECTION="CLOCKWISE"):
    from string import upper
    DIRECTION = upper(DIRECTION)
    A,Bc = Iab
    if DIRECTION != 'CLOCKWISE':
        theta = 360 - theta
    Irot = mmse2hmt(mmserot(A, theta),
                    mmserot(Bc,theta))
    return Irot
    

See also

mmfreedom Control automatic data type conversion.
mmintershow Visualize an interval.
mmserot Rotate a structuring element.
[mmhomothin] [Up] [mmintershow] Python