Warning: This project is deprecated. TensorFlow Addons has stopped development,
The project will only be providing minimal maintenance releases until May 2024. See the full
announcement here or on
github.
tfa.image.adjust_hsv_in_yiq
Stay organized with collections
Save and categorize content based on your preferences.
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
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 .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-05-25 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-05-25 UTC."],[],[]]