Data compression aims to reduce the amount of data required to represent a given quantity of information while preserving as much information as possible
Image Compression -=> Reduce the amount of data required to represent a digital image
Types
Lossless
Information preserving
Low compression ratios
Lossy
Not information preserving
High compression ratios
Types
JPEG Compression
It uses DCT for handling interpixel redundancy
Modes of operation
Sequential DCT-based encoding
Steps
Divide the image into 8x8 subimages
Shift the gray-levels in the range [-128, 127]
DCT requires range be centered around 0
Apply DCT -=> 64 coefficients
1 DC coefficient: F(0,0)
63 AC coefficients: F(u,v)
Quantize the coefficients
Order the coefficients using zig-zag ordering
Places non-zero coefficients first
Creates long runs of zeros
Encode coefficients
Form "intermediate" symbol sequence
DC coefficients -=> Predictive encoding
AC coefficients -=> Variable length coding
Progressive DCT-based encoding
Lossless encoding
Hierarchical encoding
Compression Ratio = Before Compression Bits/After Compression Bits
Data Redundancy
Interpixel Redundancy
It is a redundancy corresponding to statistical dependencies among pixels, especially between neighboring pixels
Based upon frequency of occurrences
Run length encoding
Encodes repeating string of symbols (runs) using a few bytes
Can compress any type of data but cannot achieve high compression ratios compared to other compression methods
Diatomic encoding
Bit plane encoding
Process each bit plane individually
Decompose an image into a series of binary images
Compress each binary image
Coding Redundancy
The uncompressed image usually is coded with each pixel by a fixed length
Based upon probability of occurrences
Huffman encoding
A variable-length coding technique, Symbols are encoded one at a time
Optimal code -=> Minimizes the number of code symbols per source symbol
Technique
Forward Pass
Sort probabilities per symbol
Combine the lowest two probabilities
Repeat Step2 until only two probabilities remain
Backward Pass
Assign code symbols going backwards
Huffman Decoding
Arithmetic encoding
Sequences of source symbols are encoded together (instead of one at a time)
No one-to-one correspondence between source symbols and code words
Slower than Huffman coding but typically achieves better compression
Psychovisual Redundancy
It is a redundancy corresponding to different sensitivities to all image signals by human eyes
Block Truncation Coding (BTC)
Dividing the image into small sub-images and then reducing the number of gray levels within each block
The gray levels are reduced by a quantizer that adapts to local statistics
Encoding
Image is divided into non overlapping blocks
For each block calculate the mean and standard deviation
Two-level quantization is performed where compression is achieved
Decoding
The 16-bit block is stored and transmitted along with mean and standard deviation
Reconstruction of block is done which preserve the mean and standard deviation
Reconstruction
Predictive Coding
Predictive coding achieves good compression without significant computational overhead and can be either lossless or lossy, Based on eliminating the inter-pixel redundancies of closely spaced pixels in space/or in time by extracting and coding the new information in each pixel
The new information of a pixel is defined as the difference between the actual and the predicted value of the pixel
The coding system consists of an encoder and a decoder, each contains an identical predictor