def center_crop(img_mat, size = (224, 224)):
    """
    Center Crops an image with certain size, image must be bigger than crop size (add check for that)
    
    params:
        img_mat: (3D-matrix) image matrix of shape (width, height, channels)
        size: (tuple) the size of crops (width, height)
    returns:
        img_mat: that has been center cropped to size of center crop
    """
    
    w,h,c = img_mat.shape
    start_h = h//2-(size[1]//2)  # Size[1] - h of cropped image
    start_w = w//2-(size[0]//2)  # Size[0] - w of cropepd image
    return img_mat[start_w:start_w+size[0],start_h:start_h+size[1], :]