1.12k likes | 1.16k Views
Wavelets (Chapter 7). What are Wavelets?. Sinusoid Wavelet. Wavelets are functions that “wave” above and below the x-axis, have (1) varying frequency, (2) limited duration, and (3) an average value of zero.
E N D
What are Wavelets? Sinusoid Wavelet Wavelets are functions that “wave” above and below the x-axis, have (1) varying frequency, (2) limited duration, and (3) an average value of zero. This is in contrast to sinusoids, used by FT, which have infinite energy.
What are Wavelets? (cont’d) Like sines and cosines in FT, wavelets are used as basis functions ψk(t) in representing other functions f(t): Spanof ψk(t): vector space S containing all functions f(t) that can be represented by ψk(t).
What are Wavelets? (cont’d) Morlet Haar Daubechies There are many different wavelets:
What are Wavelets? (cont’d) (dyadic/octave grid)
What are Wavelets? (cont’d) j scale/frequency localization space localization
Continuous Wavelet Transform (CWT) Scale parameter (measure of frequency) Translation parameter, measure of time Normalization constant Forward CWT: Continuous wavelet transform of the signal f(t) Mother wavelet (window) Scale = 1/j = 1/Frequency
CWT: Main Steps • Take a wavelet and compare it to a section at the start of the original signal. • Calculate a number, C, that represents how closely correlated the wavelet is with this section of the signal. The higher C is, the more the similarity.
CWT: Main Steps (cont’d) 3. Shift the wavelet to the right and repeat steps 1 and 2 until you've covered the whole signal.
CWT: Main Steps (cont’d) 4. Scale the wavelet and repeat steps 1 through 3. 5. Repeat steps 1 through 4 for all scales.
Coefficients of CTW Transform • Wavelet analysis produces a time-scale viewof the input signal or image. space
Continuous Wavelet Transform (cont’d) • Inverse CWT: double integral!
FT vs WT weighted by F(u) weighted by C(τ,s)
Properties of Wavelets • Simultaneous localization in time and scale - The location of the wavelet allowsto explicitly represent the location of events in time. - The shape of the wavelet allowsto represent different detail or resolution. space
Properties of Wavelets (cont’d) • Sparsity: for functions typically found in practice, many of the coefficients in a wavelet representation are either zero or very small. • Linear-time complexity: many wavelet transformations can be accomplished in O(N) time.
Properties of Wavelets (cont’d) • Adaptability: wavelets can be adapted to represent a wide variety of functions (e.g., functions with discontinuities, functions defined on bounded domains etc.). • Well suited to problems involving images, open or closed curves, and surfaces of just about any variety. • Can represent functions with discontinuities or corners more efficiently (i.e., some have sharp corners themselves).
Discrete Wavelet Transform (DWT) (forward DWT) (inverse DWT) where
DFT vs DWT one parameter basis or two parameter basis FT expansion: WT expansion
Multiresolution Representation using fine details narrower, small translations j coarse details
Multiresolution Representation using fine details j coarse details
Multiresolution Representation using fine details wider, large translations j coarse details
Multiresolution Representation using high resolution (more details) j … low resolution (less details)
Approximation Pyramid (revisited) low resolution j=0 scale=1/j high resolution j = J high resolution j = J low resolution j=0
Prediction Residual Pyramid (revisited) • Prediction residual pyramid can be represented more • efficiently. • In the absence of quantization errors, the approximation • pyramid can be reconstructed from the prediction residual • pyramid.
Subband coding • In subband coding, an image is decomposed into a set of bandlimited components, called subbands. • Since the bandwidth of the resulting subbands is smaller than that of the original image, the subbands can be downsampled without loss of information.
Perfect Reconstruction Filter Z transform: Goal: find H0, H1, G0 and G1 so that
Perfect Reconstruction Filter Families QMF: quadrature mirror filters CQF: conjugate mirror filters
Efficient Representation Using “Details” details D3 details D2 details D1 L0
Efficient Representation Using Details (cont’d) representation:L0 D1 D2 D3 in general: L0 D1 D2 D3…DJ (analysis) • A wavelet representation of a function consists of • a coarse overall approximation • detail coefficients that influence the function at various scales.
Reconstruction (synthesis) H3=L2+D3 H2=L1+D2 details D3 details D2 H1=L0+D1 details D1 L0
Example - Haar Wavelets L0 D1 D2 D3 • Suppose we are given a 1D "image" with a resolution of 4 pixels: [9 7 3 5] • The Haar wavelet transform is the following:
Example - Haar Wavelets (cont’d) • Start by averaging the pixels together (pairwise) to get a new lower resolution image: • To recover the original four pixels from the two averaged pixels, store some detail coefficients.
Example - Haar Wavelets (cont’d) • Repeating this process on the averages gives the full decomposition:
Example - Haar Wavelets (cont’d) 1 -1 2 • The Harr decomposition of the original four-pixel image is: • We can reconstruct the original image to a resolution by adding or subtracting the detail coefficients from the lower-resolution versions.
Example - Haar Wavelets (cont’d) Note small magnitude detail coefficients! Dj Dj-1 How to compute Di ? D1 L0
Multiresolution Conditions • If a set of functions can be represented by a weighted sum of ψ(2jt - k), then a larger set, including the original, can be represented by a weighted sum of ψ(2j+1t - k): high resolution j scale/frequency localization low resolution time localization
Multiresolution Conditions (cont’d) • If a set of functions can be represented by a weighted sum of ψ(2jt - k), then a larger set, including the original, can be represented by a weighted sum of ψ(2j+1t - k): Vj: span of ψ(2jt - k): Vj+1: span of ψ(2j+1t - k):
Nested Spaces Vj Vj : space spanned by ψ(2jt - k) Basis functions: ψ(t - k) V0 f(t) ϵ Vj ψ(2t - k) V1 … Vj ψ(2jt - k) Multiresolution conditions nested spanned spaces: i.e., if f(t) ϵV jthen f(t) ϵ V j+1
How to compute Di ? f(t) ϵ Vj IDEA: define a set of basis Functions that span the differences between Vj
Orthogonal Complement Wj • Let Wj be the orthogonal complement of Vj in Vj+1 - i.e., all functions in Vj that are orthogonal to Wj Vj+1 = Vj + Wj
How to compute Di ? (cont’d) • If f(t) ϵVj+1, then f(t) can be represented using basis functions φ(t) fromVj+1: Vj+1 Alternatively, f(t) can be represented using two basis functions, φ(t) from Vj and ψ(t) from Wj: Vj+1 = Vj + Wj
How to compute Di ? (cont’d) Think of Wj as a means to represent the parts of a function in Vj+1 that cannot be represented in Vj differences between Vj and Vj+1 Vj, Wj
How to compute Di ? (cont’d) • using recursion on Vj: Vj+1 = Vj + Wj Vj+1 = Vj-1+Wj-1+Wj = …= V0 + W0 + W1 + W2 + … + Wj if f(t) ϵ Vj+1 , then: V0 W0, W1, W2, … basis functions basis functions
Wavelet expansion (Section 7.2) • Efficient wavelet decompositions involves a pair of waveforms (mother wavelets): • The two shapes are translated and scaled to produce wavelets (wavelet basis) at different locationsand on differentscales. encode low resolution info encode details or high resolution info φ(t) ψ(t) φ(t-k) ψ(2jt-k)
Wavelet expansion (cont’d) • f(t) is written as a linear combination of φ(t-k) and ψ(2jt-k) : scaling function wavelet function Note:in Fourier analysis, there are only two possible values of k ( i.e., 0 and π/2); the values j correspond to different scales (i.e., frequencies).
1D Haar Wavelets • Haar scaling and wavelet functions: φ(t) ψ(t) computes details computes average