Function iainfcanon

namespace:morph
page:iainfcanon

Synopse

Intersection of inf-generating operators.

  • y = iainfcanon(f, Iab, theta=45, DIRECTION="CLOCKWISE")
    • y: Image
    • f: Image
    • Iab: Interval
    • theta: Double Degrees of rotation: 45, 90, or 180.
    • DIRECTION: String Direction of rotation: 'CLOCKWISE' or ' ANTI-CLOCKWISE'
01. from numpy import *
02. from string import upper
03. 
04. def iainfcanon(f, Iab, theta=45, DIRECTION="CLOCKWISE"):
05.     from iaunion import iaunion
06.     from iainterot import iainterot
07.     from iaintersec import iaintersec
08.     from iainfgen import iainfgen
09. 
10.     DIRECTION = upper(DIRECTION)
11.     y = iaunion(f,1)
12.     for t in range(0,360,theta):
13.         Irot = iainterot( Iab, t, DIRECTION )
14.         y = iaintersec( y, iainfgen(f, Irot))
15. 
16.     return y

Description

iainfcanon creates the image y by computing intersections of transformations of the image f by inf-generating (i.e., dual of the hit-or-miss) operators. These inf-generating operators are characterized by rotations (in the clockwise or anti-clockwise direction) of theta degrees of the interval Iab.

Equation

Algorithm

function y=iainfcanon_equ( f, Iab, theta, DIRECTION )
  y = ones(size(f));
  y = iaintersec(y,iainfgen(f, Iab));
  alpha = theta;
  while alpha < 360
    Irot = iainterot( Iab, alpha, DIRECTION );
    y = iaintersec(y,iainfgen(f, Irot));
    alpha = alpha + theta;
  end;