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
input (TensorList ('HWC', 'FHWC')) – Input to the operator.
- Keyword Arguments
bytes_per_sample_hint (int or list of int, optional, default = ) –
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.
preserve (bool, optional, default = False) – Prevents the operator from being removed from the graph even if its outputs are not used.
quality (int or TensorList of int, optional, default = 50) –
JPEG compression quality from 1 (lowest quality) to 100 (highest quality).
Any values outside the range 1-100 will be clamped.
seed (int, optional, default = -1) –
If not provided, it will be populated based on the global seed of the pipeline.