def getROI(img,x,y,ROI_size):
    """
    crop square ROI from image with center x, y coordinate
    Parameters:
        -img: input image
        -x,y: center coordinate of ROI
        -ROI_size: size of ROI in pixel
    Returns:
        -imCrop: image of ROI
        -x1,y1: coordinate of top left corner of the ROI
        -x2,y2: coordinate of botton right corner of the ROI
    """
    x1 = int(x-(ROI_size/2))
    y1 = int(y-(ROI_size/2))
    x2 = int(x+(ROI_size/2))
    y2 = int(y+(ROI_size/2))
    imCrop = img[y1:y2,x1:x2]
    return imCrop,x1,y1,x2,y2