Upload
miles-golden
View
217
Download
2
Embed Size (px)
Citation preview
Introduction to Wavelet Transform
Time Series are UbiquitousTime Series are Ubiquitous!
A random sample of 4,000 graphics from 15 of the world’s newspapers published from 1974 to 1989 found that more than 75% of all graphics were time series (Tufte, 1983).
Why is Working With Time Series so Why is Working With Time Series so Difficult? Difficult?
The definition of similarity depends on the user, the domain and the task at hand. We need to be able to handle this subjectivity.
Answer:Answer: We are dealing with subjective notions of We are dealing with subjective notions of similarity. similarity.
Wavelet Transform - OverviewHistory
• Fourier (1807)
• Haar (1910)
• Math World
{ }i i i ii
f t / 2 2
22
nm
mn m
tt
Wavelet Transform - Overview
• What kind of Could be useful?– Impulse Function (Haar): Best time resolution
– Sinusoids (Fourier): Best frequency resolution
– We want both of the best resolutions
t
t
• Heisenberg (1930)– Uncertainty Principle
• There is a lower bound for
(An intuitive prove in [Mac91])
t
Wavelet Transform - Overview
• Gabor (1945)– Short Time Fourier Transform (STFT)
• Disadvantage: Fixed window size
Wavelet Transform - Overview
• Constructing Wavelets– Daubechies (1988)
• Compactly Supported Wavelets
• Computation of WT Coefficients– Mallat (1989)
• A fast algorithm using filter banks
1Aw( )ah k
( )dh k
2
2
( )ag k
( )dg k
2
2
S1Dw
S
Jean Fourier
1768-1830
0 20 40 60 80 100 120 140
0
1
2
3
X
X'
4
5
6
7
8
9
Discrete Fourier Discrete Fourier Transform ITransform I
Excellent free Fourier Primer
Hagit Shatkay, The Fourier Transform - a Primer'', Technical Report CS-95-37, Department of Computer Science, Brown University, 1995.
http://www.ncbi.nlm.nih.gov/CBBresearch/Postdocs/Shatkay/
Basic Idea: Represent the time series as a linear combination of sines and cosines, but keep only the first n/2 coefficients.
Why n/2 coefficients? Because each sine wave requires 2 numbers, for the phase (w) and amplitude (A,B).
n
kkkkk twBtwAtC
1
))2sin()2cos(()(
Discrete Fourier Discrete Fourier Transform IITransform II Pros and Cons of DFT as a time series Pros and Cons of DFT as a time series
representation.representation.
• Good ability to compress most natural signals.• Fast, off the shelf DFT algorithms exist. O(nlog(n)).• (Weakly) able to support time warped queries.
• Difficult to deal with sequences of different lengths.• Cannot support weighted distance measures.
0 20 40 60 80 100 120 140
0
1
2
3
X
X'
4
5
6
7
8
9
Note: The related transform DCT, uses only cosine basis functions. It does not seem to offer
any particular advantages over DFT.
History…
In late forties, stalwarts like John vonNeumann, Dennis Gabor, Leon BrillouxEugen Wigner addressed the shortcomingsof Fourier analysis and advocated for awindowed Fourier transform. In 1946[Theory of Communication J. IEEE93(1946), 429-457] introduced the conceptshort-time Fourier transform now known asWiondowed Fourier Transform or GaborTransform; for current development seeMallat [Wavelet Tour of Signal Process,Academic Press 1998]. The computationalproblems were realized by Gabor himselfand his coworkers von Neumann et al.
0 20 40 60 80 100 120 140
Haar 0
Haar 1
Haar 2
Haar 3
Haar 4
Haar 5
Haar 6
Haar 7
X
X'
DWT
Discrete Wavelet Discrete Wavelet Transform ITransform I
Alfred Haar
1885-1933
Excellent free Wavelets Primer
Stollnitz, E., DeRose, T., & Salesin, D. (1995). Wavelets for computer graphics A primer: IEEE Computer Graphics and Applications.
Basic Idea: Represent the time series as a linear combination of Wavelet basis functions, but keep only the first N coefficients.
Although there are many different types of wavelets, researchers in time series mining/indexing generally use Haar wavelets.
Haar wavelets seem to be as powerful as the other wavelets for most problems and are very easy to code.
22( ) (1 2 ) tt t e is a wavelet as it is thesecond derivative of the Gaussian
2 /2xe with minus sign. It is known as theMexican Hat Wavelet.
Figure: Mexican Hat Wavelet
1
0 4¡ 4
Wavelet Series
0 20 40 60 80 100 120 140
Haar 0
Haar 1
Haar 2
Haar 3
Haar 4
Haar 5
Haar 6
Haar 7
X
X'
DWT
Discrete Wavelet Discrete Wavelet Transform IIITransform III
Pros and Cons of Wavelets as a time series Pros and Cons of Wavelets as a time series representation.representation.
• Good ability to compress stationary signals.• Fast linear time algorithms for DWT exist.• Able to support some interesting non-Euclidean similarity measures.
• Signals must have a length n = 2some_integer • Works best if N is = 2some_integer. Otherwise wavelets approximate the left side of signal at the expense of the right side.• Cannot support weighted distance measures.
0 20 40 60 80 100 120 140
X
X'
eigenwave 0
eigenwave 1
eigenwave 2
eigenwave 3
eigenwave 4
eigenwave 5
eigenwave 6
eigenwave 7
SVD
Singular Value Singular Value Decomposition IDecomposition I
Eugenio Beltrami
1835-1899
Camille Jordan (1838--1921)
James Joseph Sylvester 1814-1897
Basic Idea: Represent the time series as a linear combination of eigenwaves but keep only the first N coefficients.
SVD is similar to Fourier and Wavelet approaches, we represent the data in terms of a linear combination of shapes (in this case eigenwaves).
SVD differs in that the eigenwaves are data dependent.
SVD has been successfully used in the text processing community (where it is known as Latent Symantec Indexing ) for many years.
Good free SVD Primer
Singular Value Decomposition - A Primer. Sonia Leach
0 20 40 60 80 100 120 140
X
X'
eigenwave 0
eigenwave 1
eigenwave 2
eigenwave 3
eigenwave 4
eigenwave 5
eigenwave 6
eigenwave 7
SVD
Singular Value Singular Value Decomposition IIDecomposition II
How do we create the eigenwaves?
We have previously seen that we can regard time series as points in high dimensional space.
We can rotate the axes such that axis 1 is aligned with the direction of maximum variance, axis 2 is aligned with the direction of maximum variance orthogonal to axis 1 etc.
Since the first few eigenwaves contain most of the variance of the signal, the rest can be truncated with little loss.
TVUA This process can be achieved by factoring a M by n matrix of time series into 3 other matrices, and truncating the new matrices at size N.
0 20 40 60 80 100 120 140
X
X'
eigenwave 0
eigenwave 1
eigenwave 2
eigenwave 3
eigenwave 4
eigenwave 5
eigenwave 6
eigenwave 7
SVD
Singular Value Singular Value Decomposition IIIDecomposition III
Pros and Cons of SVD as a time series Pros and Cons of SVD as a time series representation.representation.
• Optimal linear dimensionality reduction technique .• The eigenvalues tell us something about the underlying structure of the data.
• Computationally very expensive.• Time: O(Mn2)• Space: O(Mn)
• An insertion into the database requires recomputing the SVD.• Cannot support weighted distance measures or non Euclidean measures.
Note: There has been some promising research into mitigating SVDs time and space complexity.
0 20 40 60 80 100 120 140
X
X'
Piecewise Linear Piecewise Linear Approximation IApproximation I
Basic Idea: Represent the time series as a sequence of straight lines.
Lines could be connected, in which case we are allowedN/2 lines
If lines are disconnected, we are allowed only N/3 lines
Personal experience on dozens of datasets suggest disconnected is better. Also only disconnected allows a lower bounding Euclidean approximation
Each line segment has • length • left_height (right_height can be inferred by looking at the next segment)
Each line segment has • length • left_height • right_height
Karl Friedrich Gauss
1777 - 1855
Problem with Fourier
A serious drawback in transforming to the frequencydomain, time information is lost. When looking at a Fouriertransform of a signal, it is impossible to tell when aparticular event took place.
Fourier analysis -- breaks down a signal into constituentsinusoids of different frequencies.
Function Representations
• sequence of samples (time domain)– finite difference method
• pyramid (hierarchical)• polynomial• sinusoids of various frequency (frequency domain)
– Fourier series
• piecewise polynomials (finite support)– finite element method, splines
• wavelet (hierarchical, finite support)– (time/frequency domain)
What Are Wavelets?
In general, a family of representations using:
• hierarchical (nested) basis functions
• finite (“compact”) support
• basis functions often orthogonal
• fast transforms, often linear-time
Function Representations –Desirable Properties
• generality – approximate anything well– discontinuities, nonperiodicity, ...
• adaptable to application– audio, pictures, flow field, terrain data, ...
• compact – approximate function with few coefficients– facilitates compression, storage, transmission
• fast to compute with– differential/integral operators are sparse in this basis– Convert n-sample function to representation in O(nlogn) or O(n)
time
Wavelet History, Part 1• 1805 Fourier analysis developed
• 1965 Fast Fourier Transform (FFT) algorithm
…
• 1980’s beginnings of wavelets in physics, vision, speech processing (ad hoc)
• … little theory … why/when do wavelets work?
• 1986 Mallat unified the above work
• 1985 Morlet & Grossman continuous wavelet transform … asking: how can you get perfect reconstruction without redundancy?
Wavelet History, Part 2
• 1985 Meyer tried to prove that no orthogonal wavelet other than Haar exists, found one by trial and error!
• 1987 Mallat developed multiresolution theory, DWT, wavelet construction techniques (but still noncompact)
• 1988 Daubechies added theory: found compact, orthogonal wavelets with arbitrary number of vanishing moments!
• 1990’s: wavelets took off, attracting both theoreticians and engineers
Time-Frequency Analysis
• For many applications, you want to analyze a function in both time and frequency
• Analogous to a musical score
• Fourier transforms give you frequency information, smearing time.
• Samples of a function give you temporal information, smearing frequency.
• Note: substitute “space” for “time” for pictures.
Comparison to Fourier Analysis• Fourier analysis
– Basis is global– Sinusoids with frequencies in arithmetic progression
• Short-time Fourier Transform (& Gabor filters)– Basis is local– Sinusoid times Gaussian– Fixed-width Gaussian “window”
• Wavelet– Basis is local– Frequencies in geometric progression– Basis has constant shape independent of scale
Wavelets are faster than ffts!
Fast Fourier Transform (FFT) (1966)Highly cited work: Cooley-TukeyComputation hazard: O[N log N)Fast Wavelet Transform:Computational Hazard: O(N).For details, see Mallat [Signal Poc. Book,Academic Press, 1998] or Neunzert andSiddiqi [Topics in Industrial Math – KluwerAcademic Publishers, 2000].
The results of the CWT are many wavelet coefficients, which are a function of scale and position
Gabor’s Proposal: Short Time Fourier Transform
Requirements:
Signal in time domain: require short time window to depict features of signal.
Signal in frequency domain: require short frequency window (long time window) to depict features of signal.
''2'' )]()([),( dtettgtxftSTFT ftjx
What are wavelets?What are wavelets?
Wavelets are functions defined over a finite interval and having an average value of zero.
Haar wavelet
What is wavelet transform?What is wavelet transform?
The basic idea of the wavelet transform is to represent any arbitrary function ƒ(t) as a superposition of a set of such wavelets or basis functions.
These basis functions or baby wavelets are obtained from a single prototype wavelet called the mother wavelet, by dilations or contractions (scaling) and translations (shifts).
The wavelet transform is a tool for carving up functions, operators, or data into components of different frequency, allowing one to study each component separately.
The continuous wavelet transform (CWT)The continuous wavelet transform (CWT)
Fourier Transform
dtetfF tj
)()(
FT is the sum over all the time of signal f(t) multiplied by a complex exponential.
dtttfs s )()(),( *,
where * denotes complex conjugation. This equation shows how a function ƒ(t) is decomposed into a set of basis functions , called the wavelets. Z=r+iy, z*=r-iy
)(, ts
The variables s and are the new dimensions, scale and translation (position), after the wavelet transform.
Similarly, the Continuous Wavelet Transform (CWT) is defined as the sum over all time of the signal multiplied by scale , shifted version of the wavelet function :)(, ts
The wavelets are generated from a single basic wavelet , the so-called mother wavelet, by scaling and translation:
)(t
s
t
sts
1
)(,
s is the scale factor, is the translation factor and the factor s-1/2 is for energy normalization across the different scales.
It is important to note that in the above transforms the wavelet basis functions are not specified.
This is a difference between the wavelet transform and the Fourier transform, or other transforms.
Scale
Scaling a wavelet simply means stretching (or compressing) it.
Translation (shift)
Translating a wavelet simply means delaying (or hastening) its onset.
Scale and Frequency
Low scale a Compressed wavelet Rapidly changing details
High frequency
High scale a stretched wavelet slowly changing details
low frequency
Haar wavelet
Discrete WaveletsDiscrete Wavelets
Discrete wavelet is written as
j
j
jkj s
skt
st
0
00
0
,
1)(
j and k are integers and s0 > 1 is a fixed dilation step. The translation factor depends on the dilation step. The effect of discretizing the wavelet is that the time-scale space is now sampled at discrete intervals. We usually choose s0 = 2
0
1)()( *
,, dttt nmkj If j=m and k=n
others
A band-pass filterA band-pass filter
The wavelet has a band-pass like spectrum
From Fourier theory we know that compression in time is equivalent to stretching the spectrum and shifting it upwards:
aF
aatfF
1)(
This means that a time compression of the wavelet by a factor of 2 will stretch the frequency spectrum of the wavelet by a factor of 2 and also shift all frequency components up by a factor of 2.
Suppose a=2
Subband codingSubband coding
If we regard the wavelet transform as a filter bank, then we can consider wavelet transforming a signal as passing the signal through this filter bank.
The outputs of the different filter stages are the wavelet- and scaling function transform coefficients.
That is called subband coding.
In general we will refer to this kind of analysis as a multiresolution.
Splitting the signal spectrum with an iterated filter bank.
f8B
fHPLP 4B 4B
fHPLP 4B
2B2B
Bf
HPLP 4B2B
B
Summarizing, if we implement the wavelet transform as an iterated filter bank, we do not have to specify the wavelets explicitly! This is a remarkable result.
The Discrete Wavelet TransformThe Discrete Wavelet Transform
Calculating wavelet coefficients at every possible scale is a fair amount of work, and it generates an awful lot of data. What if we choose only a subset of scales and positions at which to make our calculations?
It turns out, rather remarkably, that if we choose scales and positions based on powers of two -- so-called dyadic scales and positions -- then our analysis will be much more efficient and just as accurate. We obtain just such an analysis from the discrete wavelet transform (DWT).
Approximations and Details
The approximations are the high-scale, low-frequencycomponents of the signal. The details are the low-scale,high-frequency components. The filtering process, at itsmost basic level, looks like this:
The original signal, S, passes through two complementary filtersand emerges as two signals .
Downsampling
To correct this problem, we introduce the notion ofdownsampling. This simply means throwing away everysecond data point.
Unfortunately, if we actually perform this operation on areal digital signal, we wind up with twice as much data aswe started with. Suppose, for instance, that the originalsignal S consists of 1000 samples of data. Then theapproximation and the detail will each have 1000 samples,for a total of 2000.
An example:
Reconstructing Approximation and Details
Upsampling
Wavelet Decomposition
Multiple-Level Decomposition
The decomposition process can be iterated, with successive approximations being decomposed in turn, so that one signal is broken down into many lower-resolution components. This is called the wavelet decomposition tree.
Scaling function (two-scale relation)
)2()()2( 11 ktkht j
kj
j
Wavelet )2()()2( 11 ktkgt j
kj
j
The signal f(t) can be expresses as
)2()()2()()( 11
11 ktkktktf j
kj
j
kj
)()2()(1 mkmhk jm
j
)()2()(1 mkmgk jm
j
DWT
)()2()(1 mkmhk jm
j
)()2()(1 mkmgk jm
j
)()()(])2([)(1 kkhmmkhk jjm
j
)()()(])2([)(1 kkgmmkgk jjm
j
12
3
2
1
2
5
2
1)1()1()0()0()()()0( 11
1
012
jj
mjj hhmmh
42
3
2
1
2
5
2
1)1()1()0()0()()()0( 11
2
012
jj
mjj ggmmg
Wavelet Reconstruction (Synthesis)
Perfect reconstruction :
1'' HHGG
)()1()(
)()1()(1'
1'
ngnh
nhngn
n
1)0(2 j 4)0(2 j
(1,0)
(4,0)
x1
y1
0)2(
2/1)1()0()0()1()()1()1(
2/1)0()0()()()0(
)()()(
1
2'
2'
2'
1
2'
2'
1
2'
1
x
hhmmhx
hmmhx
mmkhkx
jjm
j
jm
j
mj
0)2(
2/4)1()0()0()1()()1()1(
2/4)0()0()()()0(
)()()(
1
2'
2'
2'
1
2'
2'
1
2'
1
y
ggmmgy
gmmgy
mmkgky
jjm
j
jm
j
mj
2/3,2/51 j
2/3,2/31 j
2-D Discrete Wavelet Transform
A 2-D DWT can be done as follows:
Step 1: Replace each row with its 1-D DWT;
Step 2: Replace each column with its 1-D DWT;
Step 3: repeat steps (1) and (2) on the lowest subband for the next scale
Step 4: repeat steps (3) until as many scales as desired have been completed
original
L HLH HH
HLLL
LH HH
HL
One scale two scales
Image at different scales
Correlation between features at different scales
Wavelet construction – a simplified approach
• Traditional approaches to wavelets have used a filterbank interpretation
• Fourier techniques required to get synthesis (reconstruction) filters from analysis filters
• Not easy to generalize
3 steps
• Split
• Predict (P step)
• Update (U step)
Wavelet construction – lifting
Example – the Haar wavelet
• S step
Splits the signal into odd and even samples
ns 1ne
1no
even samples
odd samples
For the Haar wavelet, the prediction for the odd sample is the previous even sample :
lnln ss 2,12,ˆ
lns ,
l
Example – the Haar wavelet
• P step
Predict the odd samples from the even samples
lnlnln ssd 2,12,,1
Example – the Haar wavelet
lnd ,1
l
lns ,
l
Detail signal :
2/,12,,1 lnlnln dss
The signal average is maintained :
12
0
12
0,,1
1
2/1n n
l llnln ss
Example – the Haar wavelet
• U step
Update the even samples to produce the next coarser scale approximation
…..
-1
Summary of the Haar wavelet decomposition
lnlnln ssd 2,12,,1
2/,12,,1 lnlnln dss
Can be computed ‘in place’ :
lns 2, 12, lns12, lns
lnd ,1lns 2,1,1 lnd
…..-1
lnd ,11,1 lnd lns ,1
1/21/2
P step
U step
lnlnln dss ,12,12,
2/,1,12, lnlnln dss
Then merge even and odd samples
Mergelns 2,
12, lnslns ,
Inverse Haar wavelet
transform• Simply run the forward Haar wavelet transform
backwards!
General lifting stage of wavelet decomposition
-
Split P U
+
js
1js
1jd
1je
1jo
Multi-level wavelet decomposition
lift lift lift…ns
1ns
2nd
0s
1nd 0d
• We can produce a multi-level decomposition by cascading lifting stages
General lifting stage of inverse wavelet synthesis
-
MergePU
+
js
1je
1jo
1js
1jd
lift …...lift lift0s 1s 2s 1nsns
0d
1d 2d 1nd
• We can produce a multi-level inverse wavelet synthesis by cascading lifting stages
Multi-level inverse wavelet synthesis
Advantages of the lifting implementation
• Inverse transform Inverse transform is trivial – just run the code backwards No need for Fourier techniques
Generality The design of the transform is performed without reference
to particular forms for the predict and update operators Can even include non-linearities (for integer wavelets)
Example 2 – the linear spline wavelet
• A more sophisticated wavelet – uses slightly more complex P and U operators
• Uses linear prediction to determine odd samples from even samples
Linear prediction at odd samples Original signal
Detail signal (prediction error at odd samples)
The linear spline wavelet
• P-step – linear prediction
22,2,12,,1 2/1 lnlnlnln sssd
22,2,12, 2/1ˆ lnlnln sss
The linear spline wavelet
• The prediction for the odd samples is based on the two even samples either side :
)(4/1 ,11,12,,1 lnlnlnln ddss
The linear spline wavelet
• The U step – use current and previous detail signal sample
• Preserves signal average and first-order moment (signal position) :
The linear spline wavelet
12
0,
12
0,1 2/1
1 nn
lln
lln ss
12
0
12
0,,1
1
2/1n n
l llnln lsls
1/41/41/41/4
-1/2-1/2-1/2-1/2
lns 2, 12, lns 22, lns
lnd ,1lns 2, 22, lns
lns ,1 1,1 lnslnd ,1
P step
U step
The linear spline wavelet
• Can still implement ‘in place’
Summary of linear spline wavelet decomposition
22,2,12,,1 2/1 lnlnlnln sssd
)(4/1 ,11,12,,1 lnlnlnln ddss
Computing the inverse is trivial :
)(4/1 ,11,1,12, lnlnlnln ddss 22,2,,112, 2/1 lnlnlnln ssds
The even and odd samples are then merged as before
Wavelet decomposition applied to a 2D image
detail
detail
approx
lift
.
.
.
.
.lift
approx
approx
detaildetailapprox
approx
detailapproxdetail
lift lift lift lift
1,1 nni1
1,1 nnd 21,1 nnd 3
1,1 nnd
Wavelet decomposition applied to a 2D image
Why is wavelet-based compression effective?
• Allows for intra-scale prediction (like many other compression methods) – equivalently the wavelet transform is a decorrelating transform just like the DCT as used by JPEG
• Allows for inter-scale (coarse-fine scale) prediction
1 level Haar
1 level linear spline 2 level Haar
Original
Why is wavelet-based compression effective?
0
5000
10000
15000
20000
25000
-255 -205 -155 -105 -55 -5 45 95 145 195 245
Original
Haar wavelet
Why is wavelet-based compression effective?
• Wavelet coefficient histogram
Entropy
Original image 7.22
1-level Haar wavelet 5.96
1-level linear spline wavelet 5.53
2-level Haar wavelet 5.02
2-level linear spline wavelet 4.57
Why is wavelet-based compression effective?
• Coefficient entropies
X
)(XP
Why is wavelet-based compression effective?
• Wavelet coefficient dependencies
))(|( SXPSXP
))(|( LXPLXP
Why is wavelet-based compression effective?
• Lets define sets S (small) and L (large) wavelet coefficients
• The following two probabilities describe interscale dependancies
2
#))(|(
N
SSXPSXP
2
#))(|(
N
LLXPLXP
Why is wavelet-based compression effective?
• Without interscale dependancies
0.886 0.529 0.781 0.219
))(|( SXPSXP 2
#
N
S))(|( LXPLXP
2
#
N
L
Why is wavelet-based compression effective?
• Measured dependancies from Lena
X
8
1
)(8
1
nnXcc
X1
X8 TcLX
TcSX
n
n
if
if
Why is wavelet-based compression effective?
• Intra-scale dependencies
0.912 0.623 0.781 0.219
)|( SXSXP n 2
#
N
S )|( LXLXP n 2
#
N
L
Why is wavelet-based compression effective?
• Measured dependancies from Lena
Why is wavelet-based compression effective?
• Have to use a causal neighbourhood for spatial prediction
• We will look at 3 state of the art algorithms
– Set partitioning in hierarchical sets (SPIHT)
– Significance linked connected components analysis (SLCCA)
– Embedded block coding with optimal truncation (EBCOT) which is the basis of JPEG2000
Example image compression algorithms
lsb
msb 1 1 0 0 0 0 0 0 0 0 0 0 0 0 …
x x 1 1 0 0 0 0 0 0 0 0 0 0 …
x x x x 1 1 1 0 0 0 0 0 0 …
x x x x x x x 1 1 1 1 1 1 0 …
x x x x x x x x x x x x x 1 …
x x x x x x x x x x x x x x …
Coeff. number 1 2 3 4 5 6 7 8 9 10 11 12 13 14…….
5
4
3
2
1
0
The SPIHT algorithm
• Coefficients transmitted in partial order
0
• 2 components to the algorithm – Sorting pass
– Sorting information is transmitted on the basis of the most significant bit-plane
• Refinement pass– Bits in bit-planes lower than the most significant bit
plane are transmitted
The SPIHT algorithm
N= msb of (max(abs(wavelet coefficient)))
for (bit-plane-counter)=N downto 1
transmit significance/insignificance wrt bit-plane counter
transmit refinement bits of all coefficients that
are already significant
The SPIHT algorithm
The SPIHT algorithm• Insignificant coefficients (with respect to current bitplane counter) organised into zerotrees
The SPIHT algorithm
• Groups of coefficients made into zerotrees by set paritioning
….1100101011100101100011………01011100010111011011101101….
bitstream
The SPIHT algorithm
• SPIHT produces an embedded bitstream
The SLCCA algorithm
Bit-plane encode
significant coefficients
Wavelet transform
Quantise coefficients
Cluster andtransmit
significance map
The SLCCA algorithm
• The significance map is grouped into clusters
Seed
Significant coeff
Insignificant coeff
The SLCCA algorithm
• Clusters grown out from a seed
Significance link
The SLCCA algorithm
• Significance link symbol
Image compression results
• Evaluation – Mean squared error
– Human visual-based metrics
– Subjective evaluation
21
0,2
),(ˆ),((1
N
cr
crIcrIN
mse
msedBPSNR
2
10
255log10)(
Usually expressed as peak-signal-to-noise (in dB)
Image compression results
• Mean-squared error
25
27
29
31
33
35
37
39
41
43
0.2 0.4 0.6 0.8 1 1.2
bit-rate (bits/pixel)
PSNR(dB)
SPIHT
SLCCA
JPEG
Image compression results
25
27
29
31
33
35
37
39
41
43
0.2 0.4 0.6 0.8 1 1.2
bit-rate (bits/pixel)
PSNR(dB)
Haar
Linear spline
Daubechies 9-7
Image compression results
SPIHT 0.2 bits/pixel JPEG 0.2 bits/pixel
Image compression results
SPIHT JPEG
Image compression results
EBCOT, JPEG2000
• JPEG2000, based on embedded block coding and optimal truncation is the state-of-the-art compression standard
• Wavelet-based• It addresses the key issue of scalability
– SPIHT is distortion scalable as we have already seen– JPEG2000 introduces both resolution and spatial
scalability also• An excellent reference to JPEG2000 and compression
in general is “JPEG2000” by D.Taubman and M. Marcellin
• Resolution scalability is the ability to extract from the bitstream the sub-bands representing any resolution level
….1100101011100101100011………01011100010111011011101101….bitstream
EBCOT, JPEG2000
• Spatial scalability is the ability to extract from the bitstream the sub-bands representing specific regions in the image– Very useful if we want to selectively decompress
certain regions of massive images
….1100101011100101100011………01011100010111011011101101….bitstream
EBCOT, JPEG2000
Introduction to EBCOT
• JPEG2000 is able to implement this general scalability by implementing the EBCOT paradigm
• In EBCOT, the unit of compression is the codeblock which is a partition of a wavelet sub-band
• Typically, following the wavelet transform,each sub-band is partitioned into small blocks (typically 32x32)
Introduction to EBCOT
• Codeblocks – partitions of wavelet sub-bands
codeblock
Introduction to EBCOT
• A simple bit stream organisation could comprise concatenated code block bit streams
……0CB 1CB 2CB0L 1L 2L
Length of next code-block stream
Introduction to EBCOT
• This simple bit stream structure is resolution and spatially scalable but not distortion scalable
• Complete scalability is obtained by introducing quality layers– Each code block bitstream is individually (optimally)
truncated in each quality layer
– Loss of parent-child redundancy more than compensated by ability to individually optimise separate code block bitstreams
Introduction to EBCOT
• Each code block bit stream partitioned into a set of quality layers
0Q0QL
1QL 1Q …
00CB 0
1CB 02CB0
0L 01L 0
2L …
10CB 1
1CB 12CB1
0L 11L 1
2L …
EBCOT advantages
• Multiple scalability– Distortion, spatial and resolution scalability
• Efficient compression– This results from independent optimal truncation of
each code block bit stream
• Local processing– Independent processing of each code block allows for
efficient parallel implementations as well as hardware implementations
EBCOT advantages
• Error resilience– Again this results from independent code block
processing which limits the influence of errors
Performance comparison
• A performance comparison with other wavelet-based coders is not straightforward as it would depend on the target bit rates which the bit streams were truncated for– With SPIHT, we simply truncate the bit stream when
the target bit rate has been reached– However, we only have distortion scalability with
SPIHT
• Even so, we still get favourable PSNR (dB) results when comparing EBCOT (JPEG200) with SPIHT
Performance comparison
• We can understand this more fully by looking at graphs of distortion (D) against rate (R) (bitstream length)
R
D
R-D curve for continuously modulated quantisation step size
Truncation points
Performance comparison• Truncating the bit stream to some arbitrary
rate will yield sub-optimal performance
R
D
Performance comparison
25
27
29
31
33
35
37
39
41
43
0.0625 0.125 0.25 0.5 1
bit-rate (bits/pixel)
PSNR(dB)
Spiht
EBCOT/JPEG2000
Performance comparison
• Comparable PSNR (dB) results between EBCOT and SPIHT even though:– Results for EBCOT are for 5 quality layers (5
optimal bit rates)– Intermediate bit rates sub-optimal
• We have resolution, spatial, distortion scalability in EBCOT but only distortion scalability in SPIHT