image.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:polyaxon 作者: polyaxon 项目源码 文件源码
def adjust_gamma(image, gamma=1, gain=1):
    """Performs Gamma Correction on the input image.
    Also known as Power Law Transform. This function transforms the
    input image pixelwise according to the equation Out = In**gamma
    after scaling each pixel to the range 0 to 1.
    (A mirror to tf.image adjust_gamma)

    Args:
        image : A Tensor.
        gamma : A scalar. Non negative real number.
        gain  : A scalar. The constant multiplier.

    Returns:
        A Tensor. Gamma corrected output image.

    Notes:
        For gamma greater than 1, the histogram will shift towards left and
        the output image will be darker than the input image.
        For gamma less than 1, the histogram will shift towards right and
        the output image will be brighter than the input image.

    References:
        [1] http://en.wikipedia.org/wiki/Gamma_correction
    """
    return tf.image.adjust_gamma(image, gamma, gain)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号