nvidia.dali.fn.hsv

nvidia.dali.fn.hsv(*inputs, **kwargs)

Adjusts hue, saturation and value (brightness) of the images.

To change the hue, the saturation, and/or the value of the image, pass the corresponding coefficients. Remember that the hue is an additive delta argument, while for saturation and value, the arguments are multiplicative.

This operator accepts images in the RGB color space.

For performance reasons, the operation is approximated by a linear transform in the RGB space. The color vector is projected along the neutral (gray) axis, rotated based on the hue delta, scaled based on the value and saturation multipliers, and restored to the original color space.

This operator allows sequence inputs.

Supported backends
  • ‘cpu’

  • ‘gpu’

Parameters:

input (TensorList ('HWC', 'FHWC', 'DHWC')) – Input to the operator.

Keyword Arguments:
  • bytes_per_sample_hint (int or list of int, optional, default = [0]) –

    Output size hint, in bytes per sample.

    If specified, the operator’s outputs residing in GPU or page-locked host memory will be preallocated to accommodate a batch of samples of this size.

  • dtype (nvidia.dali.types.DALIDataType, optional, default = DALIDataType.UINT8) –

    The output data type.

    If a value is not set, the input type is used.

  • hue (float or TensorList of float, optional, default = 0.0) –

    Hue delta, in degrees.

    The hue component can be interpreted as an angle and values outside 0-360 range wrap around, as they would in case of rotation.

    Supports per-frame inputs.

  • preserve (bool, optional, default = False) – Prevents the operator from being removed from the graph even if its outputs are not used.

  • saturation (float or TensorList of float, optional, default = 1.0) –

    The saturation multiplier.

    Supports per-frame inputs.

  • seed (int, optional, default = -1) –

    Random seed.

    If not provided, it will be populated based on the global seed of the pipeline.

  • value (float or TensorList of float, optional, default = 1.0) –

    The value multiplier.

    Supports per-frame inputs.