def deal_with_out_boundary(img):
    """
    Deal with the outlier.
    :param img: input image.
    :return: image without outlier.
    """
    img[img > 255.] = 255.
    img[img < 0.] = 0.
    return img