tf.image.random_hue——tf2.1 Document

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


Adjust the hue of RGB images by a random factor.
该函数用于随机调整RGB图像的色调。

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

Equivalent to adjust_hue() but uses a delta randomly picked in the interval [-max_delta, max_delta].
max_delta must be in the interval [0, 0.5].

在区间[-max_delta, max_delta]上随机选择delta值,更改图片色调。
max_delta必须在区间[0, 0.5]中。




Args:

  • image: RGB image or images. Size of the last dimension must be 3.

  • image: 单张RGB图片或多张RGB图片,最后一维必须为3

  • max_delta: float. Maximum value for the random delta.

  • max_delta: 浮点数,指定随机 delta 值的最大值

  • seed: An operation-specific seed.
    It will be used in conjunction with the graph-level seed to determine the real seeds that will be used in this operation.
    Please see the documentation of set_random_seed for its interaction with the graph-level random seed.

  • seed: 特定操作的种子。(注:笔者不太明白这个种子和随机数种子有什么区别,只是感觉有点儿玄乎)


Returns:

  • Adjusted image(s), same shape and DType as image.
  • 色调调整过后的图片,与输入 image 有相同的shape和类型


Raises:

  • ValueError: if max_delta is invalid.
  • 如果 max_delta 是无效的,将 raise ValueError,max_delta必须在区间[0, 0.5]中。
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值