Multi-Resolution Analysis: Version 2 ECE IIT, Kharagpur
Multi-Resolution Analysis: Version 2 ECE IIT, Kharagpur
4
MULTI-
RESOLUTION
ANALYSIS
Version 2 ECE IIT, Kharagpur
Lesson
11
Multi-resolution
Analysis: Theory
of Subband
Coding
Version 2 ECE IIT, Kharagpur
Instructional Objectives
At the end of this lesson, the students should be able to:
1. Show a two-band filter bank for subband coding and decoding of one-
dimensional signals.
2. Define analysis and synthesis filters.
3. Explain the need for downsampling after the analysis and upsampling
before the synthesis.
4. Determine the z-transforms of downsampled and upsampled signals.
5. Determine the z-transform of the reconstructed signal.
6. Derive the conditions for error-free reconstruction of the signal.
7. Show that the analysis and synthesis filter banks for error-free
reconstruction fulfill the conditions of bi-orthogonality.
8. Extend the idea of subband coding for a two-dimensional four-band filter
bank.
9. Repetitively apply four-band split on a given image using FIR analysis filter
bank.
10. Synthesize an image from the subbands using FIR synthesis filter bank.
11.0 Introduction
In lesson-10, we had introduced the idea of multi-resolution image analysis using
scaling and wavelet functions. It was shown that the scaling functions provide low
frequency analysis of the signals to obtain approximations and the wavelet
functions provide high-frequency analysis of the signals to extract the details. In
this lesson, we present a more general approach towards subband analysis and
synthesis. The basic theories presented herein would provide an insight into the
design requirements of the filter banks needed for analysis and synthesis. The
conditions for error-free reconstruction of signals will be derived and the concepts
will be extended for two-dimensional signals, i.e. images. In the next lesson, we
are going to show how Discrete Wavelet Transforms (DWT), to be defined later
would perfectly fit into the subband coding and decoding requirements. It should
however be noted that the theories presented for subband coding is a general
one and DWT is just one of the ways, but not the only one to perform subband
coding.
Fig.11.1 shows the block diagram of the filter bank, which essentially
analyzes the signal into two subbands, whose spectral responses are as shown
in Fig.11.2.
Since the filter banks perform subband analysis, the filters are known as
analysis filters.
Synthesis is just the reverse of analysis, as shown in fig.11.3. The low-pass and
high-pass filtered subbands are first upsampled by a factor of two, so that each
of the subband filters, having impulse responses g 0 (n ) and g1 (n ) respectively for
low and high subbands, generate N samples for an input sequence of length N
samples. The outputs of these two filters are added to generate the
reconstructed sequence x̂(n ) for n = 0,1, "" , N − 1 . Since the two filter outputs do
the synthesis of the signal, these filters are known as synthesis filters. The two-
band analysis and synthesis can be shown in the form of a combined block
diagram of fig.11.4.
∞
X (z ) = ∑ x(n )z −n
…………………………………………………………………. (11.1)
n = −∞
∞
X down (z ) = ∑ x(2n)z −n
n = −∞
[ ]
= x(0 )z 0 + x(1)z −1 / 2 + x(2 )z −1 + "" + x(− 1)z 1 / 2 + x(− 2)z 1 + "" .. (11.2)
1
2
[
+ x(0 )z 0 − x(1)z −1 / 2 + x(2)z −1 − "" − x(− 1)z 1 / 2 + x(− 2)z 1 + ""
1
2
]
1
[ ( )
= X z1/ 2 + X − z1/ 2
2
( )]
11.3.2 z-transform of up-sampled sequence:
In the process of up-sampling, zeros are added for every odd sample and thus,
up-sampling a given sequence x(n ) for n = 0,1,2, "" can be expressed in terms
of the samples of given sequence as
⎧ ⎛n⎞
⎪ x⎜ ⎟ for n = 0,2,4,""
x (n ) = ⎨ ⎝ 2 ⎠
up
⎪0
⎩ otherwise
The second term of the above equation represents the z-transform of the aliased
version of the signal x̂(n ) . Its inverse z-transform is given by
With this background, we can now consider the block-diagram of fig.11.4 and
write the z-transform of the reconstructed signal by using equation (11.4) and
using the property that convolution in time (or spatial) domain is multiplication in
frequency domain as
Xˆ ( z ) = G0 ( z )[H 0 ( z )X ( z ) + H 0 (− z )X (− z )]
1
2 …………………………………….. (11.6)
+ G1 ( z )[H 1 ( z )X ( z ) + H 1 (− z )X (− z )]
1
2
Xˆ ( z ) = [G0 ( z )H 0 ( z ) + G1 (z )H 1 ( z )]X (z )
1
2 ……………………………… (11.7)
+ [G0 ( z )H 0 (− z ) + G1 ( z )H 1 (− z )]X (− z )
1
2
G0 ( z )H 0 ( z ) + G1 ( z )H 1 ( z ) = 2 ……………………………………………………….(11.9)
and
G0 ( z )H 0 (− z ) + G1 ( z )H 1 (− z ) = 0 ......................................................................(11.10)
⎡ H ( z ) H 0 (− z )⎤
[G0 (z ) G1 ( z )]⎢ 0 ⎥ = [2 0] ……………………………...…………(11.11)
⎣ H 1 ( z ) H 1 (− z )⎦
⎡ H 0 ( z ) H 0 (− z )⎤
We define H m ( z ) = ⎢ ⎥ as the analysis modulation matrix and
⎣ H 1 ( z ) H 1 (− z )⎦
⎡G0 ( z )⎤ 2 ⎡ H 1 (− z ) ⎤
⎢ G ( z )⎥ = det (H ( z )) ⎢− H (− z )⎥ ………………………………...…………… (11.13)
⎣ 1 ⎦ m ⎣ 0 ⎦
g 0 (n ) = (− 1) h1 (n )
n
………………………………………………………………. (11.14)
g1 (n ) = (− 1) h0 (n )
n +1
g 0 (n ) = (− 1) h1 (n )
n +1
…………………………………………………………….. (11.15)
g1 (n ) = (− 1) h0 (n )
n
Hence, for error-free reconstruction, the FIR synthesis filters are cross-modulated
copies of analysis filters, with one of the signs reversed.
P( z ) = G0 ( z )H 0 ( z ) = H 0 ( z )H 1 (− z ) ………………………………... (11.16)
2
det (H m ( z ))
Also, noting that det (H m (z )) = − det (H m (− z )) , we can obtain the product of the
high-pass analysis and synthesis filter transfer functions from equation (11.13) as
−2
G1 ( z )H 1 ( z ) = H 0 (− z )H 1 (z ) = P (− z ) = G0 (− z )H 0 (− z ) …………… (11.17)
det (H m ( z ))
Thus, one of the conditions for error-free reconstruction, given by equation (11.9)
may be rewritten as
G0 ( z )H 0 ( z ) + G0 (− z )H 0 (− z ) = 2 .................................................................... (11.18)
where δ (n ) is unit impulse function having value of unity for n = 0 and zero
otherwise.
Since, all odd-indexed terms get cancelled, as per equation (11.19) and the
even-indexed terms add up in the left-hand side, it is possible to write equation
(11.19) in a different form as
∑ g (k )h (2n − k ) =
k
0 0 g 0 (k ), h0 (2n − k ) = δ (n ) ………………………………… (11.20)
Again, using equation (11.17) and changing z to -z, it is also possible to rewrite
equation (11.18) as
G1 ( z )H 1 ( z ) + G1 (− z )H 1 (− z ) = 2 ……………………………………………….. (11.21)
Taking equation (11.10) as the starting point, we can also derive two other
conditions
g1 (n ) = (− 1) g 0 (2 K − 1 − n )
n
…………………………………………………….. (11.27)
hi (n ) = g i (2 K − 1 − n )
where 2K is the number of taps in FIR filter. Examples of orthonormal FIR filters
include the Smith and Barnwell filters, Daubechies filters and Vaidyanathan and
Hoang filters. Fig.11.5 shows the impulse responses of four 8-tap Daubechies
FIR filters, whose coefficients of low-pass analysis filters are shown in Table-
11.1. Other filters are derived through equation (11.27).
h0 (0) -0.01059740
h0 (1) 0.03288301
h0 (2) 0.03084138
h0 (3) -0.18703481
h0 (4) -0.02798376
h0 (5) 0.63088076
h0 (6) 0.71484657
h0 (7 ) 0.23037781
Questions
NOTE: The students are advised to thoroughly read this lesson first and then
answer the following questions. Only after attempting all the questions, they
should click to the solution button and verify their answers.
PART-A
A.1. Show the block diagrams of analysis and synthesis filters to perform two-
band subband coding and decoding.
A.2. Why is downsampling done after the analysis filter?
A.3. Why is upsampling done before the synthesis filter?
A.4. Determine the z-transform of a signal downsampled by a factor of two.
A.5. Determine the z-transform of a signal upsampled by a factor of two.
A.6. Derive the z-transform of the reconstructed signal in terms of the z-
transforms of the original signal and the filter transfer functions.
A.7. From the above expression, identify the aliased component. How can the
aliased component be eliminated?
A.8. From the conditions of perfect reconstruction of signal at the decoder, derive
the conditions for bi-orthogonality of analysis and synthesis filters.
A.9. Show the block-diagram of the analysis filter banks used to perform subband
decomposition of an image into four subbands. Clearly indicate which subbands
extract (a) approximated form of the image, (b) horizontal details, (c) vertical
details and (d) diagonal details.
A.10. Show the block-diagram of the synthesis filters corresponding to the above.
(A)
1
[X (z ) + X (− z )]
2
1⎡ ⎛ 4⎞ ⎛ 14 ⎞⎤
1
(B) ⎢ X ⎜⎜ z ⎟⎟ + X ⎜⎜ − z ⎟⎟⎥
2 ⎢⎣ ⎝ ⎠ ⎝ ⎠⎥⎦
1⎡ ⎛ 4⎞ ⎛ 1⎞ ⎛ 1⎞ ⎛ 1 ⎞⎤
1
(C) ⎢ X ⎜⎜ z ⎟⎟ + X ⎜⎜ z 2 ⎟⎟ + X ⎜⎜ − z 2 ⎟⎟ + X ⎜⎜ − z 4 ⎟⎟⎥
4 ⎢⎣ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠⎥⎦
1⎡ ⎛ 4⎞ ⎛ 12 ⎞ ⎛ 34 ⎞ ⎛ 34 ⎞ ⎛ 12 ⎞ ⎛ 14 ⎞⎤
1
(D) ⎢ X ⎜ z ⎟ + X ⎜ z ⎟ + X ⎜ z ⎟ + X ⎜ − z ⎟ + X ⎜ − z ⎟ + X ⎜ − z ⎟⎥
6 ⎢⎣ ⎜⎝ ⎟⎠ ⎜ ⎟
⎝ ⎠
⎜ ⎟
⎝ ⎠
⎜
⎝
⎟
⎠
⎜
⎝
⎟
⎠
⎜
⎝
⎟
⎠⎥⎦
1 1
(A) and .
2 2
1 1
(B) − and
2 2
1 1
(C) and −
2 2
1 1
(D) − and −
2 2
(A) g1 (0) = 0.2, g1 (1) = 0.3, g1 (2) = 0.4, g1 (3) = 0.3, g1 (4) = 0.2
(B) g1 (0) = 0.2, g1 (1) = 0.3, g1 (2) = −0.4, g1 (3) = 0.3, g1 (4) = 0.2
(C) g1 (0) = −0.2, g1 (1) = −0.3, g1 (2) = 0.4, g1 (3) = −0.3, g1 (4) = −0.2
(D) g1 (0) = −0.2, g1 (1) = 0.3, g1 (2) = −0.4, g1 (3) = 0.3, g1 (4) = −0.2
B.5 Bi-orthogonality condition necessarily implies that the FIR tap lengths of
(A) 16 x 16.
(B) 32 x 32.
(C) 64 x 64.
(D) 128 x 128.
PART-C:Problems
C-1.
(a) Write a computer program to obtain the four subbands, namely LL, LH, HL
and HH from a square image. Use Daubechies’ 8-tap, orthonormal, separable,
analysis-synthesis filters defined in Section-11.4.
(b) Apply the program on a square image and display your results in the form
shown in fig.11.8.
(c) Split the LL subband into four subbands and display your results for two-level
decomposition.
(d) Write a computer program to synthesize the image again from the two-level
subbands in part (c).
(e) Apply your program on the results of part-(c) and compare reconstructed
image with the original image. Is the reconstructed image exactly same as the
original one?
SOLUTIONS
A.1
A.2
A.3
A.4
A.5
A.6
A.7
A.8
A.9
A.10