Beispiel #1
0
def prepare(image, show_image, logger):
    # TODO comment
    im_l = image.convert('L')
    show_image(im_l, "ITU-R 601-2 luma transform")

    logger("edge detection")
    im_edges = filters.edge_detection(im_l)
    show_image(im_edges, "edge detection")

    im_h = filters.high_pass(im_edges, 100)
    show_image(im_h, "high pass filters")

    return im_h
Beispiel #2
0
def transform(image, hough, show_image):
    # TODO comment
    im_hough = hough.transform(image)
    show_image(im_hough, "hough transform")

    # im_hough = filters.peaks(im_hough)
    # show_image(im_hough, "peak extraction")
               
    im_h2 = filters.high_pass(im_hough, 128)
    show_image(im_h2, "second high pass filters")

    im_h2 = filters.components(im_h2, 2)
    show_image(im_h2, "components centers")

    return im_h2