Download Image Compression Standards-Multimedia Applications-Lecture Slides and more Slides Multimedia Applications in PDF only on Docsity!
Lecture 20-
Image Compression Standards
(Chapter 9 )
Contents •
9.1 The JPEG Standard
- 9.1.1 Main Steps in JPEG Image
Compression
- 9.1.2 Four Commonly Used JPEG Modes – 9.1.3 A Glance at the JPEG Bitstream
9.2 The JPEG2000 Standard
9.4 Bi-level Image Compression Standards
9.5 Further Exploration
docsity.com
9.1 The JPEG Standard
mally accepted as an international standard in 1992.by the “Joint Photographic Experts Group”. JPEG was for-JPEG is an image compression standard that was developed
JPEG is a
lossy
image compression method.
It employs a
transform coding
method using the DCT (
Discrete Cosine
Transform
An image is a function of
i
and
j
(or conventionally
x
and
y
in the
spatial domain
frequency response which is a functionThe 2D DCT is used as one step in JPEG in order to yield a
F
u, v
) in the
spatial
frequency domain
, indexed by two integers
u
and
v
docsity.co
Observations for JPEG Image Compression
(cont’d)
Observation 2
Psychophysical experiments suggest that hu-
nents.frequency components than the loss of lower frequency compo-mans are much less likely to notice the loss of very high spatial
the high spatial frequency contents.the spatial redundancy can be reduced by largely reducing
Observation 3
: Visual acuity (accuracy in distinguishing closely
for color.spaced lines) is much greater for gray (“black and white”) than
chroma subsampling (4:2:0) is used in JPEG.
docsity.co
Header
DPCM
RLC
Coding
DCT
Entropy
Quantization
Data
AC DC
Quantiz.
Tables
TablesCoding
Tables
YIQ or YUV
Zag
Zig
×
f (^) ( i, j
F
u, v
Fˆ
u, v
Fig. 9.1:
Block diagram for JPEG encoder.
docsity.co
DCT on image blocks
Each image is divided into 8
×
8 blocks.
The 2D DCT is
applied to each block image
f
i, j
), with output being the
DCT coefficients
F
u, v
) for each block.
choppy (“blocky”) when a highfrom its neighboring context. This is why JPEG images lookUsing blocks, however, has the effect of isolating each block
compression ratio
is specified
by the user.
docsity.co
Quantization
F ˆ
u, v
round
F
u, v
Q
u, v
F
u, v
) represents a DCT coefficient,
Q
u, v
) is a “quantiza-
tion matrix” entry, and ˆ
F
u, v
) represents the
quantized DCT
coefficients
which JPEG will use in the succeeding entropy
coding.
quantization
step
is
the
main
source
for
loss
in
JPEG
compression
The entries of
Q
u, v
) tend to have larger values towards the lower
right corner.
This aims to introduce more loss at the higher spatial
frequencies — a practice supported by Observations 1 and 2.
Table
and
show
the
default
Q
u, v
values
obtained
from
ratio while minimizing perceptual losses in JPEG images.psychophysical studies with the goal of maximizing the compression
docsity.co
An 8
×
8 block from the Y image of ‘Lena’
f (^) ( i, j
F
u, v
Fig. 9.2:
JPEG compression for a smooth image block.
docsity.co
Fˆ
u, v
F˜
u, v
f˜ (^) ( i, j
i, j
f (^) ( i, j
f˜ (^) ( i, j
Fig. 9.2 (cont’d):
JPEG compression for a smooth image block.
docsity.co
Fˆ
u, v
F˜
u, v
f˜ 79 107 147 210 153 (^) ( i, j
i, j
f (^) ( i, j
f˜ (^) ( i, j
Fig. 9.3 (cont’d):
JPEG compression for a textured image block.
docsity.co
- Run-length Coding (RLC) on AC coefficients
RLC aims to turn the
F
u, v
) values into sets
{
#-zeros-to-
skip , next non-zero value
}
To make it most likely to hit a long run of zeros:
a
zig-zag
scan
is used to turn the 8
×
8 matrix ˆ
F
u, v
) into a
64-vector
Fig. 9.4:
Zig-Zag Scan in JPEG.
docsity.co
Entropy Coding
ing step to gain a possible further compression.The DC and AC coefficients finally undergo an entropy cod-
cient, and AMPLITUDE contains the actual value.cates how many bits are needed for representing the coeffi-is represented by (SIZE, AMPLITUDE), where SIZE indi-Using DC as an example: each DPCM-coded DC coefficient
In the example we’re using, codes 150, 5,
8 will be
turned into
often.SIZE is Huffman coded since smaller SIZEs occur much more
AMPLITUDE is not Huffman coded,
its value can
change widely so Huffman coding has no appreciable benefit.
docsity.co
Table 9.
Baseline entropy coding details — size category.
SIZE
AMPLITUDE
(Use 1’s-complement for negatives.)
So transmit/store:
{
Huffman(SIZE), Value
}
docsity.co
secutiveNow, in a length-63 zig-zag, there can be up to 3 such con-
{
}
symbols
before a final one with a RUN-
zeros. To make it simple to indicate that there areLENGTH that finishes off the actual length of the run of
no more
non-zeros
, the symbol
{
}
is reserved as an “escape” sym-
bol denoted EOB which terminates the 8
×
8 block.
5. The SIZE is as before,
except that the possible range of
quantized AC coefficients is smaller.
For samples using
N
of bits, a numerical analysis shows that the (non-fractional part
the)
DCT
AC-coefficients
made
from
these
can
be
as
much
as
N
bits.
Baseline
coding
uses
8-bit
integer
samples in [
127] so amplitudes are in [
1023].
Table above.Therefore SIZE is from 1 to 10 as in the first 10 lines of the
docsity.co
9.1.2 Four Commonly Used JPEG Modes
sumed in the discussions so far.Sequential Mode — the default JPEG mode, implicitly as-
Each graylevel image or
top-to-bottom scan.color image component is encoded in a single left-to-right,
Progressive Mode.
Hierarchical Mode.
JPEG-LS (Section 9.3).Lossless Mode — discussed in Chapter 7, to be replaced by
docsity.co