Two-Dimensional Wavelets: ECE 802 Spring 2010
Two-Dimensional Wavelets: ECE 802 Spring 2010
ECE 802
Spring 2010
Two-Dimensional Wavelets
• For image processing applications we need
wavelets that are two-dimensional.
• This problem reduces down to designing
2D filters.
• We will focus on a particular class of 2D
filters: separable filters (can be directly
designed from their 1D counterparts)
2D Scaling Functions
• The theories of multiresolution analysis and
wavelets can be generalized to higher dimensions.
• In practice the usual choice for a two-dimensional
scaling function or wavelet is a product of two
one-dimensional functions. For example,
( x, y ) ( x) ( y )
• 2D Haar wavelets:
Subspaces
• V2j is the two-dimensional subspace at scale
j.
• As j increases, we get L2(R2).
V j2 V j V j
V 2 j 1 V j2 W j2
2D wavelet decomposition
• The approximation and detail coefficients
are computed in a similar way:
Arrangement of wavelet
Decomposition of
representations
frequency support
Wavelet Decomposition:Example
LENA
LH
HL HH
Wavelet Example 2
high pass
General block diagram of the JPEG 2000 (a) encoder and (b) decoder
Wavelets in Image Coding
• Orthogonal vs. Biorthogonal:
– JPEG 2000 uses biorthogonal filters
– Lossless and lossy compression
– Cohen-Daubechies-Feavau filters 9/7
– CDF 5/3 for lossless compression (integer)
– Filters are symmetric/anti-symmetric
– Nearly orthogonal
– Symmetric extensions of the input data
Steps in JPEG2000
• Tiling: The image is split into tiles, rectangular regions of the image that are
transformed and encoded separately. Tiles can be any size. Dividing the image
into tiles is advantageous in that the decoder will need less memory to decode
the image and it can opt to decode only selected tiles to achieve a partial
decoding of the image. Using many tiles can create a blocking effect.
• Wavelet Transform: Either CDF 9/7 or CDF 5/3 biorthogonal wavelet
transform.
• Quantization: Scalar quantization
• Coding: The quantized subbands are split into precincts, rectangular regions in
the wavelet domain. They are selected in a way that the coefficients within
them across the sub-bands form approximately spatial blocks in the image
domain. Precincts are split further into code blocks. Code blocks are located in
a single sub-band and have equal sizes. The encoder has to encode the bits of
all quantized coefficients of a code block, starting with the most significant
bits and progressing to less significant bits by EBCOT scheme.
DWT for Image Compression
• Image Decomposition
LL3 HL3
– Parent HL2
LH3 HH3
– Children HL1
LH1 HH1
The scanning order of the subbands
for encoding the significance map.
DWT for Image Compression
• Differences from DCT Technique
– In conventional transform coding:
• Anomaly (edge) produces many nonzero coeff.
insignificant energy
• TC allocates too many bits to “trend”, few bits left to “anomalies”
• Problem at Very Low Bit-rate Coding : block artifacts
– DWT
• Trends & anomalies information available
• Major difficulty: fine detail coefficients associated with anomalies
the largest no. of coeff.
• Problem: how to efficiently represent position information?
Embedded Zerotree Wavelet
Compression (EZW)
• The zerotree is based on the
hypothesis that if a wavelet
coefficient at a coarse scale is
insignificant, then all wavelet
coefficients of the same orientation
in the same spatial location at finer
scales are likely to be insignificant.
– Natural images in general have
a low pass spectrum. When an
image is wavelet transformed,
the energy in the sub-bands
decreases with the scale goes
higher so the wavelet
coefficient will, on average, be
smaller in the higher levels.
EZW
1. We can set a threshold T, if the wavelet
coefficient is larger than T, then encode it
as 1, otherwise we code it as 0.
2. ‘1’ will be reconstructed as T (or a number
larger than T) and ‘0’ will be reconstructed
as 0.
3. We then decrease T to a lower value,
repeat 1 and 2. So we get finer and finer
reconstructed data.
• There are coefficients in different
subbands that represent the same
spatial location in the image depicted
by a quad tree.
• If a wavelet coefficient at a coarse scale is
insignificant with respect to a given
threshold T, i.e. |c|<T then all wavelet
coefficients of the same orientation at finer
scales are also likely to be insignificant
with respect to T.
EZW Image Coding
• Embedded Coding
– Having all lower bit rate codes of the same
image embedded at the beginning of the bit
stream
– Bits are generated in order of importance
– Encoder can terminate encoding at any point,
allowing a target rate to be met exactly
– Suitable for applications with scalability
EZW Algorithm
• First step: The DWT of the entire 2-D image will be computed by
FWT
• Second step: Progressively EZW encodes the coefficients by
decreasing the threshold
• All the coefficients are scanned in a special order
– If the coefficient is a zero tree root, it will be encoded as ZTR. All its
descendants don’t need to be encoded – they will be reconstructed as zero
at this threshold level
– If the coefficient itself is insignificant but one of its descendants is
significant, it is encoded as IZ (isolated zero).
– If the coefficient is significant then it is encoded as POS (positive) or
NEG (negative) depends on its sign.
• Third step: Arithmetic coding is used to entropy code the symbols
EZW Image Coding
• Zerotree of DWT Coefficients
– Significance map: Binary decision as to a pixel = 0 or not
– Total encoding cost = cost of encoding significance map + cost of
encoding nonzero values
– An element of zerotree:
• A coeff.: itself or some of its descendants are significant w.r.t. threshold T
• Zerotree root: An element of zerotree, & not a descendant of a zero
element at a coarser scale
• Isolated zero: Insignificant, but has some significant descendant
– Significance map can be efficiently represented as a string of four
symbols:
* Zerotree root * Isolated zero
* Positive significant coeff. * Negative significant coeff.
Set Partitioning in Hierarchical
Trees (SPIHT)
• Modify EZW.
• Order coefficients by magnitude and
transmit the most significant bits.
• Progressive transmission.
EBCOT (Embedded Block
Coding with Optimized
Truncation)
• Implements tiling, DC-level shifting, DWT, arithmetic
coding
• Compression of the image at different resolutions
Decompressed image “bike” at (a) 0.125 b/p, (b) 0.25 b/p, (c) 0.5 b/p
Spatial Scalability
• The bit stream can be decompressed at different
resolution level