Adjust hue, saturation, value of an RGB image randomly in YIQ color space.
tfa.image.random_hsv_in_yiq(
image: tfa.types.TensorLike
,
max_delta_hue: tfa.types.Number
= 0,
lower_saturation: tfa.types.Number
= 1,
upper_saturation: tfa.types.Number
= 1,
lower_value: tfa.types.Number
= 1,
upper_value: tfa.types.Number
= 1,
seed: Optional[int] = None,
name: Optional[str] = None
) -> tf.Tensor
Used in the notebooks
Equivalent to adjust_yiq_hsv()
but uses a delta_h
randomly
picked in the interval [-max_delta_hue, max_delta_hue]
, a
scale_saturation
randomly picked in the interval
[lower_saturation, upper_saturation]
, and a scale_value
randomly picked in the interval [lower_saturation, upper_saturation]
.
Args |
image
|
RGB image or images. Size of the last dimension must be 3.
|
max_delta_hue
|
float . Maximum value for the random delta_hue. Passing 0
disables adjusting hue.
|
lower_saturation
|
float . Lower bound for the random scale_saturation.
|
upper_saturation
|
float . Upper bound for the random scale_saturation.
|
lower_value
|
float . Lower bound for the random scale_value.
|
upper_value
|
float . Upper bound for the random scale_value.
|
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.
|
name
|
A name for this operation (optional).
|
Returns |
3-D float Tensor of shape [height, width, channels] .
|
Raises |
ValueError
|
if max_delta , lower_saturation , upper_saturation ,
lower_value , or upper_value is invalid.
|