Professional Documents
Culture Documents
2
Applications
1. Internet,
2. Businesses,
3. Multimedia,
4. Satellite imaging,
5. Medical imaging
3
Image Compression
• The goal of image compression is to reduce the amount
of data required to represent a digital image.
Compression algorithm development starts with appl
ications to two-dimensional (2-D) still images eg JP
EG
5
The reduced file created by the compression proces
s is called the compressed file and is used to recons
truct the image, resulting in the decompressed imag
e
The original image, before any compression is perfo
rmed, is called the uncompressed image file
The ratio of the original, uncompressed image file an
d the compressed file is referred to as the compressi
on ratio
6
Image Compression (cont’d)
• Lossless
– Information preserving
– Low compression ratios(2:1 to 3:1 compression ratios)
• Lossy
– Not information preserving
– High compression ratios(10:1 to 50:1 and retain high quality, and 10
0 to 200 times for lower quality, but acceptable, images)
compression
Compression ratio:
Relevant Data Redundancy
Example:
The compression ratio is denoted by:
11
Types of Data Redundancy
Expected value: E
()
Xx
P(X
x)
x
Coding Redundancy
• Case 1: l(rk) = constant length
Example:
Coding Redundancy (cont’d)
• Case 2: l(rk) = variable length
variable length
Example:
threshold
original
11 ……………0000……………………..11…..000…..
thresholded
(1+10) bits/pair
Psychovisual redundancy
units of information!
using
units/pixel
Entropy:
(e.g., bits/pixel)
Redundancy - revisited
• Redundancy:
where:
• How close is to ?
• Criteria
– Subjective: based on human observers
– Objective: mathematically defined criteria
Subjective Fidelity Criteria
Objective Fidelity Criteria
• Backward Pass
Assign code symbols going backwards
Huffman Coding (cont’d)
• Lavg assuming Huffman coding:
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.8
0.4
[0.06752, 0.0688)
0.2
or
0.068
(must be inside sub-interval)
Example (cont’d)
Decode 0.572
α3
(code length=4)
0.4 0.56 0.624 0.5728 0.56896
α2
0.2 0.48 0.592 0.5664 0.56768
α3 α3 α1 α2 α4
α1
0.0 0.4
0.56 0.56 0.5664
LZW Coding
(addresses interpixel redundancy)
• Requires no prior knowledge of symbol probabilities.
Initial Dictionary
Consider a 4x4, 8 bit image Dictionary Location Entry
39 39 126 126 0 0
39 39 126 126 1 1
. .
39 39 126 126 255 255
39 39 126 126 256 -
511 -
LZW Coding (cont’d)
As the encoder examines image pixels, gray level sequences (i
.e., blocks) that are not in the dictionary are assigned to a ne
w entry.
39 39 126 126
39 39 126 126
39 39 126 126
Dictionary Location Entry
39 39 126 126
0
1
0
1
- Is 39 in the dictionary……..Yes
. . - What about 39-39………….No
255 255
256 -
39-39
* Add 39-39 at location 256
511 -
Example
39 39 126 126 Concatenated Sequence: CS = CR + P
39 39 126 126
(CR) (P)
39 39 126 126
39 39 126 126
CR = empty
repeat
P=next pixel
CS=CR + P
If CS is found:
(1) No Output
(2) CR=CS
else:
(1) Output D(CR)
(2) Add CS to D
(3) CR=P
Decoding LZW
e.g., (0,1)(1,1)(0,1)(1,0)(0,2)(1,4)(0,2)
Bit-plane coding
(addresses interpixel redundancy)
• Process each bit plane individually.
~ (N/n)2 subimages
Example: Fourier Transform
K << N
K-1 K-1
Transform Selection
Forward:
Inverse:
if u=0 if v=0
if u>0 if v>0
DCT (cont’d)
Reconstructed images
by truncating
50% of the
coefficients
More compact
transformation
Reconstructions
DFT
has n-point periodicity
DCT
has 2n-point periodicity
JPEG Compression
Entropy
encoder
Accepted
as an inter
national i
mage com
pression st
andard in
1992.
Entropy
decoder
JPEG - Steps
Quantization
JPEG Steps (cont’d)
6. Encode coefficients:
symbol_1 symbol_2
(SIZE) (AMPLITUDE)
predictive
coding:
Intermediate Symbol Sequence – AC coeff
# bits
• FBI’s target bit rate is around 0.75 bits per pixel (bpp)
• Target bit rate can set via a parameter, similar to the "
quality" parameter in JPEG.
More Methods …