Exemplo n.º 1
0
def compare_top_corners(figures):

    a_blobs = algorithm.get_blobs(algorithm.find_regions(figures[0]))
    c_blobs = algorithm.get_blobs(algorithm.find_regions(figures[2]))

    d_blobs = algorithm.get_blobs(algorithm.find_regions(figures[3]))
    f_blobs = algorithm.get_blobs(algorithm.find_regions(figures[5]))

    if len(a_blobs) < 2 or len(c_blobs) < 2 or len(d_blobs) < 2 or len(f_blobs) < 2:
        return False

    if transformation.strict_equality(a_blobs[algorithm.get_top(a_blobs)], c_blobs[algorithm.get_top(c_blobs)]) \
        and transformation.strict_equality(d_blobs[algorithm.get_top(d_blobs)], f_blobs[algorithm.get_top(f_blobs)]):
        return True
    else:
        return False
Exemplo n.º 2
0
def compare_bottom_bc_ef(figures):

    b_blobs = algorithm.get_blobs(algorithm.find_regions(figures[1]))
    c_blobs = algorithm.get_blobs(algorithm.find_regions(figures[2]))

    e_blobs = algorithm.get_blobs(algorithm.find_regions(figures[4]))
    f_blobs = algorithm.get_blobs(algorithm.find_regions(figures[5]))

    if len(b_blobs) < 2 or len(c_blobs) < 2 or len(e_blobs) < 2 or len(f_blobs) < 2:
        return False

    if transformation.strict_equality(b_blobs[algorithm.get_bottom(b_blobs)], c_blobs[algorithm.get_bottom(c_blobs)]) \
        and transformation.strict_equality(e_blobs[algorithm.get_bottom(e_blobs)], f_blobs[algorithm.get_bottom(f_blobs)]):
        return True
    else:
        return False
Exemplo n.º 3
0
def compare_top_corners(figures):

    a_blobs = algorithm.get_blobs(algorithm.find_regions(figures[0]))
    c_blobs = algorithm.get_blobs(algorithm.find_regions(figures[2]))

    d_blobs = algorithm.get_blobs(algorithm.find_regions(figures[3]))
    f_blobs = algorithm.get_blobs(algorithm.find_regions(figures[5]))

    if len(a_blobs) < 2 or len(c_blobs) < 2 or len(d_blobs) < 2 or len(
            f_blobs) < 2:
        return False

    if transformation.strict_equality(a_blobs[algorithm.get_top(a_blobs)], c_blobs[algorithm.get_top(c_blobs)]) \
        and transformation.strict_equality(d_blobs[algorithm.get_top(d_blobs)], f_blobs[algorithm.get_top(f_blobs)]):
        return True
    else:
        return False
Exemplo n.º 4
0
def compare_bottom_bc_ef(figures):

    b_blobs = algorithm.get_blobs(algorithm.find_regions(figures[1]))
    c_blobs = algorithm.get_blobs(algorithm.find_regions(figures[2]))

    e_blobs = algorithm.get_blobs(algorithm.find_regions(figures[4]))
    f_blobs = algorithm.get_blobs(algorithm.find_regions(figures[5]))

    if len(b_blobs) < 2 or len(c_blobs) < 2 or len(e_blobs) < 2 or len(
            f_blobs) < 2:
        return False

    if transformation.strict_equality(b_blobs[algorithm.get_bottom(b_blobs)], c_blobs[algorithm.get_bottom(c_blobs)]) \
        and transformation.strict_equality(e_blobs[algorithm.get_bottom(e_blobs)], f_blobs[algorithm.get_bottom(f_blobs)]):
        return True
    else:
        return False