nvidia.dali.experimental.dynamic.contrast#
- nvidia.dali.experimental.dynamic.contrast(input, /, *, batch_size=None, device=None, contrast=None, contrast_center=None, dtype=None)#
Adjusts the contrast of the images.
The contrast is adjusted based on the following formula:
out = contrast_center + contrast * (in - contrast_center)
This operator can also change the type of data.
This operator allows sequence inputs and supports volumetric data.
- Supported backends
‘cpu’
‘gpu’
- Parameters:
input¶ (Tensor/Batch ('FHWC', 'DHWC', 'HWC')) – Input to the operator.
- Keyword Arguments:
contrast¶ (float or Tensor/Batch of float, optional, default = 1.0) –
The contrast multiplier, where 0.0 produces the uniform grey.
Supports
per-frameinputs.contrast_center¶ (float or Tensor/Batch of float, optional, default = 0.5) –
The intensity level that is unaffected by contrast.
This is the value that all pixels assume when the contrast is zero. When not set, the half of the input type’s positive range (or 0.5 for
float) is used.Supports
per-frameinputs.dtype¶ (
nvidia.dali.types.DALIDataType, optional) –Output data type.
If not set, the input type is used.