Professional Documents
Culture Documents
ANISHA M. LAL
Data Compression
Lossless
Information preserving
Low compression ratios
Lossy
Not information preserving
High compression ratios
compression
Compression ratio:
Data Redundancy
Interpixel Redundancy
Coding Redundancy
Psychovisual Redundancy
Interpixel Redundancy
Based upon frequency of occurrences
Run length encoding
Diatomic encoding
Bit plane encoding
Coding Redundancy
* Based upon probability of occurrences
Huffman encoding
Arithmetic encoding
Run length Encoding (Interpixel
Redundancy)
Encodes repeating string of symbols (i.e., runs) using a
few bytes: (symbol, count)
For example, a data stream has only five symbols ABCDE with
the following probabilities
P(A)=0.16
P(B)=0.51
P(C) =0.09
P(D) = 0.13
P(E) = 0.11
Cont…
A 011
B 1
C 000
D 010
E 001
Arithmetic Encoding (Coding
Redundancy)
Encode message: α1 α2 α3 α3 α4
0 1
2) Subdivide [0, 1) based on the probabilities of αi
Encode
α1 α 2 α3 α3 α4
[0.06752, 0.0688)
or
0.068
Lossy Compression
Transform the image into a domain where compression
can be performed more efficiently (i.e., reduce interpixel
redundancies).
JPEG Compression
Modes of operation:
(1) Sequential DCT-based encoding
(2) Progressive DCT-based encoding
(3) Lossless encoding
(4) Hierarchical encoding
JPEG Compression
(Sequential DCT-based encoding)
Entropy
encoder
Entropy
decoder
JPEG Steps
1. Divide the image into 8x8 subimages;
Quantization
JPEG Steps (cont’d)
5. Order the coefficients using zig-zag ordering
- Places non-zero coefficients first
- Creates long runs of zeros (i.e., ideal for run-length
encoding)
Example
JPEG Steps (cont’d)
6. Encode coefficients:
symbol_1 symbol_2
(SIZE) (AMPLITUDE)
predictive
coding: