Basis Images andThe Wavelet Transform
Image Processing
CSE 166
Lecture 13
Announcements
• Assignment 4 will be released today
– Due May 20, 11:59 PM
• Reading
– Chapter 6: Wavelet and Other Image Transforms
• Sections 6.5 and 6.10
• (Sections 6.6-6.9 for details of specific transforms)
CSE 166, Spring 2020 2
Matrix-based transforms
CSE 166, Spring 2020 3
Forward transform
Inverse transform
where
Matrix-based transforms using orthonormal basis vectors
• In matrix form
CSE 166, Spring 2020 4
Matrix-based transform
CSE 166, Spring 2020 5
Example: 8-point DFT of f(x) = sin(2πx)
real part + imaginary part
Matrix-based transforms
• Discrete Fourier transform (DFT)• Discrete Hartley transform (DHT)• Discrete cosine transform (DCT)• Discrete sine transform (DST)• Walsh-Hadamard (WHT)• Slant (SLT)• Haar (HAAR)• Daubechies (DB4)• Biorthogonal B-spline (BIOR3.1)
CSE 166, Spring 2020 6
Basis vectors of matrix-based 1D transforms
CSE 166, Spring 2020 7
N = 16
real part
imaginary part
Standard basis(for reference)
Basis vectors of matrix-based 1D transforms
CSE 166, Spring 2020 8
N = 16
basis dual Standard basis(for reference)
Matrix-based transformsin two dimensions
CSE 166, Spring 2020 9
Forward transform
Inverse transform
where
Matrix-based transforms in two dimensions using basis images
• Inverse transform
CSE 166, Spring 2020 10
where
Each Su,v is a basis image
Basis images of matrix-based 2D transforms
CSE 166, Spring 2020 11
Standard basis images (for reference)
8-by-8 array of8-by-8
basis images
Basis images of matrix-based 2D transforms
CSE 166, Spring 2020 12
Discrete Fourier transform (DFT) basis images
real part imaginary part
Basis images of matrix-based 2D transforms
CSE 166, Spring 2020 13
Discrete Hartley transform (DHT) basis images
Basis images of matrix-based 2D transforms
CSE 166, Spring 2020 14
Discrete cosine transform (DCT) basis images
Basis images of matrix-based 2D transforms
CSE 166, Spring 2020 15
Discrete sine transform (DST) basis images
Basis images of matrix-based 2D transforms
CSE 166, Spring 2020 16
Walsh-Hadamard transform (WHT) basis images
Basis images of matrix-based 2D transforms
CSE 166, Spring 2020 17
Slant transform (SLT) basis images
Basis images of matrix-based 2D transforms
CSE 166, Spring 2020 18
Haar transform (HAAR) basis images
Wavelet transforms
• A scaling function is used to create a series of approximations of a function or image, each differing by a factor of 2 in resolution from its nearest neighboring approximations.
• Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations.
• The discrete wavelet transform (DWT) uses those wavelets, together with a single scaling function, to represent a function or image as a linear combination of the wavelets and scaling function.
CSE 166, Spring 2020 19
Scaling functions and set of basis vectors
• Father scaling function
• Set of basis functions
– Integer translation k
– Binary scaling j
• Basis of the function space spanned by
CSE 166, Spring 2020 20
Scaling function, multiresolution analysis
1. The scaling function is orthogonal to its integer translates
2. The function spaces spanned by the scaling function at low scales are nested within those spanned at higher scales𝑉−∞⊂⋯⊂ 𝑉−1⊂ 𝑉0⊂ 𝑉1⊂⋯⊂ 𝑉∞
3. The only function representable at every scale (all 𝑉𝑗) is f(x) = 0
4. All measureable, square-integrable functions can be represented as 𝑗 → ∞
CSE 166, Spring 2020 21
• Given father scaling function , there exists a mother wavelet function whose integer translations and binary scalings
span the difference between any two adjacent scaling spaces
• The orthogonal compliment of
Wavelet functions
CSE 166, Spring 2020 22
Relationship between scaling and wavelet function spaces
CSE 166, Spring 2020 23
Union
V is basis of the function space spanned by scaling function
Wj is orthogonal complement of Vj in Vj+1
Scaling function coefficients and wavelet function coefficients
• Refinement (or dilation) equation
where are scaling function coefficients
• And
where are wavelet function coefficients
• Relationship
CSE 166, Spring 2020 24
1D discrete wavelet transform
• Forward
• Inverse
CSE 166, Spring 2020 25
Approximation
Details
for real signals
2D discrete wavelet transform
• Forward
CSE 166, Spring 2020 26
Approximation
Details
where
Directionalwavelets
for real signals
2D discrete wavelet transform
• Inverse
CSE 166, Spring 2020 27
for real signals
2D discrete wavelet transform
CSE 166, Spring 2020 28
Decomposition
Horizontal detailsApproximation
Vertical details
Diagonal details
2D discrete wavelet transform
CSE 166, Spring 2020 29
3-levelwavelet
decomposition
Wavelets in image processing
1. Wavelet transform
2. Alter transform
3. Inverse wavelet transform
CSE 166, Spring 2020 30
Wavelet-based edge detection
CSE 166, Spring 2020 31
Zero horizontal
details
Zero lowest scale
approximation
Vertical edges
Edges
Wavelet-based noise removal
CSE 166, Spring 2020 32
Noisy imageThreshold
details
Zero highest
resolution details
Zero details for all levels
Next Lecture
• Image compression
• Reading
– Chapter 8: Image Compression and Watermarking
• Sections 8.1, 8.9, 8.10, and 8.12
CSE 166, Spring 2020 33