def get_restriction(bndbox, width, height):
    """
    Restrict transform parameters.
    :param bndbox: bounding box of original object in [xmin, ymin, xmax, ymax]
    :param width: image width
    :param height: image height
    :return: a dictionary containing restrictions
    """
    xmin, ymin, xmax, ymax = bndbox
    restricts = dict()
    restricts['bbox_w'] = xmax - xmin
    restricts['bbox_h'] = ymax - ymin
    if xmin < 10 or xmax > width - 10:
        restricts['restrict_x'] = 1
        restricts['noflip'] = 1
    if ymin < 10 or ymax > height-10:
        restricts['restrict_y'] = 1
        restricts['noflip'] = 1
    return restricts