Basis Images and The Wavelet Transform

32
Basis Images and The Wavelet Transform Image Processing CSE 166 Lecture 13

Transcript of Basis Images and The Wavelet Transform

Page 1: Basis Images and The Wavelet Transform

Basis Images andThe Wavelet Transform

Image Processing

CSE 166

Lecture 13

Page 2: Basis Images and The Wavelet Transform

Announcements

• Assignment 4 will be released today

– Due May 22, 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 2019 2

Page 3: Basis Images and The Wavelet Transform

Matrix-based transforms

CSE 166, Spring 2019 3

Forward transform

Inverse transform

where

Page 4: Basis Images and The Wavelet Transform

Matrix-based transforms using orthonormal basis vectors

• In matrix form

CSE 166, Spring 2019 4

Page 5: Basis Images and The Wavelet Transform

Matrix-based transform

CSE 166, Spring 2019 5

Example: 8-point DFT of f(x) = sin(2πx)

real part + imaginary part

Page 6: Basis Images and The Wavelet Transform

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 2019 6

Page 7: Basis Images and The Wavelet Transform

Basis vectors of matrix-based 1D transforms

CSE 166, Spring 2019 7

N = 16

real part

imaginary part

Standard basis(for reference)

Page 8: Basis Images and The Wavelet Transform

Basis vectors of matrix-based 1D transforms

CSE 166, Spring 2019 8

N = 16

basis dual Standard basis(for reference)

Page 9: Basis Images and The Wavelet Transform

Matrix-based transformsin two dimensions

CSE 166, Spring 2019 9

Forward transform

Inverse transform

where

Page 10: Basis Images and The Wavelet Transform

Matrix-based transforms in two dimensions using basis images

• Inverse transform

CSE 166, Spring 2019 10

where

Each Su,v is a basis image

Page 11: Basis Images and The Wavelet Transform

Basis images of matrix-based 2D transforms

CSE 166, Spring 2019 11

Standard basis images (for reference)

8-by-8 array of8-by-8

basis images

Page 12: Basis Images and The Wavelet Transform

Basis images of matrix-based 2D transforms

CSE 166, Spring 2019 12

Discrete Fourier transform (DFT) basis images

real part imaginary part

Page 13: Basis Images and The Wavelet Transform

Basis images of matrix-based 2D transforms

CSE 166, Spring 2019 13

Discrete Hartley transform (DHT) basis images

Page 14: Basis Images and The Wavelet Transform

Basis images of matrix-based 2D transforms

CSE 166, Spring 2019 14

Discrete cosine transform (DCT) basis images

Page 15: Basis Images and The Wavelet Transform

Basis images of matrix-based 2D transforms

CSE 166, Spring 2019 15

Discrete sine transform (DST) basis images

Page 16: Basis Images and The Wavelet Transform

Basis images of matrix-based 2D transforms

CSE 166, Spring 2019 16

Walsh-Hadamard transform (WHT) basis images

Page 17: Basis Images and The Wavelet Transform

Basis images of matrix-based 2D transforms

CSE 166, Spring 2019 17

Slant transform (SLT) basis images

Page 18: Basis Images and The Wavelet Transform

Basis images of matrix-based 2D transforms

CSE 166, Spring 2019 18

Haar transform (HAAR) basis images

Page 19: Basis Images and The Wavelet Transform

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 2019 19

Page 20: Basis Images and The Wavelet Transform

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 2019 20

Page 21: Basis Images and The Wavelet Transform

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 2019 21

Page 22: Basis Images and The Wavelet Transform

• 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 2019 22

Page 23: Basis Images and The Wavelet Transform

Relationship between scaling and wavelet function spaces

CSE 166, Spring 2019 23

Union

Page 24: Basis Images and The Wavelet Transform

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 2019 24

Page 25: Basis Images and The Wavelet Transform

1D discrete wavelet transform

• Forward

• Inverse

CSE 166, Spring 2019 25

Approximation

Details

Page 26: Basis Images and The Wavelet Transform

2D discrete wavelet transform

• Forward

CSE 166, Spring 2019 26

Approximation

Details

where

Directionalwavelets

Page 27: Basis Images and The Wavelet Transform

2D discrete wavelet transform

• Inverse

CSE 166, Spring 2019 27

Page 28: Basis Images and The Wavelet Transform

2D discrete wavelet transform

CSE 166, Spring 2019 28

Decomposition

Page 29: Basis Images and The Wavelet Transform

2D discrete wavelet transform

CSE 166, Spring 2019 29

3-levelwavelet

decomposition

Page 30: Basis Images and The Wavelet Transform

Wavelet-based edge detection

CSE 166, Spring 2019 30

Zero horizontal

details

Zero lowest scale

approximation

Vertical edges

Edges

Page 31: Basis Images and The Wavelet Transform

Wavelet-based noise removal

CSE 166, Spring 2019 31

Noisy imageThreshold

details

Zero highest

resolution details

Zero details for all levels

Page 32: Basis Images and The Wavelet Transform

Next Lecture

• Image compression

• Reading

– Chapter 8: Image Compression and Watermarking

• Sections 8.1, 8.9, 8.10, and 8.12

CSE 166, Spring 2019 32