View source on GitHub |
Adjust hue, saturation, value of an RGB image in YIQ color space.
tfa.image.adjust_hsv_in_yiq(
image: tfa.types.TensorLike
,
delta_hue: tfa.types.Number
= 0,
scale_saturation: tfa.types.Number
= 1,
scale_value: tfa.types.Number
= 1,
name: Optional[str] = None
) -> tf.Tensor
Used in the notebooks
Used in the tutorials |
---|
This is a convenience method that converts an RGB image to float representation, converts it to YIQ, rotates the color around the Y channel by delta_hue in radians, scales the chrominance channels (I, Q) by scale_saturation, scales all channels (Y, I, Q) by scale_value, converts back to RGB, and then back to the original data type.
image
is an RGB image. The image hue is adjusted by converting the
image to YIQ, rotating around the luminance channel (Y) by
delta_hue
in radians, multiplying the chrominance channels (I, Q) by
scale_saturation
, and multiplying all channels (Y, I, Q) by
scale_value
. The image is then converted back to RGB.
Returns | |
---|---|
Adjusted image(s), same shape and dtype as image .
|