The Slantlet Transform Ivan W. Selesnick November 18, 1998
Electrical Engineering Polytechnic University 6 Metrotech Center Brooklyn, NY 11201
[email protected]
tel: 718 260-3416 fax: 718 260-3906
Abstract The discrete wavelet transform is usually carried out by lter bank iteration, however, for a xed number of zero moments, this does not yield a discrete-time basis that is optimal with respect to timelocalization. This paper discusses the implementation and properties of an orthogonal DWT, with two zero moments and with improved time-localization. The basis is not based on lter bank iteration, instead dierent lters are used for each scale. For coarse scales, the support of the discrete-time basis functions approaches 2/3 that of the corresponding functions obtained by lter bank iteration. This basis, a special case of a class of bases described by Alpert, retains the octave-band characteristic and is piecewise linear (but discontinuous). Closed form expressions for the lters are given, an ecient implementation of the transform is described, and improvement in a denoising example is shown. This basis, being piecewise linear, is reminiscent of the slant transform, to which it is compared.
This work was supported by the Alexander von Humboldt Foundation.
1
1 Introduction Discrete wavelet transforms (DWTs) are useful in a variety of applications (such as estimation, compression, and fast algorithms) partly because they can provide relatively ecient representations of piecewise smooth signals [9, 30]. The degree to which a wavelet basis can successfully yield sparse representations of such signals depends on the time-localization and smoothness properties of the basis functions. For example, signal smoothing by the nonlinear thresholding of DWT coecients [14] preserves edges reasonably well | in part, because the support of each basis function is short with respect to its bandwidth. (Thus the \constant-Q" behavior, or octave-band characteristic, of the associated lter bank.) However, a fundamental trade-o exists between time-localization and smoothness characteristics, and it is desirable to obtain a good trade-o between these two competing criteria in designing wavelet bases. As is usual for DWTs, in this paper, the lengths of the discrete-time basis functions and their moments are the vehicles by which timelocalization and smoothness properties are achieved. Although the usual lter bank iteration provides a simple way to generate an orthogonal discrete-time basis having an octave-band characteristic, for a xed number of zero moments it does not yield a discretetime basis that is optimal with respect to time-localization. This paper examines a special case of a class of bases originally described by Alpert in [4, 5, 6] in a multiwavelet context, the construction of which relies on Gram-Schmidt orthogonalization. We describe the basis from a lter bank viewpoint, give explicit solutions for the lter coecients, and describe an ecient algorithm for the transform. The DWT described in this paper is based on a lter bank structure, where as in [2, 3] dierent lters are used for each scale | however a very simple ecient algorithm based on recursion is available. For the DWT lter bank described here, the support of the discrete-time basis functions is reduced (by a factor approaching 1/3 for coarse scales), while retaining the basic characteristics of the 2-band iterated lter bank tree. This basis retains the octave-band characteristic and leads cleanly to a DWT for nite length signals (boundary issues do not arise, provided the data length is a power of 2). The lters are piecewise linear linear, but are discontinuous | for coarse scales, they converge to piecewise linear, discontinuous functions. The basis, being piecewise linear, is reminiscent of the slant transform to which it is compared. But the basis functions of the slant transform, like the Hadamard transform for example, are nonzero over all of the domain, while the basis functions described in this paper become progressively more narrow, giving a multiresolution decomposition. Hence the name slantlet for the transform described here. The slantlet basis appears especially well suited for treating piecewise linear signals, as is supported by the denoising example below.
2
- - - - - - - -
- H (z) - # 2 -
- H (z) - F (z)
#2
F (z)
#2
#2
H (z)H (z2 )
#4
H (z)F (z2 )
#4
F (z)
#4
z?2 F (z)
#4
Figure 1: Two-scale lter bank and an equivalent structure.
2 Slantlet Filter Bank It is useful to consider rst the usual iterated DWT lter bank and an equivalent1 form, shown in Figure 1. The `slantlet' lter bank described here is based on the second structure, but it will be occupied by dierent lters, that are not products. With the extra degrees of freedom obtained by giving up the product form, it is possible to design lters of shorter length, while satisfying orthogonality and zero moment conditions, as will be shown. For the two-channel case, the shortest lters for which the lter bank is orthogonal and has K zero moments, are the well known lters described by Daubechies [13]. For K = 2 zero moments, those lters H(z) and F(z) are of length 4. For this system, designated D2 , the iterated lters in Figure 1 are of length 10 and 4. Without the constraint that the lters are products, an orthogonal lter bank with K = 2 zero moments can be obtained where the lter lengths are 8 and 4, as shown in Figure 2, side by side with the iterated D2 system. That is a reduction by 2 samples, a dierence that grows with the number of stages, as will be shown. The lters shown on the right-hand side of Figure 2 are: p p p p p ! p! p! p! 10 2 10 3 3 10 2 10 2 ? 1 ? 2 G1 (z) = ? 20 ? 4 + 20 + 4 z + ? 20 + 4 z + 20 ? 42 z ?3
p
p !
p
p !
p
p !
p
p !
F2(z) = 7805 ? 3 8055 + ? 805 ? 8055 z ?1 + ? 9805 + 8055 z ?2 + ? 1780 5 + 3 8055 z ?3 + Note that interleaving the third and fourth channels of the second structure gives the third channel of the rst structure. Because that dierence is unimportant for our purpose, in this paper the two structures will be considered equivalent 1
3
- H (z)H (z ) - # 4 - H (z)F (z ) - # 4 - F (z) - # 4 - z? F (z) - # 4 2
2
2
- H (z) - # 4 - F (z) - # 4 - G (z) - # 4 - z? G (1=z) - # 4 2
2
1
3
1
1
1 2
H(z)H(z )
0.5 0
0
−0.5
−0.5
1
1
H(z)F(z2)
0.5
F (z) 2
0.5
0
0
−0.5
−0.5
1
1
F(z)
0.5
G1(z)
0.5
0
0
−0.5
−0.5
1
1 −2
z
0.5
−3
F(z)
0
0 −0.5 0
1
2
3
4
5
6
7
8
9
0
4
4
3.5
3.5
3
3
2.5
2.5
2
2
1.5
1.5
1
1
0.5
0.5 0
0.25
0.5 ω/π
0.75
z
0.5
−0.5
0
H2(z)
0.5
0
1
0
1
2
0.25
3
4
5
0.5 ω/π
6
G1(1/z)
7
0.75
8
9
1
Figure 2: Comparison of 2-scale iterated D2 lter bank (left-hand side) and 2-scale slantlet lter bank (right-hand side).
4
p
p !
p
p !
p
p !
p !
p
17 5 + 3 55 z ?4 + 9 5 + 55 z ?5 + 5 ? 55 z ?6 + ? 7 5 ? 3 55 z ?7 80 80 80 80 80 80 80 80
p !
p !
p !
p !
1 + 11 + 3 + 11 z ?1 + 5 + 11 z ?2 + 7 + 11 z ?3 + H2(z) = 16 16 16 16 16 16 16 16
p !
p !
p !
p !
11 ?5 11 ?6 7 5 3 1 11 ?4 11 ?7 16 ? 16 z + 16 ? 16 z + 16 ? 16 z + 16 ? 16 z Figure 3 illustrates a 3-scale lter bank tree for the DWT and again, an equivalent structure. The 3-scale iterated D2 lter bank tree analyses signals at three scales with lters of length 4, 10, and 22, as illustrated on the left-hand side of Figure 4. On the other hand, the lter bank shown on the right-hand side of Figure 4 (which is not realizable as an iterated lter bank tree) analyses a signal at three scales with lters of length 4, 8, and 16. This reduction in length, while maintaining desirable orthogonality and moment properties, is possible because these lters are not constrained by the product form arising in the case of iterated lter banks. We make several comments regarding Figures 2 and 4. 1. Each lter bank (equivalently, discrete-time basis) is orthogonal. The lters in the synthesis lter bank are obtained by time-reversal of the analysis lters. 2. Each lter bank has 2 zero moments. The lters (except for the lowpass ones) annihilate discrete-time polynomials of degree less than 2. 3. Each lter bank has an octave-band characteristic. 4. The scale-dilation factor is 2 for each lter bank. Between scales, the lters dilate by roughly a factor of 2. (In the slantlet lter banks, by exactly a factor of 2.) 5. Each lter bank provides a multiresolution decomposition. By discarding the highpass channels, and passing only the lowpass channel outputs through the synthesis lter bank, a lower resolution version of the original signal is obtained. 6. The slantlet lter bank is less frequency selective than the traditional DWT lter bank, due to the shorter length of the lters. The time-localization is improved with a degradation of frequency selectivity. 7. The slantlet lters are piecewise linear.
5
- - - - - - - -
- H (z) - # 2
- H (z) - # 2 - F (z) - F (z) - # 2 -
#2
- H (z)H (z )H (z ) - H (z)H (z )F (z ) - H (z)F (z ) - z? H (z)F (z ) - F (z) - z? F (z) 2
2
4
#8
4
#8
2
4
2
2
- H (z) - # 2 - F (z) - # 2 -
#8 #8 #4 #4
Figure 3: Three-scale lter bank and an equivalent structure.
6
-
- H (z)H (z )H (z ) - # 8 - H (z)H (z )F (z ) - # 8 - H (z)F (z ) - # 8 - z? H (z)F (z ) - # 8 - F (z) - # 4 - z? F (z) - # 4 2
4
2
4
2
4
2
2
1
2
3
3
2
7
3
1
1
4
H (z)
0.5
0
3
0
−0.5 1
−0.5 1
H(z)H(z2)F(z4)
0.5
F (z)
0.5
0
3
0
−0.5 1
−0.5 1
2
H(z)F(z )
0.5
G2(z)
0.5
0
0
−0.5 1
−0.5 1
z−4 H(z)F(z2)
0.5
z−7 G (1/z)
0.5
0
2
0
−0.5 1
−0.5 1 F(z)
0.5
G1(z)
0.5
0
0
−0.5 1
−0.5 1
z−2 F(z)
0.5
z−3 G (1/z)
0.5
0
1
0
−0.5
−0.5 0
2
4
6
8
10 12 14 16 18 20
0
8
8
7
7
6
6
5
5
4
4
3
3
2
2
1
1
0
2
1
H(z)H(z )H(z )
0.5
-
- H (z) - # 8 - F (z) - # 8 - G (z) - # 8 - z? G (1=z) - # 8 - G (z) - # 4 - z? G (1=z) - # 4
0
0.25
0.5 ω/π
0.75
0
1
0
2
4
6
0.25
8
10 12 14 16 18 20
0.5 ω/π
0.75
1
Figure 4: Comparison of 3-scale iterated D2 lter bank (left-hand side) and 3-scale slantlet lter bank (right-hand side).
7
It must be admitted that, although both types of lter banks posses the same number of zero moments, the smoothness properties of the lters are somewhat dierent. In Figures 2 and 4, the slantlet lters have greater \jumps" than do the iterated D2 lters | that is, they have a greater maximum dierence between adjacent sample values. The Haar basis, with its discontinuities, is suitable for analyzing piecewise constant functions. Likewise, the slantlet lter bank appears appropriate for the analysis of piecewise linear functions with discontinuities, as illustrated in the denoising example below. The ability to model discontinuities is also relevant for other applications, like edge detection and change point analysis, in which the detection of abrupt changes in an otherwise relatively smooth but unknown function is considered [24, 27]. We also wish to mention that symmetry of the lters is an important property in some applications, especially in image processing. While the lters described here are not symmetric, the lters g (n) are paired with their time-reversed versions, so the eect of time-reversing the input signal on the g channels is merely an interchange of adjacent the channels. i
i
2.1 Notation We will call the scale with which g (n), f (n), and h (n) analyze a signal, scale i. The length of the lters for scale i will be proportional to 2 . That is approximately true for iterated lter banks, however, it is exact for slantlet lter banks. In general, the support of g (n), f (n) and h (n) will be 2 +1 . We should clarify the way in which the slantlet lter banks in Figures 2 and 4 are generalized to l-scales. That is done as follows. The l-scale lter bank has 2l channels. The lowpass lter is to be called h (n). The lter adjacent to the lowpass channel is to be called f (n). Both h (n) and f (n) are to be followed by downsampling by 2 . The remaining 2l ? 2 channels are ltered by g (n) and its shifted time-reverse for i = 1; : : :; l ? 1. Each is to be followed by downsampling by 2 +1 . It follows that the lter bank is critically sampled. Note that, in the non-tree based structure, each lter g (n) appears together with it time-reverse. While h (n) does not appear with its time-reverse, it does appear always paired with the lter f (n). Also, note that the l-scale and (l + 1)-scale lter banks have in common the lters g (n) for i = 1; : : :; l ? 1, and their time-reversed versions. i
i
i
i
i
i
i
i
l
l
l
l
l
i
i
i
i
i
i
2.2 Derivations That the sought lters g (n), f (n), and h (n) are piecewise linear, is central to the following derivation. When coupled with the zero moments, it simpli es orthogonality conditions: First, suppose that g (n), f (n), and h (n) are each linear over the interval n 2 f0; : : :; 2 ? 1g and over the interval n 2 f2 ; : : :; 2 +1 ? 1g, as in Figures 2 and 4. Suppose also that g (n) and f (n) have two zero moments: inner products of g (n), and f (n), with linear polynomial sequences are zero (as lters, g (n) and f (n) annihilate \ramps"). With i
i
i
i
i
i
i
i
i
i
i
i
i
i
8
i
j > i, over the support of g (n) the functions g (n); f (n), and h (n) are linear, so orthogonality between scales is immediate. The same is true for the appropriately shifted versions g (n ? 2 ), f (n ? 2 ), and their time-reversed versions. Because the sought lter g (n) is to be linear over the two above-mentioned intervals, it is described by four parameters, and can be written as i
j
j
j
i
i
i
i
i
8 < a +a n for n = 0; : : :2 ? 1 g (n) = : 0 0 0 1 a1 0 + a1 1 (n ? 2 ) for n = 2 ; : : :2 +1 ? 1 ;
;
;
;
i
i
i
i
i
Therefore, to obtain g (n) such that the sought l-scale lter bank is orthogonal with 2 zero moments, requires obtaining parameters a0 0; a0 1; a1 0; a1 1 so that i
;
;
1. g (n) is of unit norm. i
;
2 +1 ?1
X
i
=0
;
g2 (n) = 1 i
n
2. g (n) is orthogonal to its shifted time-reverse. i
+1 ?1 2iX
g (n) g (2 +1 ? 1 ? n) = 0 i
=0
i
i
n
3. g (n) annihilates linear discrete time polynomials. i
+1 ?1 2iX
=0
+1 ?1 2iX
g (n) = 0; i
=0
n g (n) = 0 i
n
n
Each of the conditions can be written as an algebraic equation in terms of the four parameters a0 0; a0 1; a1 0; a1 1, to obtain a multivariate polynomial system of equations. The conditions are nonlinear in the four parameters, however, with assistance from the computer algebra systems Maple [11] and Singular [16] (for the computation of Grobner bases) we obtain the following expressions for g (n). ;
i
8 < a +a n for n = 0; : : :2 ? 1 g (n) = : 0 0 0 1 a1 0 + a1 1 (n ? 2 ) for n = 2 ; : : :2 +1 ? 1 ;
;
;
;
i
i
i
9
i
i
;
;
;
where m s1 t1 s0 t0
= = = = = = = = =
a0 0 a1 0 a0 1 a1 1 ;
;
;
;
2 p 6 m=((m2 ? 1)(4 m2 ? 1)) p 2 3=(m (m2 ? 1)) ?s1 (m ? 1)=2 ((m + 1) s1 =3 ? m t1 )(m ? 1)=(2 m) (s0 + t0)=2 (s0 ? t0)=2 (s1 + t1)=2 (s1 ? t1)=2 i
Note that the parameters a0 0; a0 1; a1 0; a1 1 depend on i. The same approach works for f (n) and h (n). Using again a piecewise linear form, h (n) and f (n) can be written in terms of 8 unknown parameters, b0 0; b0 1; b1 0; b1 1; c0 0; c0 1; c1 0; c1 1. ;
;
;
;
i
i
i
8 < b +b n h (n) = : 0 0 0 1 b1 0 + b1 1 (n ? 2 ) 8 < c +c n f (n) = : 0 0 0 1 c1 0 + c1 1 (n ? 2 ) ;
;
;
;
;
;
;
;
;
;
i
;
i
i
+1 ?1 2iX
i
i
i
+1 ?1 2iX
i
i
=0
2. h (n) and f (n) are orthogonal to their shifted versions. i
h (n) h (n + 2 ) = 0 i
=0
i
i
n
i 2X ?1
=0
f (n) f (n + 2 ) = 0 i
i
i
n
+1 ?1 2iX
=0
h (n) f (n) = 0 i
i
n
i 2X ?1
=0
h (n) f (n + 2 ) = 0 i
i
n
10
i
i
f 2 (n) = 1:
n
i 2X ?1
i
for n = 0; : : :2 ? 1 for n = 2 ; : : :2 +1 ? 1
n i
;
i
h2(n) = 1:
=0
;
i
The orthogonality and moment conditions require that 1. h (n) and f (n) are of unit norm.
;
for n = 0; : : :2 ? 1 for n = 2 ; : : :2 +1 ? 1
i
i
;
;
i
3. f (n) annihilates linear discrete time polynomials. i
+1 ?1 2iX
+1 ?1 2iX
f (n) = 0; i
=0
=0
n f (n) = 0 i
n
n
By expressing the orthogonality and moment conditions as a multivariate polynomial system, we obtain the following solution for h (n) and f (n). i
i
m = 2 p u = 1= m p v = (2 m2 + 1)=3 b0 0 = u (v + 1)=(2 m) b1 0 = u ? b0 0 b0 1 = u=m b1 1 = ?b0 1 p q = 3=(m (m2 ? 1))=m c0 1 = q (v ? m) c1 1 = ?q (v + m) c1 0 = c1 1 (v + 1 ? 2 m)=2 c0 0 = c0 1 (v + 1)=2 i
;
;
;
;
;
;
;
;
;
;
;
;
In these expression for g (n), f (n) and h (n), the signs of any of the square roots can be negated. Doing so merely negates or time-reverses the sequences. We note that h (n) and f (n) specialize to the Daubechies length-4 lters for i = 1, as expected. i
i
i
i
i
2.3 Support Length In Figures 2 and 4 it was seen that the support of the slantlet lters is less than those of the lters obtained by lter bank iteration. It is interesting to note the dierence for the general l-scale case. The iterated lter bank, with Daubechies length-4 lters, analyzes scale i with a lter of length 3 2 ? 2. On the other hand, the slantlet lter bank analyzes scale i with the lter g (n) of length 2 +1. That gives a reduction of 2 ? 2 samples for scale i. The ratio tends to 2/3 as i increases (for coarser scales). That reduction in the support of the analysis lters is precisely what was sought. i
i
11
i
i
2.4 Multiresolution Spaces To clarify the multiresolution spaces generated by the lter banks described in this paper, it is convenient to de ne appropriate function spaces, as is usually done.
V0 = l2 fZg V = Spanfh (n ? 2 k)g
(1) (2)
Q = Spanff (n ? 2 k)g
(3)
i
i
i
k
i
i
i
k
W = Spanfg (n ? 2 k); g (1 ? 2 k ? n)g
(4)
l2 fZg = Q1 V1 = W1 Q2 V 2 = W1 W2 Q3 V 3 = W1 W2 W3 Q 4 V 4
(5) (6) (7) (8)
i
i
i
i
i
k
Each line above corresponds to the decomposition by an l-scale lter bank, the last line being that of a 4-scale lter bank. The nesting of approximation spaces generated by the 4-scale lter bank is expressed as
V4 (Q4 V4 ) (W3 Q4 V4 ) l2 fZg
2.5 Relationship to M-band Wavelet Bases It should be noted that a relationship exists between the bases described in this paper, and those described in [17, 29, 18, 19]. Those references describes a generalization of the 2-band Daubechies wavelet basis to M-bands, or equivalently, an M-channel orthogonal lter bank with K zero moments, for general M and K. In particular, for an M-band system, these references describe the shortest lowpass (scaling) lter with a speci ed number K of zero moments. We wish to note that for K = 2, this maximally regular lter (in the terminology of [29]) is identical to the lowpass lter h (n) described above (with i = M). As noted in [29], given the lowpass branch of an orthogonal lter bank, the remaining lters are not uniquely determined, in contrast to the 2-band case. This makes the design of remaining channels more dicult, and although methods for obtaining a set of M ? 1 lters to complete the lter bank are described in [29] (see also [31]), it can be dicult to control the characteristics of the resulting lters and in particular, to regulate their lengths. For K = 2, the lters f (n) and g (n) described above give a way to complete the lter bank, given the maximally regular lowpass branch, in a way that reproduces the characteristics of a tree structured 2-band system. It should also be noted that the way in which the lters f (n) and g (n) complete the lter bank, given the maximally regular lowpass branch, diers from that suggested in [29]. In [29] a completion of the lter bank i
i
i
i
12
i
that approximates a uniform division of the frequency spectrum into M equal bands is suggested. Indeed, the motivation for the M-band system in [29] is not the improvement of time-localization properties while preserving the essential time frequency tiling of the 2-band DWT, but it is to provide a dierent tiling of the time-frequency plane that might better suite certain applications. Certainly, given an M-band lowpass lter, one can complete the lter bank in a number of ways, one being the approximate uniform division of frequency, a second being a division in frequency similar to that provided by an iterated 2-band system. In this paper, we have chosen the second, and have used the greater generality to improve the time-localization of the resulting basis.
2.6 Finite-length Signals The orthogonal discrete wavelet transform based on lter bank iteration is usually adapted to nite (power of 2) length data by periodizing the signal. Each output of the analysis lter bank is then periodic, and in this manner an orthogonal transformation can be constructed for a nite interval. The same can be done for the slantlet lter bank, with results that are especially clean, due to the lengths of the the lters being powers of 2. Consider the orthogonal matrix of dimension 2 representing the transform associated with an l-scale lter bank. In Figure 5 a 16 by 16 example is illustrated for l = 4. The rst row of the matrix, which corresponds to h (n), is simply a constant. The eect of periodizing the input, results in an overlapping eect for h (n): l
l
l
h (n) + h (n + 2 ) = b0 0 + b1 0 + (b0 1 + b1 1)n = p1m l
l
l
;
;
;
;
(9) (10)
for n = 0; : : :; 2 ? 1, m = 2 . The second row, corresponding to f (n), is a linear function, as seen in Figure 5. Periodization results in an overlapping eect for f (n) as it does for h (n): l
l
l
l
l
f (n) + f (n + 2 ) = c0 0 + c1 0 + (c0 1 + c1 1)n s 3(m ? 1) ? 2r m = m(m + 1) m(m2 ? 1) n l
l
l
;
;
;
;
(11) (12)
for n = 0; : : :; 2 ? 1, m = 2 . Each of the remaining rows of the matrix consists of the sequences g (n), its time-reverse, and their shifts by 2 +1 , for i = 1; : : :; (l ? 1). Except for the rst two rows, there is no overlapping eect at the boundaries of the matrix, as the supports are powers of two. l
l
i
i
2.7 Comparison to Slant Transform Interestingly, the Haar basis can be obtained by downsampling the Walsh basis. Both are piecewise constant, but the Walsh transform serves as a minimal complexity DCT for frequency analysis, while the Haar 13
1
1
1
1
0
0
0
0
−1
−1 0
8
16
−1 0
8
16
−1 0
8
16
1
1
1
1
0
0
0
0
−1
−1 0
8
16
−1 0
8
16
8
16
1
1
1
0
0
0
0
−1 0
8
16
−1 0
8
16
8
16
1
1
1
0
0
0
0
−1 0
8
16
−1 0
8
16
16
0
8
16
0
8
16
0
8
16
−1 0
1
−1
8
−1 0
1
−1
0
−1 0
8
16
Figure 5: Slantlet (N = 16) basis. Vectors of the 16 by 16 orthogonal matrix associated with the 4-scale slantlet lter bank.
14
transform, having basis functions of progressively shorter widths, gives a multiresolution decomposition. A piecewise linear basis, that follows the spirit of the Walsh transform (in performing frequency analysis), is the slant transform [1, 15, 23, 25, 7, 26, 33], which has been used in Intel's \Indeo" video compression algorithm [8]. In a loose sense, the transform described in this paper is to the slant transform, what the Haar transform is to the Walsh transform. The analogy is only loose, however, their similarities suggest the name slantlet transform for the transform described in this paper.
2.8 Ecient Implementation A key to the ecient implementation of the usual DWT is its tree structure. The long lters used to analyze coarse scales are implemented by a sequence of convolutions and down-sampling. In the slantlet lter bank, it appears initially that an ecient implementation is not available, for the lack of tree structure. However, an ecient implementation is possible, as is shown here. The ecient algorithm given below, resembles closely the iterative procedure used to implement an iterated lter bank tree, so the computational complexity is of the same order, although the code complexity may increase. Because the lters are piecewise linear, each lter can be represented as the sum of a DC term and a linear term. Due to the simple form of the lters g (n), only four terms are needed to compute y (n). Writing the output sample of channel i as an inner product, i
y (n) = i
+1 ?1 2iX
=0 i 2X ?1
x(2 +1 n + k)g (k) i
(13)
i
k
=
k
=0
i
x(2 +1n + k)(a0 0 + a0 1k) + i
i 2X ?1
;
+1 ?1 2iX
;
k
=2i
x(2 +1 n + k)(a1 0 + a1 1(k ? 2 )) i
;
;
(14)
i
i i i 2X ?1 2X ?1 2X ?1 +1 +1 +1 = a0 0 x(2 n + k) + a0 1 k x(2 n + k) + a1 0 x(2 n + (k + 2 )) + a1 1 k x(2 +1n + (k + 2 )) =0 =0 =0 =0 ;
i
i
;
k
i
;
k
i
i
;
k
k
;
(15) (16)
x(2 n + k)
(17)
k x(2 n + k)
(18)
= a0 0 0(2n; i) + a1 0 0(2n + 1; i) + a0 1 1 (2n; i) + a1 1 1 (2n + 1; i) ;
;
i
;
where 0 (n; i) =
i 2X ?1
=0 i 2X ?1
i
k
1 (n; i) =
k
=0
i
are types of DC and linear moments at scale i of the input signal x(n). The same expressions are valid for the projections of x(n) onto the time-reversed versions of g(n), but the constants a0 0; a0 1; a1 0; a1 1 are to be modi ed. ;
15
;
;
;
Note that, as in the Haar DWT, the moments can be computed eciently by a simple recursive algorithm that starts with the ne scale i = 1. The DC and linear moments at scale i can be computed from the DC and linear moments at the next ner scale (i ? 1) by 0 (n; i) = 0 (2n; i ? 1) + 0(2n ? 1; i ? 1) 1 (n; i) = 1 (2n; i ? 1) + 1(2n ? 1; i ? 1) + 2 ?10 (2n ? 1; i ? 1): i
(19) (20)
The inverse can also be computed eciently by making use of the values 0 (n; i) and 1 (n; i). For the ecient computation of the inverse, one rst computes 0 (n; l) and 1 (n; l), from the DC and linear slantlet coecients; one then computes 0 (n; i) and 1(n; i) for decreasing values of i, updating 0 and 1 using the slantlet coecients. Finally, with i = 1, the original signal x(n) is obtained from 0 and 1 via the relation x(2n) = 0(n; 1) x(2n + 1) = 0(n; 1) + 1(n; 1)
(21) (22)
Therefore, even though the design of the lter bank is not based on an iterated lter bank, the computation of its output can be made ecient by a recursive method.
2.9 Shift Variance and Redundant Transform It should be noted that slantlet lter banks are more time-varying than those based on lter bank iteration. Consider the highpass branch of the tree structured lter bank in Figure 1 and 3. The highpass channel is periodically time varying due to the downsampling, with a period of 2. On the other hand, the highpass channels for the non-tree based lter bank is periodically time varying with period 4. It is seen that the improvement with regard to time-localization costs one not only the simple tree structure, but also costs one greater shift variance. In some applications that is a disadvantage. However, in denoising, the loss of shift variance can be overcome by turning to a redundant transform. With such a transform, shift invariance is retrieved by eectively including all shifts of the data, and comes at the expense of a redundant representation. Interestingly, it has been shown that denoising via wavelet thresholding can yield superior results when carried out with this shift invariant redundant (or stationary) wavelet transform [10, 20]. If memory and run-time requirements permit, the use of a redundant transform for denoising can be advantageous. In this case, redundant denoising is an application where the greater shift variance of the slantlet lter bank is not expected to be a signi cant drawback. A redundant shift-invariant version of the slantlet transform, in the sense of [10], is straight forward to derive and can be implemented in a similar way.
16
2.10 Denoising Example In this denoising example, the behavior of the slantlet basis is compared to other wavelet bases having two vanishing moments, the D2 basis, the biorthogonal-2,2 and -2,4 bases (page 273 of [13]) and the piecewise linear semi-orthogonal (spline) bases (page 147 of [32]). For the non-orthogonal bases, the DWT was carried out with symmetric extensions. A hard threshold was applied uniformly to each scale. We chose the signal to be the `Houston skyline' function by H. Guo, for it is piecewise linear and has numerous discontinuities. Figure 6 illustrates the results. Denoising with the slantlet transform yields the same artifacts and noise spikes, but for this example, generally they were reduced. Varying the threshold used, and averaging over 200 realizations for each threshold, the curve illustrating the root-mean-square error in Figure 6 was obtained. That gure shows that for this example the slantlet transform gives an improvement. It indicates, that on average, for thresholds between 0.12 and 0.24, the error with the slantlet is smaller than that obtained with D2 for any threshold. That a wider choice of thresholds gives such results is important, for in practice of course, the best threshold for a particular example is unknown. It is interesting to note that for thresholds above 0.24, the semi-orthogonal (spline) bases perform better than do the biorthogonal bases in this example. Certainly, the most appropriate basis depends on the data and the noise level. It should be noted that there are a variety of denoising techniques that go beyond simple thresholding, that can produce dramatically improved results. For example, the shift invariant transform of [10, 20] mentioned above, and the hidden-Markov model based approach of [12].
2.11 Underlying Continuous-time Wavelets As noted in the Introduction, the slantlet basis is a special case of the multiwavelet bases, described by Alpert [4, 5, 6], comprised of r scaling functions and r wavelet functions with r vanishing moments. The continuoustime multiwavelet basis of [6] with r = 2 is piecewise linear and discontinuous2. However, it is important to note that for these bases, the relationship between continuous-time and discrete-time versions is not as simple as it is for scalar wavelet bases (wavelet bases based on a single scaling function). In the scalar case, the discrete-time basis is obtained by iterated ltering and upsampling. However, the lter bank associated with Alpert's continuous-time multiwavelet bases with r = 2 does not yield the discrete-time slantlet basis, due to important dierences between scalar- and multiwavelet bases, as highlighted in [28]; in the terminology of [21, 22], the multiwavelet basis is not balanced. To obtain a discrete-time version of the basis, Alpert used a Gram-Schmidt orthogonalization and considers the general case of r vanishing moments, while we use Grobner bases to derive explicit solutions for the special case of 2 vanishing moments. The explicit solutions for the lters at each scale are useful because they are required for the ecient implementation of Alpert's basis has 0 (t) symmetric: 0 (t) = 0 (t ? T ), and 1 (t) anti-symmetric: that pairwise symmetry can be obtained by taking their sum and dierence. 2
17
1
(t) = ? 1 (t ? T ). It is immediate
Original signal
Noisy signal
2
2
1.5
1.5
1
1
0.5
0.5
0
0
−0.5
−0.5
−1
−1
−1.5
−1.5
−2
0
256
512
768
−2
1024
0
Hard threshold, Daubechies−2, T=0.16 2
1.5
1.5
1
1
0.5
0.5
0
0
−0.5
−0.5
−1
−1
−1.5
−1.5 0
256
512
768
512
768
1024
Hard threshold, Slantlet, T=0.16
2
−2
256
−2
1024
0
256
512
768
1024
RMSE, averaged over 200 realizations
1.2 1.1 1 0.9 0.8
spline B22 B24 D2 slantlet
0.7 0.6 0.5 0.1
0.12
0.14
0.16
0.18 0.2 Threshold
0.22
0.24
0.26
Figure 6: Denoising via hard thresholding with the iterated D2 lter bank and the slantlet DWT.
18
the transform described in Section 2.8. The approach taken by Alpert addresses the extension of these bases to a higher number of vanishing moments, however, higher order extensions entail a higher number of separate functions/ lters to analyze a signal at a single stage. The number of lters increases according to the order. For bases that are piecewise polynomial with degree r ? 1, r vanishing moments requires r wavelet functions/ lters.
2.12 Multidimensional Filter Banks The generalization to the multidimensional case is not as straight forward as it is for iterated lter bank trees. Nevertheless, a 2-dimensional lter bank can be obtained in a similar manner, that is composed of separable lters, although the lter bank itself is not separable. In the 2D case, the area of support of the lters approaches (2=3)2 = 4=9 that of the iterated 2D D2 system. That is a reduction of the area of support by over one half, suggesting that in more than one dimension, the trade-o between zero moments and time-localization can become more signi cant. However, the smoothness properties of the 2D slantlet and the separable 2D D2 transforms are more dierent as well. While the highpass and bandpass lters of the 2D slantlet lter bank annihilate linear polynomials in two variables, a n1 + b n2 + c; the separable 2D D2 lter bank annihilates polynomials of the form a n1 n2 +b n1 +c n2 +d. It should be emphasized that the slantlet transform is most appropriate for data that is piecewise linear, and can not be expected to be useful in the compression of natural images, for example. A description of the details of the 2D slantlet transform will be available from the author.
3 Conclusion The smoothing of data while preserving edges relatively well is an essential advantage of wavelets in denoising and it depends in part on both the short support of the basis functions with respect to their scale, and their number of vanishing moments. Also in the application of wavelet bases to image compression, the timelocalization and the number of zero moments of the basis are both important. Good time-localization properties lead to good representation of edges. Approximation order is important for sparse representation (compression) of smooth regions. However, short support and zero moments are competing criteria in the construction of wavelet lter banks. In this light, this paper presents an orthogonal lter bank for the discrete wavelet transform with two zero moments, where the lters are of shorter support than those of the iterated D2 lter bank tree. Although not based on an iterated lter bank tree, the lter bank described in this paper retains the main desirable characteristics of the usual DWT lter bank, namely: orthogonality, an octave-band characteristic, a scaledilation factor of 2, and an ecient implementation. Table 1 summarizes a comparison. A transform for 19
Table 1: Comparing the iterated D2 and slantlet lter banks. Iterated D2 Slantlet Orthogonal y y Octave-band y y Approximation order 2 2 Ecient implementation y y Piecewise linear n y Support at scale i 32 ?2 2 +1 i
i
nite length signals based on this lter bank is particularly clean due to the lter lengths being exact powers of two. The basis appears particularly well suited for piecewise linear signals, as does the Haar basis for piecewise constant signals. Improvement in a denoising example was also shown. Matlab programs for the slantlet transform, its inverse, a shift-invariant (redundant) variant, and a two-dimensional version are available from the author or via the Internet at http://taco.poly.edu/selesi/.
4 Acknowledgments The author wishes to thank Hans W. Schuler and Peter Steen of the Lehrstuhl fur Nachrichtentechnik at the Universitat Erlangen-Nurnberg, where this work was supported by the Alexander von Humboldt Foundation. He also wishes to thank Haitao Guo for providing his \Houston Skyline" function, and the anonymous reviewers for their helpful comments.
References [1] N. Ahmed and K. R. Rao. Orthogonal Transforms for Digital Signal Processing. Springer-Verlag, 1975. [2] A. Aldroubi, M. Eden, and M. Unser. Discrete spline lters for multiresolution and wavelets of l2 . SIAM J. Math. Anal., 25(5):1412{1432, September 1994. [3] A. Aldroubi and M. Unser. Oblique projections in discrete signal subspaces of l2 and the wavelet transform. In SPIE-Mathematical Imaging:Wavelet Applications in Signal and Image Processing, volume 2303, pages 36{46, San Diego, July 27-29 1994. [4] B. Alpert, G. Beylkin, R. Coifman, and V. Rokhlin. Wavelet-like bases for the fast solution of secondkind integral equations. SIAM J. on Sci. Comp., 14(1):159{184, January 1993. 20
[5] B. K. Alpert. Wavelets and other bases for fast numerical linear algebra. In C. K. Chui, editor, Wavelets: A tutorial in theory and applications. Academic Press, 1992. [6] B. K. Alpert. A class of bases in l2 for the sparse representation of integral operators. SIAM J. on Math. Anal., 24(1):246{262, January 1993. [7] M. M. Anguh and R. R. Martin. A truncation method for computing slant transforms with applications to image coding. IEEE Trans. on Communications, 43(6):2103{2110, June 1995. [8] P. Bahl, P. S. Gauthier, and R. A. Ulichney. PCWG's INDEO-C video compression algorithm. World Wide Web Document, April 11 1996. http://www.europe.digital.com/info/DTJK04/. [9] C. S. Burrus, R. A. Gopinath, and H. Guo. Introduction to Wavelets and Wavelet Transforms. Prentice Hall, 1997. [10] R. R. Coifman and D. L. Donoho. Translation-invariant de-noising. In A. Antoniadis, editor, Wavelets and Statistics. Springer-Verlag Lecture Notes, 1995. [11] R. M. Corless. Essential Maple: An Introduction for Scienti c Programmers. Springer-Verlag, 1995. [12] M. S. Crouse, R. D. Nowak, and R. G. Baraniuk. Wavelet-based signal processing using hidden markov models. IEEE Trans. on Signal Processing, 46(4):886{902, April 1998. [13] I. Daubechies. Ten Lectures On Wavelets. SIAM, 1992. [14] D. L. Donoho. De-noising by soft-thresholding. IEEE Trans. on Information Theory, 41(3):613{627, May 1995. [15] H. Enomoto and K. Shibata. Orthogonal transform coding system for television signals. In Proc. 1971 Symp. Applications of Walsh Functions, pages 11{17, 1971. [16] G.-M. Greuel, G. P ster, and H. Schonemann. Singular Reference Manual. In Reports On Computer Algebra, number 12. Centre for Computer Algebra, University of Kaiserslautern, May 1997. http://www.mathematik.uni-kl.de/zca/Singular. [17] P. N. Heller. Rank M wavelets with N vanishing moments. SIAM J. Math. Anal., 16(2):502{519, 1995. [18] J. Kautsky. An algebraic construction of discrete wavelet transforms. Applications of Mathematics, 3(38):169{193, 1993. [19] J. Kautsky and R. Turcajova. Pollen product factorization and construction of higher multiplicity wavelets. Linear algebra and its applications, 222:241, 1995. 21
[20] M. Lang, H. Guo, J. E. Odegard, C. S. Burrus, and R. O. Wells, Jr. Noise reduction using an undecimated discrete wavelet transform. IEEE Signal Processing Letters, 3(1):10{12, January 1996. [21] J. Lebrun and M. Vetterli. Balanced multiwavelets theory and design. IEEE Trans. on Signal Processing, 46(4):1119{1124, April 1998. [22] J. Lebrun and M. Vetterli. High order balanced multiwavelets. In Proc. IEEE Int. Conf. Acoust., Speech, Signal Processing (ICASSP), Seattle, May 12-15 1998. [23] P. C. Mali, B. B. Chaudhuri, and D. D. Majumder. Some properties and fast algorithms of slant transform in image processing. Signal Processing, 9:233{244, December 1985. [24] T. Ogden and E. Parzen. Data dependent wavelet thresholding in nonparametric regression with changepoint applications. Computational Statistics and Data Analysis, 22:53{70, 1996. [25] W. K. Pratt, L. R. Welch, and W. H. Chen. Slant transforms for image coding. In Proc. 1972 Symp. Applications of Walsh Functions, volume AD-744650, pages 229{234, 1972. [26] W. K. Pratt, L. R. Welch, and W. H. Chen. Slant transform image coding. IEEE Trans. on Communications, 22:1075{1093, August 1974. [27] J. E. Richwine. Bayesian estimation of change-points using Haar wavelets. Master's thesis, University of South Carolina, 1996. [28] I. W. Selesnick. Multiwavelet bases with extra approximation properties. IEEE Trans. on Signal Processing, 46(11):2998{12909, November 1998. [29] P. Steen, P. Heller, R. A. Gopinath, and C. S. Burrus. Theory of regular M-band wavelet bases. IEEE Trans. on Signal Processing, 41(12):3497{3511, December 1993. [30] G. Strang and T. Nguyen. Wavelets and Filter Banks. Wellesley-Cambridge Press, 1996. [31] J. Tian and Jr. R. O. Wells. A fast implementation of wavelet transform for m-band lter banks. In H. H. Szu, editor, Wavelet Applications V, Proc. SPIE 3391, 1998. [32] M. Unser, A. Aldroubi, and M. Eden. A family of polynomial spline wavelet transforms. Signal Processing, 30(2):141{162, January 1993. [33] J.-F. Yang and Ch.-P. Fan. Centralized fast slant transform algorithms. IEICE Trans. on Fundamentals of Electronics, Communications and Computer Sciences, E80-A(4):705{711, April 1997.
22