tf.image.random_brightness——tf2.1 Document

参考自tf2.1官方文档:
https://www.tensorflow.org/api_docs/python/tf/image/random_brightness


Adjust the brightness of images by a random factor.
该函数用于随机调整图像的亮度。

tf.image.random_brightness(
    image, max_delta, seed=None
)

Equivalent to adjust_brightness() using a delta randomly picked in the interval [-max_delta, max_delta).
在区间[-max_delta, max_delta)上随机选择delta值,增加到图片亮度上




Args:

  • image: An image or images to adjust.
  • image: 要去调整的一张图片或者多张图片
  • max_delta: float, must be non-negative.
  • max_delta: 浮点型,必须是非负的。
  • seed: A Python integer. Used to create a random seed. See tf.compat.v1.set_random_seed for behavior.
  • seed: 整型,用于创建随机数种子。




Returns:

  • The brightness-adjusted image(s).
  • 返回亮度调整过的图片




Raises:

  • ValueError: if max_delta is negative.
  • 如果max_delta是负数,则 raise ValueError
原创文章 66 获赞 14 访问量 9083

猜你喜欢

转载自blog.csdn.net/HaoZiHuang/article/details/105224462