Lossy compressionLossy compression schemes is a compression method of images where partial data are discarded to reduce the amount of data that need to be stored, handled of transmitted. The amount of data reduction possible using lossy compression can often be much more substantial than lossless data compression techniques. The drawback to using lossy compression schemes is the inability to recreate the original image at its full quality because of the discarded data during compression.
Lossy compression is most commonly used to compress multimedia data. When compressing medical images, use of lossy compression is not suggested if lossless techniques are available because it may lead to the discarding of vital diagnostic information. |
Original image
|
Artefact (lossy compression)
|
ArtefactsAn artefact is a noticeable distortion of an image caused by the use of a lossy data compression scheme. Due to the fact that the decompressor do not have enough data in the compressed version to reproduce the original, the result is an image of diminished quality or the introduction of artifacts. Artefacts are often viewed as a type data error introduced by lossy data compression schemes.
|
Compression artefacts occur in file formats such as JPEG. Possible types of artefacts include:
In terms of medical imaging, we must limit the amount of artefacts introduced to the image during compression. Compression must be achieved without jeopardizing the quality of the image. Lossless compression schemes do not create artefacts.
- Ringing (small and shorts strands of white near sharp edges)
- Posterizing (mixing of different tones of colour)
- Aliasing (ripple like waves of image distortion near curving edges)
- Blockiness in "busy" regions
In terms of medical imaging, we must limit the amount of artefacts introduced to the image during compression. Compression must be achieved without jeopardizing the quality of the image. Lossless compression schemes do not create artefacts.
JPEG
JPEG is a commonly used lossy compression scheme for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG uses a quality factor value of 0 to 100 to determine the compression ratio it will perform. Higher quality factor values means lower compression ratio. I turn, it will retain more data and create a higher quality picture, but in turn, does not compressed the image as much as if it was set at a much lower values. JPEG typically achieves 10:1 compression with little perceptible loss in image quality. It is the most common format for storing and transmitting photographic images on the World Wide Web.
To achieve the greatest compression with the least amount of loss in quality, we must determine what settings we set the compression ratio. It is a balancing act between quality and storage space required and the following two graphs will further examine the effects of different compression ratios on the quality of the image:
This graph shows the negative correlation between file size and compression ratio. This indicates that the higher the compression ratio set, the less the amount of storage space we need to store the image. We can observe that with a compression ratio of 1, the image size is already reduced by 20% while a compression ratio of 5 reduces the image size by 50%. It can also be noted that compression ratios beyond 30 show significantly less effect on reducing the size of the image
|
This graph shows the positive correlation between the quality of the image and number of bits per pixel. This indicates that with more storage space used for the image, the higher the quality of the image. We can observe that the quality only rises slightly beyond 1.5-2 bits per pixel. On the other hand, starting from 0.5 bits per pixel and under, the quality of the image sharply decreases. There is a 33% quality decrease when using 0.1 bits per pixel and 0.5 bits per pixels.
|
Discrete Cosine Transform (DCT)
Discrete cosine transform is one of the most common type of algorithm used in JPEG compressions. DCT works by separating images into parts of differing frequencies. Quantization is the most important step in the DCT process. Quantization compares 1 pixel with its surrounding neighbour pixels. Pixels that are less visually significant (such as less in numbers) are merged with the dominant coloured pixels. This allows great amounts of pixels to be represented by 1 singles value. To sum, during quantization, less important frequencies are discarded. Hence, only the most important frequencies that remain are used in the decompression process. As a result, reconstructed images contain some distortion, which are adjusted during the compression stage. This method can be used for both colour and black-and-white images.
The process could be described in 5 steps:
|