Title: JPEG2000
1JPEG-2000
- The JPEG-2000 Still Image Compression Standard,
M.D. Adams - Embedded Block Coding in JPEG2000,Taubman,Ordent
lich, Ueno
By Mona Vajihollahi Roozbeh Farahbod
2Agenda
- Introduction
- JPEG-2000 Coding Engine
- Codec Structure
- Preprocessing
- Core Processing
- Bit-Stream Formation
- Representation
- Remarkable Features
- Progression
- Region of Interest Coding
- Scalability
- Error Resilience
3Introduction
- Image Compression has to
- Reduce storage and bandwidth requirements
- Allow different extraction modes
- JPEG-2000 provides
- Low bit-rate compression performance
- Progressive transmission by quality, resolution,
component, or spatial locality - Lossy and Lossless compression
- Random access to the bitstream
- Region of Interest coding
- Robustness to bit errors
4Agenda
- Introduction
- JPEG-2000 Coding Engine
- Codec Structure
- Preprocessing
- Core Processing
- Bit-Stream Formation
- Representation
- Remarkable Features
- Progression
- Region of Interest Coding
- Scalability
- Error Resilience
5Codec Structure
6Agenda
- Introduction
- JPEG-2000 Coding Engine
- Codec Structure
- Preprocessing
- Core Processing
- Bit-Stream Formation
- Representation
- Remarkable Features
- Progression
- Region of Interest Coding
- Scalability
- Error Resilience
7Preprocessing
- Source Image Model
- Reference Grid
- Image Tiling
- DC Level Shifting
- Intercomponent Transform
8Source Image Model
- One or Several Components in the image
- Components can be at different resolutions
(different sizes)
9Preprocessing
- Source Image Model
- Reference Grid
- Image Tiling
- DC Level Shifting
- Intercomponent Transform
10Reference Grid
- A rectangular gird of size Xsiz x Ysiz
- The image is aligned to the bottom-right corner
of the grid - XRsiz, YRsiz vertical and horizontal sampling
periods of each component - Size of the Image area (Xsiz-XOsiz)x(Ysiz-YOsiz)
11Preprocessing
- Source Image Model
- Reference Grid
- Image Tiling
- DC Level Shifting
- Intercomponent Transform
12Image Tiling
- Partitions image into one or more disjoint
rectangular regions (tiles) - Size of a tile XTsiz x YTsiz
- All further operations are performed on tiles
13Image Tiling (2)
- Original Image (b)-(d) after JPEG2000
compression at 0.255 bpp - Without Tiling
- With 128 x 128 Tiling
- With 64 x 64 Tiling
14Preprocessing
- Codec Structure
- Source Image Model
- Reference Grid
- Image Tiling
- DC Level Shifting
- Intercomponent Transform
15DC Level Shifting
- Input sample data should have a nominal dynamic
range centered about zero - Preprocessing
- Fixes the sample range to be centered around
zero - Postprocessing
- Undoes the effects
16Preprocessing
- Codec Structure
- Source Image Model
- Reference Grid
- Image Tiling
- DC Level Shifting
- Intercomponent Transform
17Intercomponent Transform
- Reduces the correlation between components
- Maps image data from RGB to YCrCb
- Advantages
- Improve coding efficiency
- Allow visually relevant quantization
- Two Transforms
- Irreversible color transform (ICT)
- Reversible color transform (RCT)
18Irreversible Component Transformation
19Reversible Component Transformation
- Used for Lossless or Lossy coding
- Advantages
- Reasonable Color Space
- Ability of having lossless compression
20Agenda
- Introduction
- JPEG-2000 Coding Engine
- Codec Structure
- Preprocessing
- Core Processing
- Bit-Stream Formation
- Representation
- Remarkable Features
- Progression
- Region of Interest Coding
21Core Processing
- Wavelet Transform
- Quantization/Dequantization
22Wavelet Transform
- Basic idea of 1D wavelet transform
- di0(n) Lower-band signal in level i
- di1(n) Higher-band signal in level i
23Wavelet Transform (2)
- The result of a K-Level wavelet transform on
input signal X(n) -
-
- In reverse, composition of di0(n) by di1(n)
results in d(i-1)0(n).
24Wavelet Transform (3)
- 2D wavelet transform
- 1st 1D wavelet transform to all rows
- 2nd 1D wavelet transform to all columns
- It is used for the analysis of
- different components
- into a number of decomposition levels
25Wavelet Transform (4)
- At each level the area is divided into 4
sub-bands - LLi down-sampled, low-resolution version of the
original block - HLi, LHi, HHi down-sampled residual version of
the original block
26Wavelet Transform (5)
27Wavelet Transform (6)
28Wavelet Transform (7)
- 5/3 Transform reversible
- Integer to Integer transform
- Can be used both for lossless or lossy coding
- 9/7 Transform nonreversible
- Real to Real transform
- Can only be used for lossy coding
29Quantization
- A uniform scalar quantization with dead-zone
about the origin
30Quantization (2)
- One quantization step size is allowed for each
sub-band - This operation is lossy unless for step size
equal to 1 - i.e. when reversible wavelet transform is used
- When step sizes are gt 1
- The step sizes are chosen in conjunction with
rate control - They are transferred with the code stream
31Agenda
- Introduction
- JPEG-2000 Coding Engine
- Codec Structure
- Preprocessing
- Core Processing
- Bit-Stream Formation
- Representation
- Remarkable Features
- Progression
- Region of Interest Coding
- Scalability
- Error Resilience
32Bit-Stream Formation
- Precincts and Code Blocks
- Tier-1 Coding
- Bit-Plane Coding
- Fractional Bit-Plane Scan
- MQ Coder
- Mode Variations
- Tier-2 Coding
- Packets and Layers
- Packet Header Coding
- Packet Body Coding
33Precincts and Code Blocks
- Each subband is divided into rectangular blocks
- Precinct
- 3 spatially consistent rectangle (from each
subband at each resolution level) - Code Block
- Each Precinct is partitioned into code blocks
- Each Code Block is encoded independently
Different from Zero-Tree!
34Tier-1 Coding
- Embedded Block Coding
- Every prefix of the encoded stream can be
decoded to reconstruct the original code block - Bit-plane Coding
- A technique for Embedded Block Coding
- Bit-plane
- Binary array of bits from all coefficients, at
same significance level
35Bit-Plane Coding
- Stripe-oriented scans of samples
- Membership of coding passes is
- determined dynamically
- based on the significance of 8 immediate
neighbors - Significant bit
- A 1 has been coded for that coefficient in
current or previous bitplanes
36Bit-plane Coding (2)
- Four Primitives
- Significance Coding
- The sample is not yet significant
- Sign Coding
- When the sample become significant
- Refinement
- The sample is already significant
- Run-length Coding
- When the sample and all neighbors are
insignificant - Uses a context-based arithmetic coder
37Bit-Stream Formation
- Precincts and Code Blocks
- Tier-1 Coding
- Bit-Plane Coding
- Fractional Bit-Plane Scan
- MQ Coder
- Mode Variations
- Tier-2 Coding
- Packets and Layers
- Packet Header Coding
- Packet Body Coding
38Fractional Bit-Plane Scan
- Each bit-plane is encoded in 3 passes
- Significance Propagation,
- Magnitude Refinement,
- Cleanup,
- Each coefficient bit is coded once (in one of the
three passes)
39Significance Propagation
- Includes samples that
- are currently insignificant
- have at least one significant neighbor
- Sign bit is coded after the first 1 bit
- Propagation
- Context is dependent on
- The significance of the neighbors
- The subband in which the block is
40Magnitude Refinement/Cleanup
- Magnitude Refinement
- Includes samples that became significant in a
previous pass - Context is dependent on
- the significance of the neighbors
- Whether this is the first refinement bit
- Cleanup
- Includes samples that are skipped in Pass 1 and
Pass 2 - Context is dependent on
- The significance of the neighbors
- Run-length
41Example of Bit-Plane Coding
42Bit-Stream Formation
- Precincts and Code Blocks
- Tier-1 Coding
- Bit-Plane Coding
- Fractional Bit-Plane Scan
- MQ Coder
- Mode Variations
- Tier-2 Coding
- Packets and Layers
- Packet Header Coding
- Packet Body Coding
43Binary Arithmetic Coder
- A message is represented by an interval between 0
and 1 - MPS More Probable Symbol
- LPS Less Probable Symbol
- With the probability of Qe
- An interval is represented by two real values
- A Size of the interval
- C bottom of the interval
44Binary Arithmetic Coder (2)
- After coding an MPS
- C Qe
- A - Qe
- After coding an LPS
- A Qe
- If A lt ¾, renormalize A and C
- Double the value of A and C
- Overflow of the C register is put in the encoded
stream
45Binary Arithmetic Coder (3)
46MQ Coder
- An Adaptive Binary Context-based Arithmetic Coder
- Accepts binary symbols along with their
probability estimates - Separate probability estimates are maintained for
each context - Probability estimates are updated by a
finite-state machine
47Bit-Stream Formation
- Precincts and Code Blocks
- Tier-1 Coding
- Bit-Plane Coding
- Fractional Bit-Plane Scan
- MQ Coder
- Mode Variations
- Tier-2 Coding
- Packets and Layers
- Packet Header Coding
- Packet Body Coding
48Mode Variations
- Parallel Execution of Coding Passes
- Parallel processing in each block
- Parallel processing of samples in each coding
pass - Lazy Coding
- Less Significant bits have less skewed
probability distribution - Bypassing MQ coder in First and Second pass when
p lt P-4
49Bit-Stream Formation
- Precincts and Code Blocks
- Tier-1 Coding
- Bit-Plane Coding
- Fractional Bit-Plane Scan
- MQ Coder
- Mode Variations
- Tier-2 Coding
- Packets and Layers
- Packet Header Coding
- Packet Body Coding
50Tier-2 Coding
- Input
- The set of bit-plane coding passes, generated in
Tier-1 - Operation
- Packaging the coding pass information
- Organizing the coding passes
- Output
- Packets
51Packets and Layers
- Packet
- Includes compressed bit streams from each block
in a precinct - Layer
- A collection of packets
- Final Bit-Stream
- A succession of Layers
52Packets and Layers (2)
One quality increment for the entire full
resolution tile
One quality increment for one resolution level at
one spatial location
53Packet Header Coding
- For each block in the packet body specifies
- Block inclusion information
- The number of zero bit-planes
- The number of sub-bit-planes included
- The number of bytes for storing encoded
sub-bit-planes - Packet header is encoded in an efficient
embedded manner
54Packet Header Coding (2)
55Packet Body Coding
Different number of sub-bitplanes in for each
code block
Empty Packet Bodies are allowed
56Agenda
- Introduction
- JPEG-2000 Coding Engine
- Codec Structure
- Preprocessing
- Core Processing
- Bit-Stream Formation
- Representation
- Remarkable Features
- Progression
- Region of Interest Coding
- Scalability
- Error Resilience
57Representation
- Two different level of syntax
- Code Stream
- File Format
58Code Stream
- Marker Segment
- Basic building block
- Code Stream
- A sequence of marker segments and data
59File Format
- Specifies additional information
- Color Space, Ownership,
- Box Basic building block
- File A sequence of Boxes
60File Format (2)
- JP2 file format
- Allows storing application specific data with
JPEG 2000 code stream - Specifies image properties
- Color-Space of the image
- Intellectual Property Rights
- Metadata can be accessed without decoding the
image
61Agenda
- Introduction
- JPEG-2000 Coding Engine
- Codec Structure
- Preprocessing
- Core Processing
- Bit-Stream Formation
- Representation
- Remarkable Features
- Progression
- Region of Interest Coding
- Scalability
- Error Resilience
62Progression
- Different ordering of the packets in the code
stream - 4 Types of Progression
- Resolution
- Quality
- Spatial Location
- Component
- Progression Type can be changed during coding
63Progression (2)
- Progression by Resolution
64Progression (3)
65Agenda
- Introduction
- JPEG-2000 Coding Engine
- Codec Structure
- Preprocessing
- Core Processing
- Bit-Stream Formation
- Representation
- Remarkable Features
- Progression
- Region of Interest Coding
- Scalability
- Error Resilience
66Region of Interest
- Coding different regions of the image with
different quality - Used when certain parts of the image are of
higher importance - ROI coding
- General Scaling-Based method
- MAXSHIFT method
67General Scaling-Based
- Idea
- Scale (shift) coefficients s.t. the bits
associated with ROI are in higher bit-planes - Some bits of ROI might be encoded together with
nonROI bits
68General Scaling-Based (2)
- Steps
- Wavelet Transform
- ROI Mask is derived
- Quantization
- nonROI coefficients are downscaled
- Entropy coding
- Scaling Value and ROI coordinates are included
69MAXSHIFT Method
- Scaling value S is chosen such that
- The minimum ROI coefficient is larger than the
maximum nonROI coefficient - Advantages
- Allows arbitrary shaped ROIs
- No ROI mask is needed
70Agenda
- Introduction
- JPEG-2000 Coding Engine
- Codec Structure
- Preprocessing
- Core Processing
- Bit-Stream Formation
- Representation
- Remarkable Features
- Progression
- Region of Interest Coding
- Scalability
- Error Resilience
71Scalability
- The ability to achieve coding of more than one
qualities and/or resolution simultaneously - Two important types
- SNR Scalability
- Spatial or Resolution Scalability
- Advantages
- No need to know target bit rate/resolution
- No need for multiple compressions
- Resilience to transmission errors
72SNR Scalability
- The bit stream can be decompressed at different
quality levels (SNR)
Decompressed image bike at (a) 0.125 b/p, (b)
0.25 b/p, (c) 0.5 b/p
73Spatial Scalability
- The bit stream can be decompressed at different
resolution level
74Scalability (2)
- Combination of Spatial and SNR
- Changing the progression type
75Agenda
- Introduction
- JPEG-2000 Coding Engine
- Codec Structure
- Preprocessing
- Core Processing
- Bit-Stream Formation
- Representation
- Remarkable Features
- Progression
- Region of Interest Coding
- Scalability
- Error Resilience
76Error Resilience
- Desirable in mobile and Internet applications
- Tools for Error Resilience
77JPEG-2000 V.S. JPEG
(a)
(b)
Compression at 0.25 b/p by means of (a) JPEG (b)
JPEG-2000
78JPEG-2000 V.S. JPEG
(a)
(b)
Compression at 0.2 b/p by means of (a) JPEG (b)
JPEG-2000
79References
- M.D. Adams, The JPEG-2000 Still Image
Compression Standard, ISO/IEC JTC1/SC29/WG1
(ITU-T SG8), 2001 - D. Taubman, E. Ordentlcih, I. Ueno, Embedded
Block Coding, Proc. Int. Conf. on Image
Processing (ICIP '2000), Vol. II, 33-36, 2000 - M.W. Marcellin, M.J. Gormish, A. Bilgin, M.P.
Boliek, An Overview of JPEG-2000, Proc. Of IEEE
Data Compression Conference, pp. 523-541, 2000 - A. Skodras, C. Christopulos, T. Ebrahimi, The
JPEG 2000 Still Image Compression Standard, IEEE
Signal Processing Magazine, pp. 36-60, September
2001 - D.S. Taubman, and M.W. Marcellin, "Jpeg2000
Image Compression Fundamentals, Standards, and
Practice", Kluwer Academic Pulishers, 2001. - G. Cena, P. Montuschi, L. Ciminiera, A. Sanna, A
Q-Coder Algorithm with Carry Free Addition,
Proc. 13th IEEE Symposium on Computer Arithmetic,
pp. 282-290, July 1997 - S.Y. Choo, G. Chew, JPEG 2000 and Wavelet
Compression, - http//www-ise.stanford.edu/class/psych221/00/shu
oyen/