still image compression c5
TRANSCRIPT
-
8/3/2019 Still Image Compression C5
1/46
Still Image CompressionStandards
Michael W. Hoffman and KhalidSayood
Presented by:Jafar Ajdari
-
8/3/2019 Still Image Compression C5
2/46
Content5.1 Introduction
5.2 Lossy compression5.2.1 JPEG5.2.1.1 DCT-Bsed Image Compression
5.2.1.2 Progressive Transmission5.2.1.3 General Syntax and Data Ordering5.2.1.3 Entropy Coding
5.2.2 JPEG20005.3 lossless Compression5.3.1 JPEG5.3.2 JPEG-LS
5.4 Bilevel Image Compression5.4.1 JBIG5.4.2 JBIG2
-
8/3/2019 Still Image Compression C5
3/46
Definitions of some key terms
DCT: Discrete Cosine Transform.JPEG: Joint Photographic Expert Group.JPEG200: the current standard that
emphasizes lossy compression of images.JPEG-LS: An upcoming standard that
focuses on lossless and near-losslesscompression of still imagesJBIG: Joint Bilevel Image Group.
Wavelets: A time-scale decomposition thatallow very efficient energy compaction in
images.
-
8/3/2019 Still Image Compression C5
4/46
INTRODUCTION
What is image compression?
Image data can be compressed withoutsignificant degradation of the visual
(perceptual) quality b/c image contain ahigh degree of: Spatial redundancy Spectral redundancyPsycho-visual
redundancy
-
8/3/2019 Still Image Compression C5
5/46
Why Standardization?Compression is one of the technologiesthat enable the multimedia revolution to
occur.However for technology to be effective
there has to be some degree ofstandardization so that the equipment
designed by different vendors can talkto each other.
-
8/3/2019 Still Image Compression C5
6/46
Type of still image compression
standards:
(JPEG) Joint Photographic Experts Groupa- Lossy copression of still imagesb- Lossless compression of still images
(JBIG) Joint Bilevel Image Group (GIF) Graphics Interchange Format. de
facto (PNG) Portable Network Graphics. De facto
-
8/3/2019 Still Image Compression C5
7/46
Compression scheme
In any compression scheme there are:
Step 1- Removal of redundancy based on
implicit assumption about the structure inthe data
Step 2- Assignment of binary codewords tothe information deemed nonredundant.
-
8/3/2019 Still Image Compression C5
8/46
Typical Image Compression
System
Transformer Quantizer Coder
InputImageRaw
ImageData
Image Representation that isMore amenable to compression
Symbuls
Binary
BitStream
-
8/3/2019 Still Image Compression C5
9/46
Transformer
Applies a one-to-one transformation to the
input image data.Output of the transformer is an image
representation which is more amenable toefficient compression than the raw imagedata.
-
8/3/2019 Still Image Compression C5
10/46
Quantizer
Generates a limited number of symbols
that can be used in the representation ofthe compressed image.
Quantization is a many-to-one mappingwhich is irreversible.
-
8/3/2019 Still Image Compression C5
11/46
Coder
Coder assigns a cod word, a binary bit
stream , to each symbol at the output ofQuantization.
The coder may employ a Fixed-Lengthor Variable-Length codes. VLC, alsoknown as Entropy Coding, assigns a
codeword in such a way as to minimizethe average length of the binaryrepresentation of the symbols.
-
8/3/2019 Still Image Compression C5
12/46
Lossy Compression System
Lossy CS, which aim at
obtaining the best possiblefidelity for a given bit-rate (or
minimizing the bit-rate toachieve a given fidelity
measure).
-
8/3/2019 Still Image Compression C5
13/46
Lossless Compression System
Lossless CS which aim at minimizing the
bit rate of the compressed output withoutany distortion of the image
The decompressed bit-stream is identicalto original bit-stream.
-
8/3/2019 Still Image Compression C5
14/46
Basic Units of Encoder
PicturePreparation
PictureProcessing
Quantization EntropyCoding
UncompressedPicture
Phase I Phase II Phase III Phase IV
CompressedPicture
-
8/3/2019 Still Image Compression C5
15/46
JPEG Standard
JPEG refers to a wide variety of possible image
compression approaches that have beencollected to a single standard that include:1- Lossy component
2- Losless component3- Entropy coding
a- Huffman codingb- Binary arithmetic coding
-
8/3/2019 Still Image Compression C5
16/46
Huffman Coding
Huffman coding is based on the frequency of theoccurrence of a character (or a octet in the caseof images).The principle is to use lower number of bits toencode the character that occurs more
frequently. The codes are stored in a codebook.The codebook maybe constructed for everyimage or for a set of images.
Example: Character: a b c d e Frequency: 15 3 2 718 Cod: 1100 0101011 0010011 01000 1011
-
8/3/2019 Still Image Compression C5
17/46
General JPEG encoder models
EncoderModel
EncoderStatistical
Model
Entropy
Encoder
SourceImageData
Model
Tables EntropyCodingTables
Descriptores Symbols
JPEG Entropy Coder
Comp-ressedImageData
-
8/3/2019 Still Image Compression C5
18/46
JPEG Lossy Compression
Entropy
Decoder
Decoder
StatisticalModels
DecoderModels
Com-PresedImageData Symbols Descriptors
Recons-tructedImageData
JPEG Entropy Decoder Entropy
CodingTables
ModelTables
-
8/3/2019 Still Image Compression C5
19/46
JPEG Modes of Operation
Nonhierarchical Hierarchical
SequentialLossless
DCT-basedLossy
Sequential Progressive
-allows progressive coding withwith increasing resolution
-allows combinations ofnonhierarchical modes
-allows coding of differenceimages (differential encoding)- Allow multiple frames per image
Spectral SelectionSuccessive ApproximationMixtures
-
8/3/2019 Still Image Compression C5
20/46
DCT- Based Image Compression
The basis for JPEGs lossy compression is
two-dimensional DCT.The image is broken into 8 x 8 blocks onwhich the transform is computed.
Image compression is obtained throughquantization of these DCT coefficients to a
small set of values.Values are entropy coded and stored as acompressed version of the image.
-
8/3/2019 Still Image Compression C5
21/46
An example of quantization table
for the luminance DCT coefficients
9910310011298959272
10112012110387786449
921131048164553524 771031096856372218
62808751292217145669574024161314
55605826191412126151402416101116
DCHorizontal Frequency
V
erticalFrequency
-
8/3/2019 Still Image Compression C5
22/46
Zigzag Scan Order for 8 x 8 DCT
CoefficientsHorizontal frequency
VerticalFrequency
Fig. 5.5
-
8/3/2019 Still Image Compression C5
23/46
Sequential Transmision /
Progressive TransmissionIn sequential transmision, the entire image
is compressed using 8x8 blocks, scaningthe image from left to right and top tobottom.The full precision-compressedrepresentation is provided as the image is
decoded and reconstructed block by block.
-
8/3/2019 Still Image Compression C5
24/46
Syntax for nonhierarchical JPEG
dataSOI maker Frame EOI maker
(tables, etc.) Frame header Scan 1 {DNL seg.} Scan 2 {Scan last}
(tables, etc.) scan header {ECS 0 RST 0 ECS n-1 RST n-1} ECS n
Compressed image
frame
scan
Entropy coded segment 0SOI: start of image makerEOI: end of image makerDNL: define number of linesMCU: minimum coded unit
{ } indicate optional entry
Fig. 5.6
-
8/3/2019 Still Image Compression C5
25/46
General Syntax and Data Ordering
Fig. 5.6 illustrates the general syntax for
JPEG
-
8/3/2019 Still Image Compression C5
26/46
Why JPEG is a common standard?
JPEG allows multiple components for images.Example color image.
It allows multiple components of a image to beinterleaved or noninterleaved.
JPEG defines sampling factors for the horizontaland vertical dimensions of each scancomponent.
Individual portion of a image with multiplecomponents can be reconstructed with minimumbuffering. Fig. 5.7
-
8/3/2019 Still Image Compression C5
27/46
The element specified in JPEG S
A encoder
A decoder A interchange format
-
8/3/2019 Still Image Compression C5
28/46
Order for data interleaving in a
single scan0 10
1
2
3
4
5
2 30
1
2
3
4
5
0 1 2 30 1
0
1
0 1
0
1
Cs1: H1=2, V1=3 Cs2: H2=1, V2=3
Cs3: H3=2, V3=1 Cs4: H4=1, V4=1
MCU1: d1(00,01,10,11,20,21) d2(00,10,20) d3(00,01) d4(00)
MCU2: d1(02,03,12,13,22,23) d2(01,11,21) d3(02,03) d4(01)MCU3: d1(30,31,40,41,50,51) d2(30,40,50) d3(10,11) d4(10)MCU4: d1(32,33,42,43,52,53) d2(31,41,51) d3(12,13) d4(11)
Where d1 data is from Cs1, d2 data is from Cs2, etc.
-
8/3/2019 Still Image Compression C5
29/46
Entropy Coding
Either binary arrhythmic coding or
Huffman can be used with JPEG. In Huffman coding two separate are used
for coding the DC and AC coefficients. For DC coefficients the difference betweenthe current DC value and that of previousDC value for that same component isencoded.
-
8/3/2019 Still Image Compression C5
30/46
Huffman coding, extra bits and possibledifferences for DC coefficients
Fig. 5.8
-
8/3/2019 Still Image Compression C5
31/46
JPEG 2000 improved the following
deficiencies Poor subjective performance at rates below 0.25
bits per pixel (bpp) Lack of ability to provide lossy and lossless
compression in the same codestream
Lack of robustness to bit errors in thecompressed image Poor performance with computer-generated
imagery Poor performance with compound documents
(text and image)
-
8/3/2019 Still Image Compression C5
32/46
Pixel values reflected across the
left boundary of an image
7 9 8 8 9 7 8 69 4 6 6 4 9 5
Fig. 5.9
-
8/3/2019 Still Image Compression C5
33/46
Subband decomposition of an
N x M image
LL
H1
2
2
H0H0
H1
H0
H1
2
2
2
2
LH
HL
HH
M
N
X
M/2 NM/2
N/2
a0
a1
Fig. 5.10
-
8/3/2019 Still Image Compression C5
34/46
First level decomposition
HHHL
LHLLM/2 M/2
N/2
N/2
Fig. 5.11
-
8/3/2019 Still Image Compression C5
35/46
Subband structures in the
verification model
Fig. 5.12
-
8/3/2019 Still Image Compression C5
36/46
7 predictors of Lossless JPEG (i, j) = I (i-1, j) (1)2 (i, j) = I (i, j-1) (2)
3 (i, j) = I (i-1, j-1) (3) (i, j) = I (i, j-1) + I(i-1, j) - I (i-1, j-1) (4) (i, j) = I (i, j-1) + (I (i-1, j) I (i-1, j-1))/2 (5) (i, j) = I (i-1, j) + (I (i, j-1) I (i-1, j-1))/2 (6) (i, j) = (I (i, j-1) + (I (i-1, j))/2 (7)
Here I (i, j) is the (i, j)th pixel of the original image, and (i, j) is the predicted valuefor the (i, j)th pixel.
-
8/3/2019 Still Image Compression C5
37/46
JPEG-LS
JPEG-LS provides lossless and near lossless
modes of operation The near lossless mode allow users to specify abound (referred to as NEAR) on the error
introduced by the compression algorithm. JPEG-LS exploits local structure and repetitive
context within images to achieve efficientlossless and near lossless compression.
-
8/3/2019 Still Image Compression C5
38/46
Bilevel Image compression
ITU-T Recommendation T.82 also
ISO/IEC 11544, popularly known as JBIGstandard, and its update release in finalcommittee draft in Des 1999, which isknown as JBIG2
-
8/3/2019 Still Image Compression C5
39/46
JBIG Image Compression S
JBIG (Joint Bi-level Image Group) is an
advanced compression scheme utilizinglossless, predictive methods.
the JBIG compression algorithm is definedby ISO/IEC S 11544:1999. It defines thecompression scheme not the file format.
-
8/3/2019 Still Image Compression C5
40/46
The main characteristic of JBIG
Compatible progressive/sequential coding.
This means progressively coded imagecan be decoded sequentially and the otherway around
JBIG will be a lossless image compressionS: all bits in the image before and after the
compression and decompression will beexactly the same.
-
8/3/2019 Still Image Compression C5
41/46
JBIG resolution reduction and
coding
OriginalImage Layer 1
Lowest
Resol-UsionImage
Resolusion Reduction
Encoding
Fig. 5.16
-
8/3/2019 Still Image Compression C5
42/46
Pictorial representation of Higher
and Lower Resolution Layer10 11
9 X
8 7 6
5 4 3
2 1 0
Fig. 5.16
L RLayer
H RLayer
-
8/3/2019 Still Image Compression C5
43/46
0
2 3
1 0 1
2 3
5 6
7 8 9
10 11 12
The 4 different orientation
of HR pixels with respect toLR pixels referred as phaseof HR image.
Numbering scheme used for DP.
Fig. 5.18 and fig. 5.19
-
8/3/2019 Still Image Compression C5
44/46
Construction of Index for DP for
Different Orientation
Phase0123
Pixel to be
Predicted89
1112
Pixels used to construct
Index into DP Table0, 1, 2, 3, 4, 5, 6, 70, 1, 2, 3, 4, 5, 6, 7, 8
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 100, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
Number of Hits (Using Defa-
ult Resolution Reduction 20108
5261044
Table 5.1
-
8/3/2019 Still Image Compression C5
45/46
JBIG2
The JBIG2 S provides a highly effective
method for lossless compression of ageneric bilevel image JBIG2 is the improved version of JBIG
The JBIG2 takes advantage of theproperties of the source material.
It gives the user option of using lossycompression, which increase the amountof compression that can be obtained.
-
8/3/2019 Still Image Compression C5
46/46
Conclusion
Questions