×
☰ Menu

Compression

Compression is a way of coding that reduces the number of bits needed to represent a certain amount of information.
 

Figure: A General Data Compression Scheme

Image compression

Image compression is a type of data compression applied to digital images, to reduce their cost for storage or transmission.
•    Lossy compression
•    Lossless compression

Figure: Lossy compression and Lossless compression

If the compression and decompression processes induce no information loss, then the compression scheme is lossless; otherwise, it is lossy.

Lossless compression

In lossless data compression, the integrity of the data is preserved. The original data and the data after compression and decompression are exactly the same because, in these methods, the compression and decompression algorithms are exact inverses of each other no part of the data is lost in the process. 
Redundant data is removed in compression and added during decompression. Lossless compression methods are normally used when we cannot afford to lose any data.

Lossy compression

Our eyes and ears cannot distinguish subtle changes. In such cases, we can use a lossy such cases; we can use a lossy data compression method. Lossy methods are especially suitable for natural images such as photographs in applications where the minor (sometimes imperceptible) loss of fidelity is acceptable to achieve a substantial reduction in bit rate.
Lossy compression that produces negligible differences may be called visually lossless.


Lossless image compression techniques are:
1.    Run-length encoding – used in PCX, BMP, TGA, TIFF
2.    variable-length coding (Huffman, Arithmetic Coding)
3.    Bit Plane coding
4.    DPCM and Predictive Coding
5.    Entropy encoding
6.    LZW coding
7.    Adaptive dictionary algorithms – used in GIF and TIFF
8.    Deflation – used in PNG, MNG, and TIFF
9.    Chain codes


Lossy compression techniques are:
1.    Reducing the color space.
2.    Chroma subsampling.
3.    Fractal compression
4.    Transform coding (DCT and Wavelet)
•    Discrete cosine transform (DCT) used in JPEG. 
•    Wavelet transform (reversible or irreversible) used in JPEG2000