tfa.image.adjust_hsv_in_yiq

View source on GitHub

Adjust hue, saturation, value of an RGB image in YIQ color space.

Aliases:

tfa.image.adjust_hsv_in_yiq(
    image,
    delta_hue=0,
    scale_saturation=1,
    scale_value=1,
    name=None
)

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.

Args:

  • image: RGB image or images. Size of the last dimension must be 3.
  • delta_hue: float, the hue rotation amount, in radians.
  • scale_saturation: float, factor to multiply the saturation by.
  • scale_value: float, factor to multiply the value by.
  • name: A name for this operation (optional).

Returns:

Adjusted image(s), same shape and dtype as image.