def makeSquare(x, y, w, h):
    """ Convert a rectangle ROI to square.

    @param: left-most column
    @param: top-most row
    @param: width of region
    @param: height of region
    @return: x, y, w, h of the new ROI
    """

    c_x = x + w // 2
    c_y = y + h // 2

    sz = max(w, h)
    x = c_x - sz // 2
    y = c_y - sz // 2

    return int(x), int(y), int(sz), int(sz)