ece462 lecture 16dimitris/ece462/lecture16-2021.pdfor if we normalize the filters so that energy is...

13
Aviva: Public ECE462 – Lecture 16

Upload: others

Post on 09-Mar-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

Aviva: Public

ECE462 – Lecture 16

Page 2: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

• Matrix based calculation of wavelet transform

Given any Nx1 vector X = x[0],……….,x[N-1] we would like to find a matrix

A : NXN so that A XT will be equivalent to one-level wavelet transform

For example for N = 4 the Haar WT matrix is

A1 =

1

2

1

20 0

0 01

2

1

21

2−

1

20 0

0 01

2−

1

2

Or if we normalize the filters so that energy is preserved

Page 3: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

Or if we normalize the filters so that energy is preserved

A =

1

2

1

20 0

0 01

2

1

21

2−

1

20 0

0 01

2−

1

2

Notice before that A1 A1T = 1

4I

A AT = I = AT A

That is A1 is orthogonal while

A is orthogonal matrix

Page 4: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

For applications in images and by considering separable filters one level wavelet decomposition works as follows:

Given the image F(i,j), NxN

Obtain A . F . AT

Notice that in order to get back from the WT to the image we should proceed as follows

AT(A F AT) A = F

For a multiple level WT we must define matrices A1: NxN , A2 : N

2xN

2, A3 :

N

4xN

4and so on

and apply these consequently to the LL sub image of each level

Page 5: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

Example: Consider our previous example for the 4x4 image

F:

1 0 0 01 0 0 01 0 0 01 1 1 1

• First level WT : (Haar)

A =

1

2

1

20 0

0 01

2

1

21

2−

1

20 0

0 01

2−

1

2

1

2x

2 0 2 03 2 1 00 0 0 0−1 −2 1 1

Page 6: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

• Second level WT on F1 : 1

2

2 03 2

Now

A2 =

1

2

1

21

2−

1

2

1

4

7 3−3 1

So the overall 2 – level W.T

7

4

3

41 0

−3

4

1

4

1

20

0 0 0 0

−1

2−1

1

20

Page 7: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

To get back to original image we proceed as follows

First:

A1T .

𝐿𝐿2 𝐿𝐻2𝐻𝐿2 𝐻𝐻2

A1 = F1

2x2 2x2 2x2 2x2

Then

A1 T 𝐿𝐿1 𝐿𝐻1𝐻𝐿1 𝐻𝐻1

A1 F

4x4 4x4 4x4 4x4 (to be assigned as an exercise)

LL2

Page 8: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

• Wavelet based image compression and distortions

The sub-images at different resolutions are processed by a spectrum estimator for bit allocations. Statistical properties of the sub-images guide this quantization step.

➢The lowpass sub-band (upper left) is allocated the most bits

➢ Strategy based on the rate distortion curve:

Given B bits, how do we allocate bk bits per pixel to the k-th sub-image so that the reconstructed image has smallest distortion?

Page 9: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

• Distortion measures: MSE, PSNR, ….

At medium bit rate (0.25 bpp) (that is about 32:1) the objective measures are good indicators of the subjective quality of the image

At low bit rates this is not always the case

Page 10: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

• Possible artifacts in reconstructed images

Blurring border distortions, blocking, checker boarding, ringing depend on

1) Filter choices

2) Bit allocation

3) Convolutions

Page 11: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

Blurring occurs when we do not assign enough bits to the higher sub-bands

Page 12: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

In biorthogonal filter decomposition analysis and synthesis filters are different

Page 13: ECE462 Lecture 16dimitris/ece462/lecture16-2021.pdfOr if we normalize the filters so that energy is preserved A = 1 2 1 2 0 0 0 0 1 2 1 2 1 2 −1 2 0 0 0 0 1 2 −1 2 Notice before

Lowpass synthesis: Long and smooth to avoid blocking and checker boarding

Hipass synthesis: Short to avoid ringing

The non-smooth scaling function Checker board effects