**3.1 Nested subspaces**

The basic requirement for multiresolution analysis is the existence of a set of approximation subspaces of L2(R) (square integrable function space) with different resolutions, as represented schematically for the three intermediate subspaces in Figure 3 and stated by equation (8):

$$V\_{-\alpha}, \dots \subset V\_{-1} \subset V\_0 \subset V\_1 \subset \dots \dots V\_{\alpha} = L^2(\mathbb{R}) \tag{8}$$

In such a way that, if Vf(t) j then Vf(2t) 1j . Which means that the subspace containing high resolution will automatically contains those of lower resolution. In a more general case, if Vf(t) <sup>0</sup> , then k <sup>k</sup> Vt)f(2 . This implication is known as the scale invariance property.

The Wavelet Transform for Image Processing Applications 401

These values are adopted for the remaining of the chapter. Thus equation (13) can be

Identically, the two-dimensional scaling function forms with its translates an orthonormal

spanV φ ZjandZk(t)}{ kj,

As a consequence, if φ V0 (t) , then since VV <sup>10</sup> , φ(t) can be expressed as a linear

φ(t) φ(2t2h(k) k)

Where the coefficients h(k) are the scaling function coefficients. The value 2 ensures that the norm of the scaling function is always equal to the unity. This equation is fundamental

What has been done so far to define the scaling function, its translates and the corresponding spanned spaces, can also be applied in the same way to the so-called wavelet function. Let us suppose for this purpose that the subspace V V 0 1 has an orthogonal complement W0 , such as V1 can be represented as a combination of V0 and W0 as follows:

ψ ψ(t(t) Zkk) ψ (R)L

The function ψ(t)is known as the mother wavelet, the wavelet prototype or the wavelet function. The same properties, which apply to the scaling function, are also applicable to the

k

k

to the multiresolution theory and is called the multiresolution analysis equation.

Where the complementary space W0 is spanned also by an orthonormal basis:

wavelet function. In other words, a function Wf(t) 0 can be expressed as:

j

k

combination of the scaling function φ(2t) spanning the space V1 :

And as such any function f(t) of this space can be expressed as:

rewritten as:

space over k:

**4. Wavelet function** 

.k2b,2a <sup>j</sup> <sup>j</sup> (14)

<sup>φ</sup> <sup>φ</sup>(22(t) k)tj2j kj, (15)

f(t) c(k) <sup>φ</sup>(2 t k) (17)

WVV <sup>001</sup> (19)

2 <sup>k</sup> (20)

(18)

<sup>j</sup> (16)

Fig. 3. Nested subspaces

#### **3.2 Scaling function**

The existence of a so-called scaling function (t) is primordial in order to benefit from the multiresolution concept. In this context, let us define the scaling function first and then define the wavelet function through it (Burrus et al., 1998). Let the scaling function be defined by the following equation:

$$\mathbf{q}\_{\mathbf{k}}(\mathbf{t}) = \mathbf{q}(\mathbf{t} - \mathbf{k}) \qquad \mathbf{k} \in \mathbf{Z} \tag{9}$$

Which forms with its translates an orthonormal (The orthogonality is not necessary, since a non orthogonal basis (with the shift property) can always be orthogonalised (Sweldens, 1995)) basis of the space V0:

$$\mathbf{V}\_0 = \underset{\mathbf{k}}{\text{span}} \{ \mathbf{q}\_{\mathbf{k}}(\mathbf{t}) \} \tag{10}$$

This means that any function belonging to this space ( <sup>0</sup> f(t) V ) can be expressed as a linear combination of a set of so-called expansion coefficients, with the scaling function and its consecutive translates (since φ<sup>k</sup> (t) are the basis functions):

$$\mathbf{f(t)} = \sum\_{\mathbf{k}} \mathbf{c}\_{\mathbf{k}} \mathbf{q}\_{\mathbf{k}}(\mathbf{t}) = \sum\_{\mathbf{k}} \mathbf{c}(\mathbf{k}) \mathbf{p}(\mathbf{t} - \mathbf{k}) \tag{11}$$

Where the expansion coefficients kc (or c(k) ) are calculated using the inner product:

$$\mathbf{c}\_{\mathbf{k}} = <\mathbf{f}(\mathbf{t}) \,\mathrm{q}\_{\mathbf{k}}(\mathbf{t})>\tag{12}$$

By simply scaling and translating, a two-dimensional scaling function is generated from the original scaling function defined in equation (9):

$$\mathbf{q}\_{\rm j,k}\left(\mathbf{t}\right) = \frac{\mathbf{1}}{\sqrt{\mathbf{a}}} \mathbf{q}\left(\frac{\mathbf{t} - \mathbf{b}}{\mathbf{a}}\right) \tag{13}$$

Where a and b are, the scaling and the shifting factors as defined in equation (5), respectively. To ease the implementation of a wavelet system, the translation and the scaling factor have been adopted to be a factor of two. In fact (Graps, 1995):

*Vj*

The existence of a so-called scaling function (t) is primordial in order to benefit from the multiresolution concept. In this context, let us define the scaling function first and then define the wavelet function through it (Burrus et al., 1998). Let the scaling function be

<sup>2</sup> φk(t) φ(t k) k Z φ L (R) (9)

Which forms with its translates an orthonormal (The orthogonality is not necessary, since a non orthogonal basis (with the shift property) can always be orthogonalised (Sweldens,

> 0 k k

This means that any function belonging to this space ( <sup>0</sup> f(t) V ) can be expressed as a linear combination of a set of so-called expansion coefficients, with the scaling function and its

By simply scaling and translating, a two-dimensional scaling function is generated from the

Where a and b are, the scaling and the shifting factors as defined in equation (5), respectively. To ease the implementation of a wavelet system, the translation and the scaling

1 tb φ (t) φ( ) a a

k k k k

Where the expansion coefficients kc (or c(k) ) are calculated using the inner product:

j,k

factor have been adopted to be a factor of two. In fact (Graps, 1995):

consecutive translates (since φ<sup>k</sup> (t) are the basis functions):

original scaling function defined in equation (9):

V span{ φ (t)} (10)

f(t) c <sup>φ</sup> (t) c(k) <sup>φ</sup>(t k) (11)

k k c f(t), φ (t) (12)

(13)

*Vj-1*

*Vj+1*

Fig. 3. Nested subspaces

defined by the following equation:

1995)) basis of the space V0:

**3.2 Scaling function** 

$$\mathbf{a} = \mathbf{2}^{-\mathbf{j}} \quad , \quad \mathbf{b} = \mathbf{2}^{-\mathbf{j}} \mathbf{k} \tag{14}$$

These values are adopted for the remaining of the chapter. Thus equation (13) can be rewritten as:

$$\mathbf{q}\_{\mathbf{j},\mathbf{k}}(\mathbf{t}) = 2^{\mathbf{j}/2} \,\mathrm{q}(2^{\mathbf{j}}\mathbf{t} - \mathbf{k}) \tag{15}$$

Identically, the two-dimensional scaling function forms with its translates an orthonormal space over k:

$$\mathbf{V}\_{\mathbf{j}} = \underset{\mathbf{k}}{\text{span}} \{ \mathbf{q}\_{\mathbf{j},\mathbf{k}}(\mathbf{t}) \} \qquad \mathbf{k} \in \mathbf{Z} \quad \text{and} \quad \mathbf{j} \in \mathbf{Z} \tag{16}$$

And as such any function f(t) of this space can be expressed as:

$$\mathbf{f}(\mathbf{t}) = \sum\_{\mathbf{k}} \mathbf{c}(\mathbf{k}) \,\mathbf{q}(2^{\mathbf{j}}\mathbf{t} + \mathbf{k}) \tag{17}$$

As a consequence, if φ V0 (t) , then since VV <sup>10</sup> , φ(t) can be expressed as a linear combination of the scaling function φ(2t) spanning the space V1 :

$$\mathbf{q}(\mathbf{t}) = \sum\_{\mathbf{k}} \mathbf{h}(\mathbf{k}) \sqrt{2} \,\mathbf{q}(2\mathbf{t} - \mathbf{k})\tag{18}$$

Where the coefficients h(k) are the scaling function coefficients. The value 2 ensures that the norm of the scaling function is always equal to the unity. This equation is fundamental to the multiresolution theory and is called the multiresolution analysis equation.

### **4. Wavelet function**

What has been done so far to define the scaling function, its translates and the corresponding spanned spaces, can also be applied in the same way to the so-called wavelet function. Let us suppose for this purpose that the subspace V V 0 1 has an orthogonal complement W0 , such as V1 can be represented as a combination of V0 and W0 as follows:

$$\mathbf{V\_1 = V\_0 \oplus W\_0} \tag{19}$$

Where the complementary space W0 is spanned also by an orthonormal basis:

$$
\mathfrak{w}\_{\mathbf{k}}(\mathbf{t}) = \mathfrak{w}(\mathbf{t} - \mathbf{k}) \qquad \mathbf{k} \in \mathbf{Z} \tag{20}
$$

The function ψ(t)is known as the mother wavelet, the wavelet prototype or the wavelet function. The same properties, which apply to the scaling function, are also applicable to the wavelet function. In other words, a function Wf(t) 0 can be expressed as:

$$\mathbf{f}(\mathbf{t}) = \sum\_{\mathbf{k}} \mathbf{d}\_{\mathbf{k}} \,\,\upmu\mathbf{y}\_{\mathbf{k}}(\mathbf{t}) = \sum\_{\mathbf{k}} \mathbf{d}(\mathbf{k}) \boldsymbol{\upmu}(\mathbf{t} - \mathbf{k})\tag{21}$$

Where, the expansion coefficients dk (or d(k) ) are calculated using the inner product:

$$\mathbf{d}\_{\mathbf{k}} = <\mathbf{f}(\mathbf{t})\,\upmu\mathbf{p}\_{\mathbf{k}}(\mathbf{t})>\,\tag{22}$$

The Wavelet Transform for Image Processing Applications 403

According to equation (24), a function f(t) belonging to the <sup>2</sup> L (R) space can be expanded in series in terms of the scaling function spanning the space Vj and the wavelet functions

f(t) c (k)φ (t) d (k)ψ (t)

Where φj,k(t) is defined by equation (15) and ψn.k(t) is defined by equation (25). In this case, the index j, which is arbitrary, represents the coarsest scale, while the remaining are the high resolution details. Equation (27) represents the wavelet expansion series of the function f(t) , which plays a major role when deriving a more practical form of the wavelet transform.

The coefficients in the wavelet expansion series j c (k) and d (k) n (or k)c(j, and k)d(n, ) are the so-called discerete wavelet transform of the function f(t) . Since the basis functions are orthonormal, they can be calculated using equations (12 and 22), respectively. We will see later in this chapter that the orthonormality condition can be relaxed allowing the

In general, wavelet transform-based applications involve discrete coefficients instead of scaling and/or wavelet functions. For practical and computational reasons, discrete time filter banks are required. Such structures decompose a signal into a coarse representation along with added details. To achieve this representation, the relationship between the expansion coefficients at lower and higher scale levels need to be defined. This can be easily done by using a scaled and shifted version of equation (18) along with simple

<sup>j</sup> 1j (k)c (n)2k)ch(n (28)

implementation of another important basis, namely, the biorthogonal basis.

transformations as reported in (Burrus et al., 1998). This relation is defined by:

n

j j,k nj k n n.k

(27)

Scale

Fig. 5. Dyadic wavelet transform space representation

**5. Series expansions and Discrete Wavelet Transforms** 

spanning the spaces W , W , W ,...., W , W .... j j1 j2 0 1 as follows:

k

**6. Filter banks and wavelet implementations** 

Time

Likewise, since VW <sup>10</sup> , ψ(t)can also be expressed in terms of the scaling function φ(2t) of the higher space V1 :

$$\mathbf{u}\boldsymbol{\upmu}(\mathbf{t}) = \sum\_{\mathbf{k}} \mathbf{g}(\mathbf{k}) \sqrt{2} \,\mathbf{q}(2\mathbf{t} - \mathbf{k})\tag{23}$$

Where g(k) are the wavelet coefficients. This leads to a dyadic decomposition as represented by the grid of Figure 5. The equation (19) can be generalised to an arbitrary number of subspaces, such as, V2 is represented in terms of V1 and W<sup>1</sup> , V3 in terms of V2 and W2 , and so on. The whole decomposition process is illustrated in Figure 4.

Fig. 4. Space decomposition

More generally, a subspace Vj is spanned by W1j and V 1j . Thus, the (R)L <sup>2</sup> space can be decomposed as follows:

$$\text{L}^{2}\text{(R)} = \text{V}\_{\text{j}} \oplus \text{W}\_{\text{j}} \oplus \text{W}\_{\text{j}+1} \oplus \text{W}\_{\text{j}+2} \oplus \dots \text{W}\_{\text{0}} \oplus \text{W}\_{1} \dots \tag{24}$$

The index j represents the depth or the level of decomposition, which is arbitrary in this case. As for the scaling function, a two-dimensional scaled and translated wavelet function is defined as:

$$
\hbar \boldsymbol{\mu}\_{\boldsymbol{\text{j}},\boldsymbol{k}}(\mathbf{t}) = 2^{\mathbf{j}/2} \,\,\upmu(2^{\mathbf{j}}\mathbf{t} - \mathbf{k})\tag{25}
$$

In such way that:

$$\mathcal{W}\_{\mathbf{j}} = \operatorname\*{span}\_{\mathbf{k}}\left\{\boldsymbol{\upmu}\_{\mathbf{j}\mathbf{i},\mathbf{k}}(\mathbf{t})\right\}\tag{26}$$

df(t) ψ (t) ψ(td(k) k)

Likewise, since VW <sup>10</sup> , ψ(t)can also be expressed in terms of the scaling function φ(2t) of

ψ(t) φ(2t2g(k) k)

Where g(k) are the wavelet coefficients. This leads to a dyadic decomposition as represented by the grid of Figure 5. The equation (19) can be generalised to an arbitrary number of subspaces, such as, V2 is represented in terms of V1 and W<sup>1</sup> , V3 in terms of V2 and W2 , and

**V- 2 V- 1 V0 V1**

The index j represents the depth or the level of decomposition, which is arbitrary in this case. As for the scaling function, a two-dimensional scaled and translated wavelet function

> {spanW ψ (t)} kji, k

More generally, a subspace Vj is spanned by W1j and V 1j . Thus, the (R)L

**W- 2 W- 1 W0 W1**

<sup>2</sup> WWWV(R)L 2j1jjj <sup>10</sup> ....W....W (24)

j2 j <sup>ψ</sup>j,k (t) 2 <sup>ψ</sup>(2 t k) (25)

<sup>j</sup> (26)

k

so on. The whole decomposition process is illustrated in Figure 4.

k

Where, the expansion coefficients dk (or d(k) ) are calculated using the inner product:

k

the higher space V1 :

Fig. 4. Space decomposition

decomposed as follows:

is defined as:

In such way that:

k

<sup>k</sup> (21)

<sup>k</sup> f(t),d <sup>ψ</sup>k(t) . (22)

(23)

<sup>2</sup> space can be

Fig. 5. Dyadic wavelet transform space representation

#### **5. Series expansions and Discrete Wavelet Transforms**

According to equation (24), a function f(t) belonging to the <sup>2</sup> L (R) space can be expanded in series in terms of the scaling function spanning the space Vj and the wavelet functions spanning the spaces W , W , W ,...., W , W .... j j1 j2 0 1 as follows:

$$\mathbf{f(t) = \sum\_{\mathbf{k}} c\_j(\mathbf{k}) \boldsymbol{\uprho}\_{j,\mathbf{k}}(\mathbf{t}) + \sum\_{\mathbf{n} = \mathbf{j}}^{+\circ} \sum\_{\mathbf{k} = -\circ}^{+\circ} \mathbf{d\_n(\mathbf{k})} \boldsymbol{\uprho}\_{n\mathbf{k}}(\mathbf{t}) \tag{27}$$

Where φj,k(t) is defined by equation (15) and ψn.k(t) is defined by equation (25). In this case, the index j, which is arbitrary, represents the coarsest scale, while the remaining are the high resolution details. Equation (27) represents the wavelet expansion series of the function f(t) , which plays a major role when deriving a more practical form of the wavelet transform.

The coefficients in the wavelet expansion series j c (k) and d (k) n (or k)c(j, and k)d(n, ) are

the so-called discerete wavelet transform of the function f(t) . Since the basis functions are orthonormal, they can be calculated using equations (12 and 22), respectively. We will see later in this chapter that the orthonormality condition can be relaxed allowing the implementation of another important basis, namely, the biorthogonal basis.

#### **6. Filter banks and wavelet implementations**

In general, wavelet transform-based applications involve discrete coefficients instead of scaling and/or wavelet functions. For practical and computational reasons, discrete time filter banks are required. Such structures decompose a signal into a coarse representation along with added details. To achieve this representation, the relationship between the expansion coefficients at lower and higher scale levels need to be defined. This can be easily done by using a scaled and shifted version of equation (18) along with simple transformations as reported in (Burrus et al., 1998). This relation is defined by:

$$\mathbf{c}\_{\mathbf{j}}(\mathbf{k}) = \sum\_{\mathbf{n}} \mathbf{h}(\mathbf{n} - 2\mathbf{k}) \mathbf{c}\_{\mathbf{j}+1}(\mathbf{n}) \tag{28}$$

And

$$\mathbf{d}\_{\mathbf{j}}(\mathbf{k}) = \sum\_{\mathbf{n}} \mathbf{g}(\mathbf{n} - 2\mathbf{k}) \mathbf{c}\_{\mathbf{j}+1}(\mathbf{n}) \tag{29}$$

The Wavelet Transform for Image Processing Applications 405

At each stage, the spectrum frequency of the analysed signal is halved by a factor of two.

To recover the original signal from the previously analysed one, a reversed version of the analysis filter bank of Figure 6 is required. This can be achieved by using two basic operations: a filtering and an up sampling or interpolating process. In multirate digital signal processing, appending a zero sample between two consecutive samples performs the up sampling. Thus, for each input sample, we get two output samples. A three-stage

*g*

**2**

+

**7. Algorithms for Wavelet Transform computation** 

*cj-1*

**2**

1st Subband 2nd Subband 3rd Subband

wavelet transforms. We focus on both 1-Dimensional and 2-Dimensional systems.

*h*

This section is concerned with a review of variety of algorithms dedicated to implement

*g*

+

*cj+1*

**2**

+

*cj*

**2**

*h*

This leads to a logarithmic set of bandwidths as illustrated by Figure 8.

Fig. 8. Frequency Spectrum of a three-stage Subband Structure

synthesis subband coding is illustrated in Figure 9.

*g*

**2**

**2**

*dj dj-1 dj-2*

*cj-2*

*h*

Fig. 9. Three-Stage synthesis Subband Coding

Where Zn and Z k . The computation of such equations is achieved through the use of the well-established digital filtering theory. In particular, for finite length signals (which is the case for digital images), the use of a Finite Impulse Response filter (FIR) is the most appropriate choice. However, since equations (28 and 29) compute one output for each two consecutive inputs, a modification needs to be made. The basic operation required here, is derived from the multirate signal processing theory (Fliege, 1994; Hankerson et al., 2005; Cunha et al., 2006; Lu & Do, 2007; Nguyen & Oraintara, 2008 & Brislawn, 2010). It simply consists of using a down-sampler or decimator by a factor of two. In practice, it consists of applying a pair of FIR filters; each followed by a decimator as illustrated by Figure 6:

Fig. 6. Analysis Filter Bank

The filter bank is defined as a combination of a low pass filter and high pass filter, both followed by a factor of two decimation (Strang & Nguyen, 1996). Thus, the decomposition is reduced to two basic operations from the digital signal processing theory: a filtering and a down sampling.

The structure in Figure 6 is generally used to implement Mallat's algorithm. To allow further level of decomposition, identical stages are cascaded leading to a multiresolution analysis. This analysis scheme is known as the Subband Coding structure (Burrus et al., 1998) and is illustrated in the following figure.

Fig. 7. Three-Stage analysis Subband Coding

Where Zn and Z k . The computation of such equations is achieved through the use of the well-established digital filtering theory. In particular, for finite length signals (which is the case for digital images), the use of a Finite Impulse Response filter (FIR) is the most appropriate choice. However, since equations (28 and 29) compute one output for each two consecutive inputs, a modification needs to be made. The basic operation required here, is derived from the multirate signal processing theory (Fliege, 1994; Hankerson et al., 2005; Cunha et al., 2006; Lu & Do, 2007; Nguyen & Oraintara, 2008 & Brislawn, 2010). It simply consists of using a down-sampler or decimator by a factor of two. In practice, it consists of

<sup>j</sup> 1j (k)d (n)2k)cg(n (29)

*cj*

*dj*

*h*

*cj-1 cj-2*

**2**

*dj dj-1 dj-2*

*g*

n

applying a pair of FIR filters; each followed by a decimator as illustrated by Figure 6:

*g(n)*

*j+1*

1998) and is illustrated in the following figure.

**2**

*cj*

**2**

*h*

*g*

Fig. 7. Three-Stage analysis Subband Coding

Fig. 6. Analysis Filter Bank

down sampling.

**2**

**2**

*h(n)*

The filter bank is defined as a combination of a low pass filter and high pass filter, both followed by a factor of two decimation (Strang & Nguyen, 1996). Thus, the decomposition is reduced to two basic operations from the digital signal processing theory: a filtering and a

The structure in Figure 6 is generally used to implement Mallat's algorithm. To allow further level of decomposition, identical stages are cascaded leading to a multiresolution analysis. This analysis scheme is known as the Subband Coding structure (Burrus et al.,

*h*

**2**

**2**

*g*

1st Subband 2nd Subband 3rd Subband

**<sup>2</sup>** *cj+1*

And

At each stage, the spectrum frequency of the analysed signal is halved by a factor of two. This leads to a logarithmic set of bandwidths as illustrated by Figure 8.

Fig. 8. Frequency Spectrum of a three-stage Subband Structure

To recover the original signal from the previously analysed one, a reversed version of the analysis filter bank of Figure 6 is required. This can be achieved by using two basic operations: a filtering and an up sampling or interpolating process. In multirate digital signal processing, appending a zero sample between two consecutive samples performs the up sampling. Thus, for each input sample, we get two output samples. A three-stage synthesis subband coding is illustrated in Figure 9.

Fig. 9. Three-Stage synthesis Subband Coding
