def get_voc_coords(string):
    """
    convert PAGE record string coords into VOC coords
    :param string: a string containing the coordinates in PAGE format
    for example '168,146 476,146 168,326 476,326'
    :return: a tuple of (xmin, ymin,xmax, ymax)
    """
    points = string.split()
    points = [point.split(",") for point in points]
    x_points = [int(point[0]) for point in points]
    y_points = [int(point[1]) for point in points]
    return min(x_points),min(y_points), max(x_points), max(y_points)