ECE359_Image Compression
ECE359_Image Compression
MULTIMEDIA
IMAGE COMPRESSION
R = 1-1/C
C = b/b’
• Data transmission
How can we implement compression?
Three principal types of data redundancies:
• Coding redundancy
Most 2-D intensity arrays contain more bits than are
needed to represent the intensities
• Irrelevant information
Most 2-D intensity arrays contain information that is
ignored by the human visual system
Examples of Redundancy
Coding Redundancy
8
C= 4.42
1.81
R = 1 − 1/ 4.42 = 0.774
Spatial and Temporal Redundancy
1. All 256 intensities are equally probable.
2. The pixels along each line are identical.
3. The intensity of each line was selected randomly.
Spatial and Temporal Redundancy
1. All 256 intensities are equally probable.
2. The pixels along each line are identical.
3. The intensity of each line was selected randomly.
Run-length pair specifies the start of a new intensity and the
number of consecutive pixels that have that intensity.
Each 256-pixel line of the original representation is replaced
by a single 8-bit intensity value and length 256 in the run-length
representation.
256 256 8 / 8
= 65536 :1
Measuring Image Information
H=
−[0.25log 2 0.25 + 0.47 log 2 0.47 + 0.25log 2 0.25 + 0.03log 2 0.03]
1.6614 bits/pixel
Fidelity Criteria
Let f ( x, y ) be an input image and f ( x, y ) be an approximation
of f ( x, y ). The images are of size M N .
M −1 N −1 2
x =0 y =0
f ( x , y )
SNR ms = M −1 N −1 2
x =0 y =0
f ( x , y ) − f ( x , y )
RMSE = 5.17 RMSE = 15.67 RMSE = 14.17
Image Compression Models
0.0 0.4
0.56 0.56 0.5664
LZW (Dictionary coding)
39-39-126-
260 259 126-39 262
126
259 257 39-126 263 126-39-39
257 126 126 264 39-126-126
Some Basic Compression Methods:
Run-Length Coding
1. Run-length Encoding, or RLE is a technique used to reduce
the size of a repeating string of characters.
WWWWWWWWWWWWBWWWWWWWWWWWWBBBW
WWWWWWWWWWWWWWWWWWWWWWWBWWWW
WWWWWWWWWW
RLE coding:
12W1B12W3B24W1B14W