TensorFlow函数:tf.image.adjust_gamma

2019-01-31 11:33 更新

tf.image.adjust_gamma函数

tf.image.adjust_gamma(
    image,
    gamma=1,
    gain=1
)

定义在:tensorflow/python/ops/image_ops_impl.py.

请参阅指南:图像操作>图像调整

对输入图像执行Gamma校正.

也称为幂律变换(Power Law Transform).该函数在将每个像素缩放到范围0到1之后,根据等式Out = In**gamma,按照像素方式转换输入图像.

参数:

  • image:张量.
  • gamma:标量或张量,非负实数.
  • gain:标量或张量,恒定的乘数.

返回值:

tf.image.adjust_gamma函数返回张量.Gamma校正后的输出图像.

可能引发的异常:

  • ValueError:如果gamma是负值.

注意:对于大于1的gamma,直方图将向左移动,输出图像将比输入图像更暗;对于小于1的伽玛,直方图将向右移动,输出图像将比输入图像亮.


以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy