예제 #1
0
def iathick(f, Iab=None, n=-1, theta=45, DIRECTION="CLOCKWISE"):
    from iaisbinary import iaisbinary
    from iaintersec import iaintersec
    from iasupgen import iasupgen
    from iainterot import iainterot
    from iaunion import iaunion
    from iaisequal import iaisequal
    from iahomothick import iahomothick
    if Iab is None:
        Iab = iahomothick()

    DIRECTION = upper(DIRECTION)
    assert iaisbinary(f), 'f must be binary image'
    if n == -1: n = product(f.shape)
    y = f
    zero = iaintersec(f, 0)
    for i in range(n):
        aux = zero
        for t in range(0, 360, theta):
            sup = iasupgen(y, iainterot(Iab, t, DIRECTION))
            aux = iaunion(aux, sup)
            y = iaunion(y, sup)
        if iaisequal(aux, zero): break

    return y
예제 #2
0
파일: iathick.py 프로젝트: DiJei/ia870
def iathick(f, Iab=None, n=-1, theta=45, DIRECTION="CLOCKWISE"):
    from iaisbinary import iaisbinary
    from iaintersec import iaintersec
    from iasupgen import iasupgen
    from iainterot import iainterot
    from iaunion import iaunion
    from iaisequal import iaisequal
    from iahomothick import iahomothick
    if Iab is None:
        Iab = iahomothick()

    DIRECTION = upper(DIRECTION)
    assert iaisbinary(f),'f must be binary image'
    if n == -1: n = product(f.shape)
    y = f
    zero = iaintersec(f,0)
    for i in range(n):
        aux = zero
        for t in range(0,360,theta):
            sup = iasupgen( y, iainterot(Iab, t, DIRECTION))
            aux = iaunion( aux, sup)
            y = iaunion( y, sup)
        if iaisequal(aux,zero): break

    return y
예제 #3
0
def iainfcanon(f, Iab, theta=45, DIRECTION="CLOCKWISE"):
    from iaunion import iaunion
    from iainterot import iainterot
    from iaintersec import iaintersec
    from iainfgen import iainfgen

    DIRECTION = DIRECTION.upper()
    y = iaunion(f, 1)
    for t in range(0, 360, theta):
        Irot = iainterot(Iab, t, DIRECTION)
        y = iaintersec(y, iainfgen(f, Irot))

    return y
예제 #4
0
파일: iainfcanon.py 프로젝트: DiJei/ia870
def iainfcanon(f, Iab, theta=45, DIRECTION="CLOCKWISE"):
    from iaunion import iaunion
    from iainterot import iainterot
    from iaintersec import iaintersec
    from iainfgen import iainfgen

    DIRECTION = upper(DIRECTION)
    y = iaunion(f,1)
    for t in range(0,360,theta):
        Irot = iainterot( Iab, t, DIRECTION )
        y = iaintersec( y, iainfgen(f, Irot))

    return y
예제 #5
0
def iacthin(f, g, Iab=None, n=-1, theta=45, DIRECTION="CLOCKWISE"):
    from iaisbinary import iaisbinary
    from iasupgen import iasupgen
    from iainterot import iainterot
    from iaunion import iaunion
    from iasubm import iasubm
    from iaisequal import iaisequal
    from iahomothin import iahomothin
    if Iab is None:
        Iab = iahomothin()

    DIRECTION = upper(DIRECTION)
    assert iaisbinary(f),'f must be binary image'
    if n == -1: n = product(f.shape)
    y = f
    old = y
    for i in range(n):
        for t in range(0,360,theta):
            sup = iasupgen( y, iainterot(Iab, t, DIRECTION))
            y = iaunion( iasubm( y, sup),g)
        if iaisequal(old,y): break
        old = y

    return y