Example #1
0
def gen_chip2(tup):
    r"""
    Parallel worker. Crops chip out of an image, applies filters, etc
    """
    # print('generating chip')
    cfpath, gfpath, bbox, theta, new_size, filter_list = tup
    chipBGR = vt.compute_chip(gfpath, bbox, theta, new_size, filter_list)
    # if DEBUG:
    # print('write chip: %r' % cfpath)
    height, width = chipBGR.shape[0:2]
    # vt.imwrite(cfpath, chipBGR)
    return chipBGR, cfpath, width, height
Example #2
0
def gen_chip2(tup):
    r"""
    Parallel worker. Crops chip out of an image, applies filters, etc
    """
    #print('generating chip')
    cfpath, gfpath, bbox, theta, new_size, filter_list = tup
    chipBGR = vt.compute_chip(gfpath, bbox, theta, new_size, filter_list)
    #if DEBUG:
    #print('write chip: %r' % cfpath)
    height, width = chipBGR.shape[0:2]
    #vt.imwrite(cfpath, chipBGR)
    return chipBGR, cfpath, width, height
Example #3
0
def gen_chip(tup):
    r"""
    Parallel worker. Crops chip out of an image, applies filters, etc

    THERE MAY BE AN ERROR IN HERE DUE TO IMWITE BEING INSIDE A PARALLEL FUNCTION
    BUT IT MAY BE SOMETHING ELSE?

    Either way we probably shouldn't call imwrite inside here
    """
    # print('generating chip')
    cfpath, gfpath, bbox, theta, new_size, filter_list = tup
    chipBGR = vt.compute_chip(gfpath, bbox, theta, new_size, filter_list)
    # if DEBUG:
    # print('write chip: %r' % cfpath)
    height, width = chipBGR.shape[0:2]
    vt.imwrite(cfpath, chipBGR)
    return cfpath, width, height
Example #4
0
def gen_chip(tup):
    r"""
    Parallel worker. Crops chip out of an image, applies filters, etc

    THERE MAY BE AN ERROR IN HERE DUE TO IMWITE BEING INSIDE A PARALLEL FUNCTION
    BUT IT MAY BE SOMETHING ELSE?

    Either way we probably shouldn't call imwrite inside here
    """
    #print('generating chip')
    cfpath, gfpath, bbox, theta, new_size, filter_list = tup
    chipBGR = vt.compute_chip(gfpath, bbox, theta, new_size, filter_list)
    #if DEBUG:
    #print('write chip: %r' % cfpath)
    height, width = chipBGR.shape[0:2]
    vt.imwrite(cfpath, chipBGR)
    return cfpath, width, height