You are on page 1of 50

2D Wavelets for Different Sampling Grids and the Lifting Scheme

Miroslav Vranki University of Zagreb, Croatia


Presented by: Atanas Gotchev
Digital Image Processing II

Lecture Outline
1D wavelets and FWT 2D separable wavelets 2D nonseparable wavelets
different sampling grids

Lifting scheme
easy to construct filter banks

Digital Image Processing II

Two-Channel Filter Bank


Analysis Synthesis

x[n]

H0

x0[n]

G0
^ x[n]

H1

x1[n]

G1

LP channel: H0 and G0 HP channel: H1 and G1 PR condition: x[n] =x[n n0 ]


Digital Image Processing II

FWT: Analysis Filter Bank


Fast wavelet transform enables efficient computation of DWT coefs. Iteration of the analysis FB on the low-pass channel DWT coefficients are computed recursively!

Digital Image Processing II

FWT: Analysis Filter Bank

Digital Image Processing II

FWT: Analysis Filter Bank

Digital Image Processing II

Synthesis Bank

Digital Image Processing II

Synthesis Bank

Digital Image Processing II

Complexity of FWT

Number of operations proportional to: N size of data L length of filters in the filterbank (scaling and wavelet vectors)

Digital Image Processing II

Separable wavelet transforms


products of 1D wavelet and scaling functions (x,y) = (x)(y) (x,y) = (x)(y) V(x,y) = (x)(y) D(x,y) = (x)(y)

Digital Image Processing II

2D separable FWT

Digital Image Processing II

Digital Image Processing II

Example: Symlets wavelets

See functions symaux, dbaux in Wavelet Toolbox

Digital Image Processing II

Wavelet and the Scaling Function

Digital Image Processing II

2D wavelets and scaling function

Digital Image Processing II

Digital Image Processing II

Sampling in 2D
Image is split into several groups of pixels (phases) Not as straightforward as in 1D Many ways to split an image
Separable Quincunx Hexagonal...

Digital Image Processing II

Quincunx Downsampling
n2

n1

Image is split into two phases (cosets) Simplest nonseparable sampling scheme

Digital Image Processing II

Subsampling Matrix
n2

(1,1)

Basis vectors form the unit cell Subsampling matrix (dilation matrix) defines the sampling operation
n1

(1,-1)

1 1 D= 1 1

Digital Image Processing II

Subsampling Matrix
Defines the sampling grid For a 2D grid, D is a 2x2 matrix. There are M = |det(D)| image phases and also M samples in the unit cell. For the quincunx case, M = 2.
Quincunx PR FB needs M = 2 channels.
Digital Image Processing II

2D Subsampling Operation
D defines the sampling grid Take one coset of the image Renumber it to fit on the integer grid
xD (n1 , n2 ) = x(k1 , k2 ), k1 n1 where = D k2 n2

Digital Image Processing II

Quincunx Subsampling Operation


For the quincunx case:
1 1 D= 1 1 k1 1 1 n1 n1 + n2 k = 1 1 n = n n 2 2 1 2 xD (n1 , n2 ) = x(n1 + n2 , n2 n1 )
Digital Image Processing II

Downsampling is actually...
reading the image along the new axes. 45 rotation for the quincunx case
n2
n2

(1,1)

(0,1)

n1 (1,-1)

(1,0) n1

Digital Image Processing II

To take the second phase...


move the new axes by (1,0)... to the next element of the unit cell.
n2

n2
(2,1)

(0,1)

n1 (2,-1)

(1,0) n1

Digital Image Processing II

Quincunx Polyphase Decomposition

e as h

Ph

as e

Counterclockwise rotation
Digital Image Processing II

Separable Sampling
n2 (0,2)

(2,0) n1

4 elements of the unit cell Image is split into 4 phases Requires 4 channels of the PR filter bank

2 0 D= 0 2

Digital Image Processing II

Hexagonal Sampling
n2

(1,2)

4 elements of the unit cell Image is split into 4 phases Requires 4 channels of the PR filter bank
n1

(1,-2)

1 1 D= 2 2

Digital Image Processing II

Voronoi cell
Voronoi cell consists of points closer to the origin... than to any other point of the given lattice. n Quincunx Voronoi cell
2

1 1 n1

Digital Image Processing II

Effects in the Frequency Domain


Downsampling is defined with a D matrix
1 X D () = ( D) X () = X D T ( 2 k ) T | det D | kN ( D )

where

1 = 2

