modules/utils.py
def boxify(im, topleft, boxsize, color=[1, 1, 1], width=2):
    '''
        Generate a box around a region.
    '''
    h, w = topleft
    dh, dw = boxsize
    
    im[h:h+dh+1, w:w+width, :] = color
    im[h:h+width, w:w+dh+width, :] = color
    im[h:h+dh+1, w+dw:w+dw+width, :] = color
    im[h+dh:h+dh+width, w:w+dh+width, :] = color

    return im

        Generate a box around a region.
    
Generate a box around a region.
Generate a box around a region .
def boxify(im, topleft, boxsize, color=[1, 1, 1], width=2):
    h, w = topleft
    dh, dw = boxsize
    im[h:h+dh+1, w:w+width, :] = color
    im[h:h+width, w:w+dh+width, :] = color
    im[h:h+dh+1, w+dw:w+dw+width, :] = color
    im[h+dh:h+dh+width, w:w+dh+width, :] = color
    return im
def boxify ( im , topleft , boxsize , color = [ 1 , 1 , 1 ] , width = 2 ) : h , w = topleft dh , dw = boxsize im [ h : h + dh + 1 , w : w + width , : ] = color im [ h : h + width , w : w + dh + width , : ] = color im [ h : h + dh + 1 , w + dw : w + dw + width , : ] = color im [ h + dh : h + dh + width , w : w + dh + width , : ] = color return im
Generate a box around a region.
Generate a box around a region .
'''
        Generate a box around a region.
    '''
im
topleft
boxsize
color
width