Professional Documents
Culture Documents
Software Research
Image Compression
Digital Image Processing
Software Research
Image Compression
We want to remove redundancy from the data
Mathematically
Transformation
2D array
Of pixels
Statistically
Uncorrelated data
Digital Image Processing
Software Research
Image Compression
Outline:
1. Fundamentals
Coding Redundancy
Interpixel Redundancy
Psychovisual Redundancy
Fidelity Criteria
2. Error-Free Compression
Variable-length Coding
LZW Coding
Predictive Coding
3. Lossy Compression
Transform Coding
Wavelet Coding
4. Image Compression Standards
Digital Image Processing
Software Research
Fundamentals
The term data compression refers to the process of reducing the
amount of data required to represent a given quantity of information
Data Information
Various amount of data can be used to represent the same information
Data might contain elements that provide no relevant information :
data redundancy
Data redundancy is a central issue in image compression. It is not an
abstract concept but mathematically quantifiable entity
=
Some Images are adopted from R. C. Gonzalez & R. E. Woods
Digital Image Processing
Software Research
Data Redundancy
Let n
1
and n
2
denote the number of information carrying units in two
data sets that represent the same information
The relative redundancy R
D
is define as :
where C
R
, commonly called the compression ratio, is
2
1
1
1
n
n
C
C
R
R
R
D
=
=
Digital Image Processing
Software Research
Data Redundancy
If n
1
= n
2 ,
C
R
=1 and R
D
=0 no redundancy
If n
1
>> n
2 ,
C
R
and R
D
high redundancy
If n
1
<< n
2 ,
C
R
and R
D
undesirable
A compression ration of 10 (10:1) means that the first data set has 10
information carrying units (say, bits) for every 1 unit in the second
(compressed) data set.
In Image compression , 3 basic redundancy can be identified
Coding Redundancy
Interpixel Redundancy
Psychovisual Redundancy
1
0
Digital Image Processing
Software Research
Coding Redundancy
Recall from the histogram calculations
where p(r
k
) is the probability of a pixel to have a certain
value r
k
If the number of bits used to represent r
k
is l(r
k
), then
) ( )( (
) (
) (
1
0
=
=
= =
L
k
k k av
k k
k
r p r l L
n
n
n
r h
r p
Digital Image Processing
Software Research
Coding Redundancy
Example:
099 . 0
11 . 1
1
1
11 . 1
2
3
7 . 2
) 02 . 0 ( 6 ... ) 16 . 0 ( 3 ) 25 . 0 ( 2 ) 019 ( 2
) ( )( (
7
0
= =
= =
=
+ + + + =
=
=
D
R
k
k k av
R
C
bits
r p r l L
Digital Image Processing
Software Research
Coding Redundancy
Variable-Length
Coding
Digital Image Processing
Software Research
Inter-pixel Redundancy
Here the two pictures have
Approximately the same
Histogram.
We must exploit Pixel
Dependencies.
Each pixel can be estimated
From its neighbors.
Digital Image Processing
Software Research
Run-Length Encoding
Example of Inter-pixel
Redundancy removal
Digital Image Processing
Software Research
Psycho-visual Redundancy
The human visual system is more
sensitive to edges
Middle Picture:
Uniform quantization from 256 to
16 gray levels
C
R
= 2
Right picture:
Improved gray level quantization
(IGS)
C
R
= 2
Digital Image Processing
Software Research
Fidelity Criteria
2
1
0
1
0
)] , ( ) , ( [
1
)] , ( ) , ( [
) , ( ) , ( ) , (
y x f y x f
MN
e
y x f y x f
y x f y x f y x e
rms
M
x
N
y
=
=
N v u
v u y x g y x f v u T
N
x
N
y
Digital Image Processing
Software Research
2D Transforms
Inverse transform
h(x,y,u,v) is the inverse transformation kernel or basis functions
. 1 ,..., 2 , 1 , 0 ,
) , , , ( ) , ( ) , (
1
0
1
0
=
=
=
N y x
v u y x h v u T y x f
N
u
N
v
Digital Image Processing
Software Research
Discrete Cosine Transform
One of the most frequently used
transformations for image compression is
the DCT.
=
(
+
(
+
=
=
N
N
u
N
v y
N
u x
v u
v u y x h v u y x g
2
1
) (
2
) 1 2 (
cos
2
) 1 2 (
cos ) ( ) (
) , , , ( ) , , , (
o
t t
o o
for u=0
for u=1, 2, , N-1
Digital Image Processing
Software Research
Discrete Cosine Transform
Digital Image Processing
Software Research
2D Transforms
Digital Image Processing
Software Research
Effect of Window Size
Digital Image Processing
Software Research
Quantization
Quantizer
Digital Image Processing
Software Research
Quantization
Each transformed coefficient is quantized
(
=
) , (
) , (
) , (
v u Z
v u T
round v u T
Digital Image Processing
Software Research
Quantization
Digital Image Processing
Software Research
Bit allocation and Zig Zag Ordering
Digital Image Processing
Software Research
DCT and Quantization
(
=
) , (
) , (
) , (
v u Z
v u T
round v u T
(
=
) , ( 4
) , (
) , (
v u Z
v u T
round v u T
Right Column
Digital Image Processing
Software Research
Wavelet Coding
Digital Image Processing
Software Research
Wavelet Transform
Put a pixel in each quadrant- No size change
1 2
3 4
Digital Image Processing
Software Research
Now let
a = (x1+x2+x3+x4)/4
b =(x1+x2-x3-x4)/4
c =(x1+x3-x2-x4)/4
d =(x1+x4-x2-x3)/4
Wavelet Transform
a b
c d
(
(
(
(
(
(
(
(
=
(
(
(
(
(
(
(
(
(
(
(
(
=
(
(
(
(
d
c
b
a
x
x
x
x
x
x
x
x
d
c
b
a
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
4
3
2
1
4
3
2
1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
4
1
Digital Image Processing
Software Research
Wavelet Transform
Digital Image Processing
Software Research
Wavelet Transform
Digital Image Processing
Software Research
Wavelet Transform
Digital Image Processing
Software Research
Wavelet Coding
High Frequency coefficients tend to be very
small --- 0
They can be quantized very effectively
without distorting the results
Digital Image Processing
Software Research
Wavelet Transform
Wavelet
DCT
Digital Image Processing
Software Research
Wavelet Transform
Digital Image Processing
Software Research
Image Compression Standards
Image File format
Image container
Image Compression Standards
Digital Image Processing
Software Research
Image Compression Standards
Binary Compression Standards
CCITT G3 -> 1D Run Length Encoding
CCITT G4 -> 2D Run Length encoding
JBIG1 -> Lossless adaptive binary compression
JBIG2 -> Lossy/Lossless adaptive binary
compression
Digital Image Processing
Software Research
JBIG/JBIG2
Digital Image Processing
Software Research
Continuous Tone Still Image Compression
Standards
JPEG
JPEG 2000
Mixed Raster Content (MRC)
Image Compression Standards
Digital Image Processing
Software Research
MRC
Digital Image Processing
Software Research
Video Compression