tf.image.adjust_gamma

tf.image.adjust_gamma

tf.image.adjust_gamma

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

Defined in tensorflow/python/ops/image_ops_impl.py.

See the guide: Images > Image Adjustments

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.

Args:

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

Returns:

A Tensor. Gamma corrected output image.

Raises:

  • ValueError: If gamma is negative.

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

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/image/adjust_gamma

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部