ece462 lecture 16dimitris/ece462/lecture16-2021.pdfor if we normalize the filters so that energy is...
TRANSCRIPT
Aviva: Public
ECE462 – Lecture 16
• 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
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
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
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
• 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
≡
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
• 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?
• 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
• Possible artifacts in reconstructed images
Blurring border distortions, blocking, checker boarding, ringing depend on
1) Filter choices
2) Bit allocation
3) Convolutions
Blurring occurs when we do not assign enough bits to the higher sub-bands
In biorthogonal filter decomposition analysis and synthesis filters are different
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