def crop_img(i, edge=0):
    """ crop the image edge % pr side."""
    new_img = i.copy()
    height = new_img.shape[0]
    width = new_img.shape[1]
    sh = int(height / 100 * edge)
    sw = int(width / 100 * edge)

    return new_img[sh:height - sh, sw:width - sw]