To avoid aliasing... signal should be bandlimited to Voronoi cell of the lattice defined by 2D-T
Digital Image Processing II

Bandlimiting
Properly bandlimited signal for quincunx downsampling
2

Digital Image Processing II

Quincunx downsampling
Input image has been properly bandlimited
2
2 2

Spectrum support of the downsampled image


2
2

Digital Image Processing II

Quincunx upsampling
x(D1n) xU (n) = 0
n2 (0,1)

if n LAT (D) otherwise


n2

(1,1)

(1,0) n1

n1 (1,-1)

Digital Image Processing II

Upsampling effect on Z-transform


X U ( z ) = xU (n)z n = x( D 1n)z n = x(k )z Dk = X ( z D )
n n k

z1 z = z2
n

n1 n2

n = z1n1 z 2 2

z1 D z = z2

d11 d 21

d12 d 22

d z1d11 z 2 21 = d d z1 12 z 2 22

z Dk = ( z D ) k Exercise: prove that


Digital Image Processing II

Frequency transformation
z e j
d z1d11 z 2 21 e j ( d111 + d 212 ) D jD T z = d d j (d +d ) = e z1 12 z 2 22 e 12 1 22 2

Conclusion:

X U () = X ( D T )

Digital Image Processing II

Quincunx upsampling
X ()
2
2 2

X U () = X (DT )
2
2

Digital Image Processing II

Iterated quincunx upsampling


X U () = X (DT )
2

X U () = X (D2 )T
2

)
X U () = X (D3 )T
2

Digital Image Processing II

The Lifting Scheme


Simple way to construct filter banks Easy to satisfy PR requirement Computationally efficient
X(z) z-1 2 2 + P(z) U(z) D(z) A(z) U(z) P(z) + 2 z-1 ^ X(z) 2

Digital Image Processing II

The Lifting Scheme


Basic structure:
Polyphase decomposition Predict stage (dual lifting step) Update stage (primal lifting step)
X(z) z-1 2 2 + P(z) U(z) D(z) A(z) U(z) P(z) + 2 z-1 ^ X(z) 2

Digital Image Processing II

Predict stage
Prediction of the second phase sample ...based on a number of samples from the first phase. Wavelet coefficients are obtained as... a prediction error. X(z) 2 Smooth signal... gives small details.
Digital Image Processing II

z-1 2

P(z) D(z)

Update stage
Input: detail coefs. Output is used to create approximation coefs. Average value of the input image must be retained. X(z) A(z)
2 + z-1 2
Digital Image Processing II

P(z) -

U(z) D(z)

Lifting Scheme in 2-D


X(z1,z2) D Xe + P(z1,z2) z1-1 D Xo U(z1,z2) D A U(z1,z2) P(z1,z2) + D z1 ^ X(z1,z2) D

similar structure as 1-D 2D polyphase decomposition 2D filters


Digital Image Processing II

Quincunx FB Example
Lifting scheme based on quincunx interpolating filters J. Kovaevi & W. Sweldens: Wavelet Families of Increasing Order in Arbitrary Dimensions. IEEE Trans. Image Proc., vol. 9, no. 3, pages 480-496, March 2000.

Digital Image Processing II

Predict Filters
Neville interpolating filters symmetric interpolation neighborhoods
n2

n1

example of a second order P filter: P2 ( z1 , z 2 ) = 0.25 + 0.25 z11 + 0.25 z 2 1 + 0.25 z11 z 2 1
Digital Image Processing II

Supports of the Prediction Filters

Digital Image Processing II

Update Filters
updates the average value of the input image based on the corresponding predict filter

1 * U N ( z1 , z2 ) = PN ( z1 , z2 ) 2
Digital Image Processing II

Transfer Functions for P4 and U2

Analysis LP

Analysis HP

Synthesis LP
Digital Image Processing II

Synthesis HP

Wavelet and Scale for P4 and U2

Analysis scale

Analysis wavelet

Synthesis scale
Digital Image Processing II

Synthesis wavelet

Wavelet Decomposition Tree


AJ-1 AJ-2 AJ-3

DJ-1

DJ-2

DJ-3

Digital Image Processing II

Separable Versus Nonseparable


Nonseparable
higher complexity more freedom in FB design different directional properties

Separable
widely used simple realization based on 1D filter banks

Digital Image Processing II

Quincunx Wavelets
Simplest nonseparable sampling grid Only two channels Double quincunx sampling = nonseparable sampling Less biased in horizontal and vertical directions Comparable results with separable wavelets
Digital Image Processing II