def getCenter(box):
    """
    This function calculates the center of a bounding box.
    """
    # get the corners of the box
    x1 = box[0]
    x2 = box[2]
    y1 = box[1]
    y2 = box[3]

    # find the middle along the x axis
    center_x = int((x1+x2)/2)
    # find the middle along the y axis
    center_y = int((y1+y2)/2)

    # return that position
    return (center_x, center_y)