nvidia.dali.experimental.dynamic.jpeg_compression_distortion#
- nvidia.dali.experimental.dynamic.jpeg_compression_distortion(input, /, *, batch_size=None, device=None, quality=None)#
Introduces JPEG compression artifacts to RGB images.
JPEG is a lossy compression format which exploits characteristics of natural images and human visual system to achieve high compression ratios. The information loss originates from sampling the color information at a lower spatial resolution than the brightness and from representing high frequency components of the image with a lower effective bit depth. The conversion to frequency domain and quantization is applied independently to 8x8 pixel blocks, which introduces additional artifacts at block boundaries.
This operation produces images by subjecting the input to a transformation that mimics JPEG compression with given
qualityfactor followed by decompression.This operator allows sequence inputs.
- Supported backends
‘cpu’
‘gpu’