def normalise_coordinates(x1, y1, x2, y2,min_x,max_x,min_y,max_y):
    """
    Parameters: 
       x1, y1, x2, y2: bounding box coordinates to normalise
       min_x,max_x,min_y,max_y: minimum and maximum bounding box values (min = 0, max = 1)
    Returns:
       Normalised bounding box coordinates (scaled between 0 and 1)
    """
    x1, y1, x2, y2 = (x1-min_x)/(max_x-min_x), (y1-min_y)/(max_y-min_y), (x2-min_x)/(max_x-min_x), (y2-min_y)/(max_y-min_y)
    return x1, y1, x2, y2