Top Banner
Basis Images and The Wavelet Transform Image Processing CSE 166 Lecture 13
33

Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Jul 03, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Basis Images andThe Wavelet Transform

Image Processing

CSE 166

Lecture 13

Page 2: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

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

Page 3: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Matrix-based transforms

CSE 166, Spring 2020 3

Forward transform

Inverse transform

where

Page 4: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Matrix-based transforms using orthonormal basis vectors

• In matrix form

CSE 166, Spring 2020 4

Page 5: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Matrix-based transform

CSE 166, Spring 2020 5

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

real part + imaginary part

Page 6: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

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

Page 7: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Basis vectors of matrix-based 1D transforms

CSE 166, Spring 2020 7

N = 16

real part

imaginary part

Standard basis(for reference)

Page 8: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Basis vectors of matrix-based 1D transforms

CSE 166, Spring 2020 8

N = 16

basis dual Standard basis(for reference)

Page 9: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Matrix-based transformsin two dimensions

CSE 166, Spring 2020 9

Forward transform

Inverse transform

where

Page 10: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Matrix-based transforms in two dimensions using basis images

• Inverse transform

CSE 166, Spring 2020 10

where

Each Su,v is a basis image

Page 11: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

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

Page 12: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Basis images of matrix-based 2D transforms

CSE 166, Spring 2020 12

Discrete Fourier transform (DFT) basis images

real part imaginary part

Page 13: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Basis images of matrix-based 2D transforms

CSE 166, Spring 2020 13

Discrete Hartley transform (DHT) basis images

Page 14: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Basis images of matrix-based 2D transforms

CSE 166, Spring 2020 14

Discrete cosine transform (DCT) basis images

Page 15: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Basis images of matrix-based 2D transforms

CSE 166, Spring 2020 15

Discrete sine transform (DST) basis images

Page 16: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Basis images of matrix-based 2D transforms

CSE 166, Spring 2020 16

Walsh-Hadamard transform (WHT) basis images

Page 17: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Basis images of matrix-based 2D transforms

CSE 166, Spring 2020 17

Slant transform (SLT) basis images

Page 18: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Basis images of matrix-based 2D transforms

CSE 166, Spring 2020 18

Haar transform (HAAR) basis images

Page 19: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

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

Page 20: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

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

Page 21: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

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

Page 22: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

• 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

Page 23: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

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

Page 24: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

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

Page 25: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

1D discrete wavelet transform

• Forward

• Inverse

CSE 166, Spring 2020 25

Approximation

Details

for real signals

Page 26: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

2D discrete wavelet transform

• Forward

CSE 166, Spring 2020 26

Approximation

Details

where

Directionalwavelets

for real signals

Page 27: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

2D discrete wavelet transform

• Inverse

CSE 166, Spring 2020 27

for real signals

Page 28: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

2D discrete wavelet transform

CSE 166, Spring 2020 28

Decomposition

Horizontal detailsApproximation

Vertical details

Diagonal details

Page 29: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

2D discrete wavelet transform

CSE 166, Spring 2020 29

3-levelwavelet

decomposition

Page 30: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Wavelets in image processing

1. Wavelet transform

2. Alter transform

3. Inverse wavelet transform

CSE 166, Spring 2020 30

Page 31: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Wavelet-based edge detection

CSE 166, Spring 2020 31

Zero horizontal

details

Zero lowest scale

approximation

Vertical edges

Edges

Page 32: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

Wavelet-based noise removal

CSE 166, Spring 2020 32

Noisy imageThreshold

details

Zero highest

resolution details

Zero details for all levels

Page 33: Basis Images and The Wavelet Transform · 2020-05-13 · •Wavelet functions (wavelets) are then used to encode the differences between adjacent approximations. •The discrete wavelet

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