def get_iou_distance(box, centroid):
    """
    Gets one minus the area intersection over union of two boxes

    Parameters
    ----------
    box : Box
        A Box object containing width and height information
    centroid : Box
        A Box object containing width and height information

    Returns
    -------
    float
        One minus intersection over union
        Smaller the number the closer the boxes

    """
    w = min(box.w, centroid.w)
    h = min(box.h, centroid.h)
    intersection = w * h
    union = box.w * box.h + centroid.w * centroid.h - intersection
    iou = intersection / union
    return 1 - iou
