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

Changes the saturation level of the image.

This operator allows sequence inputs and supports volumetric data.

Supported backends
  • ‘cpu’

  • ‘gpu’


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) –

    Output data type.

    If not set, the input type is used.

  • image_type (nvidia.dali.types.DALIImageType, optional, default = DALIImageType.RGB) – The color space of the input and the output image.

  • 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 change factor.

    Values must be non-negative.

    Example values:

    • 0 - Completely desaturated image.

    • 1 - No change to image’s saturation.

    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.