Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 12

Wavelets and Signal Processing

Two Dimensional Discrete Wavelet Transform

Azar 83

1. Introduction. Application of wavelet transform in image processing is one of the


active areas in wavelet studies. Two dimensional wavelet transform can be considered as
an extension of 1D wavelet transform. M dimensional wavelet transform is a natural
extension of 2D wavelet transform. It is applied in problems such as system modeling
used in control systems and construction of autoregressive models.

For 2D wavelet transform, we consider separable wavelet basis to decompose the image
as follows.
A separable wavelet basis of L2 R 2 space is constructed using tensor product of a
~
~
scaling function and a wavelet function . Consider , and
and
as two

dual pairs of scaling and wavelet functions in a biorthogonal wavelet transform in L2 R


. Accordingly, three wavelet functions can be defined for the decomposition stage as the
product of scaling and wavelet functions , as follows:

1 x, y x y ,

2 x, y x y and

3 x, y x y

(1)

Similarly the dual wavelets of 1 , 2 and 3 for a biorthogonal analysis of the image
acan be written as:

~ 1 x, y ~ x ~ y ,

~ 2 x, y ~ x ~ y and

~ 3 x, y ~ x ~ y (2)

One can verify that in a general case when basis functions are indexed according to scale
j, translation m and frequency band n (as done in wavelet packet), orthogoanilty is
maintained between the bases. For example the basis function as given below

1
j ,n,m

x, y , 2j ,n,m x, y , 3j ,n ,m x, y , j ,n ,m Z

and

1
j ,n,m

x, y ,~ 2j ,n,m x, y ,~ 3j ,n ,m x, y , j ,n ,m Z

are biorthogonal bases of L2 R 2 .


In case of orthonormal bases, it is easy to see that two-dimensional separable orthonormal
basis, can be considered as a special case of biorthogonal basis if we start with
orthonormal one dimensional bases i.e. scaling function and wavelet function .
The reason biorthogonal wavelets are often used in image analysis is due to human
visual system where they are more tolerant of symmetric errors than asymmetric ones, it
is desirable that wavelet and scaling functions be symmetric. However, unfortunately,
orthogonality and symmetry conflicts with each other in the design of filter banks. Note
in symmetric biorthogonal wavelets scaling function is symmetric, wavelet function is
anti-symmetric.
For a 2D biorthogonal discrete wavelet transform (DWT), a real-valued image is
represented in terms of translation and dilations of a scaling function and a wavelet
functions, the same as in 1D DWT. The scaling and wavelet coefficients can be easily
computed using a 2D filter bank composed of lowpass and highpass filters and
decimators (downsampling). The 2D wavelet and scaling functions provide an

orthogonall basis for 2D images. Therefore, every image has a unique representation in
the wavelet-domain.
At each scale, an image f(x,y) is decomposed into an approximation image a j of a
x
y
xy
lowpass band, and and three detail images d j , d j , d j corresponding to a horizontal
x
y
xy
highpass band d j , a vertical highpass band d j , and a highpass band d j as given
below
a j ( x, y )

f ( x, y ), j ( x ) j ( y )

d jx ( x, y )

f ( x, y ), j ( x ) j ( y )

d ( x, y )

f ( x, y ), j ( x ) j ( y )

y
j

d jxy ( x, y )

f ( x, y ), j ( x ) j ( y )

Due to downsampling of the coefficients, the size of the image at lower level is half of
that of the higher level.

In two dimensional image analysis, the three wavelets


1 x, y x y ,

2 x, y x y and

3 x, y x y

extract image details at different scales and orientations(Fig.1). At each scale, we end up
with three detail images:

One is low-pass filtered in the x-direction and high-pass filtered in the y direction
1 x, y x y , yielding detail Dx

one is low-pass filtered in the y direction and high-pass filtered in the x direction
2 x, y x y yielding detail Dy

and, finally

one is high-pass filtered in both x and y directions


yielding detail Dxy.

So, we have three orientations for details:

3 x, y x y

horizontal,

vertical and

diagonal

Figure 1 shows detail sub-images at the three orientations..

I2

D 2x
D1x

D 2y

D 2xy

D1xy

D1y

Fig.1 Components of decomposed image, three details and one approximation at


each scale
I m-1

Im

Im

~
H

D my

D my

~
G

D mx

D mx

~
H

D mxy

D mxy

~
G

~
H

~
G

I m-1

Fig.2 Block diagram of two-dimensional Fast Wavelet Transform


x : down-sampling

along rows,

: down-sampling along columns

2. Fast Two-Dimensional Discrete Wavelet Transform


FWT used in one dimension can be extended to two dimensional wavelet transform. A
separable two-dimensional convolution can be factored into one-dimensional
convolutions along the rows and columns of the image. With the factorization shown in
Fig.2, the four two-dimensional convolutions are computed with only six groups of onedimensional convolutions. The rows of I m 1 are first convolved with h and g and subsampled by 2. The columns of these two output images are then convolved respectively
with h and g and sub-sampled, which gives four sub-sampled images I m , Dmy , Dmx and
Dmxy . The wavelet image representation of I 0 is composed of 3 J 1 sub-images:

I , I
J

x
j

, I jy , I xy
j

1 j J

that are computed by iterating for 0 j J where J is the maximum scale determined by
highest frequency content of a given signal.

The four separable convolutions of the reconstruction can also be factored into six groups
of one-dimensional convolutions along rows and columns, illustrated in Fig.2. The
original image I 0 is recovered from the wavelet representation by iterating for J j 0 .

3. Translation Invariancy in Continuous Wavelet Transform and Extension to


Dyadic Discrete Wavelet Transform
The continuous wavelet transform of a function f(t) can be written as a convolution
product of a function f(t) with the scaled and translated wavelet as follows.

Wf b, s

f t

1 t b

dt f s b
s s

s t

with

(3)

where s is scale factor and u denotes translation. As can be seen, CWT is translation
invariant.
To construct a wavelet frame, the scale s is sampled along an exponential sequence
{a j } jZ with a sufficiently small dilation step determined by a, (i.e. scale s is not an
j
arbitrary scalar but assumes only a set of values given by {a } jZ ). However, time

translation b at scale j is sampled uniformly with intervals proportional to the scale


parameter a j as given below.

j ,n t

1
aj

t nb0 a j
aj

Translation factor bo is scalar and n is an integer. This sampling grid removes the
translation invariance, because the translation factor

is apriori not equal to the grid

interval. To construct a translation invariant standard discrete wavelet transform(DWT),


the scale s is discretized but not the translation parameter b. The scale is sampled along a
j
dyadic sequence 2 jZ to simplify the numerical calculations. Now for the scale factor

2
j

jZ

, fast computations with filter banks are available. Accordingly the dyadic

wavelet transform of f L2 R is defined by:


Wf b,2 j

f t

1
2

t b
dt f 2 j b ,
j
2

(4)

2j t 2j t

with

1
2j

t
.
j
2

It can be proved that if the frequency axis is completely covered by dilated dyadic
wavelets, then it defines a complete and stable presentation.

4. One Dimensional and 2D Dyadic Wavelet Transform


We first discuss briefly one dimensional dyadic discrete wavelet transform and extend it
to 2D transform.
A comparison of standard DWT and Dyadic DWT can be made by observing the
corresponding wavelet function at scale j and translation as follow1
For DWT:

jk(t)=2-j/2(2-jt-k)= 2-j/2[2 -j(t-2jk)]

For Dyadic DWT jk(t)= 2-j/2(2-jt-2-jk) =2-j/2[2-j(t-k)]


As can be seen, in DDWT, translation are uniform for all scales while for DWT
translation, they are scale dependent as shown in phase diagram(Fig.3) 2. Uniform
translation at all scales results in identical number of wavelets at all scales. This is
equivalent by removal of downsampling as shown in Fig 3.
We note when decimation of DWT is removed, signal decomposition is not anymore an
orthogonal expansion but it is a redundant expansion where at each stage the length of the
outputs i.e. the length of details and approximations is each N and thus doubling of signal
length in each stage. Under a nondcimated DWT, after the first stage, signal information
will be distributed across details and approximations of length N each (rather than N/2 as
in standard DWT) and a total of 2N length signal will be obtained after the 1 st stage. Thus
1

Note here we have used alternative form of scale parameter of wavelet function i.e. 2-j instead of 2j as
used often in class notes. This is to maintain consistency with definition used for

Circle indicates the centeroid of wavelets. Note number of wavelets remain the same at different
scales for DDWT
2

there will be a redundancy of information at the outputs. Coefficient lengths will also be
identical at each of the stages j=0,1,2,3, and thus providing a useful redundancy in signal
reconstruction( Fig.4).

Highest scale Jmax


sampled points

Standard DWT

Dyadic DWT

Fig.3 Phase plane Representation of DWT and DDWT

Signal

high pass
h
g(k)

d1
N
g(k)

low pass
h(k)

d2
N

a1 N
g(k)
h(k)

h(k)
Signal length N

at the end of 1st stage:N+N

d3 N

a2 N

2nd stage:N+N+N

a3 N

3rd stage:N+N+N+N

Fig. 4. Block Diagram of Signal Decomposition in Non- Decimated DWT


As can be seen, number of translations in DDWT at each scale remains the same as in the
highest scale corresponding to number of sampled points. This is not the case in DWT

where number of translation is reduced by half as we move towards low frequency bands.
Note, wavelet function are the same for both of DWT and DDWT where the support of
these functions double as we move to lower scales as shown below(Fig.5).

Scale Jmax

Scale Jmax -1

DWT

DDWT

Fig.5 Illustration of wavelet functions at two different scales for DWT and DDWT

As shown in DDWT, at the scale below the highest scale, uniform translation of the
wavelet introduces redundancy that is suitable for translation invariancy, edge detection
and noise reduction.

5. Two Dimensional Redundant Dyadic Discrete Wavelet Transform


In two dimensions, a dyadic wavelet transform is computed with wavelets

x, y
k

1 k K

, which often have different spatial orientations k=1,2,3. We denote:

2k j x, y

1 k x y
j, j
2j
2 2

k
k
and 2 j 2 j x, y , k=1,2,3

The wavelet transform of 2D function f (x,y) in direction k is defined by


W k f u , v,2 j f x, y , 2k j x u, y v f 2kj u , v , k=1,2,3

Block diagram of a 2D image analysis using DDWT in frequency domain for an


expansion and reconstruction phases in two direction x and y only, is given below. As
can be seen, only two high pass filters G( x) and G(y) are used here ( instead of three
including G(xy) ) where translation invariance feature of DDWT enables to capture
image edge information more efficiently . As shown, for the second stage, filters G(2 x)
and G(2y) and H(2x)H(2y) are used since decomposition is carried-out for image at
the lower half of the frequency band as done in one dimensional DWT. Filters for
synthesis stage are derived from the orthogonality/biorthogonality condition as done in
one dimensional case.

G x

K x L y

G y

K y L x

H x H y

G 2 x

K 2 x L 2 y

G 2 y

K 2 y L 2 x

H 2 x H 2 y

H x H y

H 2 x H 2 y

Fig.6 Block diagram of Fast Discrete Dyadic Wavelet Transform

Below is an example of filter coefficients used in DDWT constructed from derivative of


spline function as suggested by Mallat for edge detection applications.

10

n
-3
-2
-1
0
1
2
3

K
L
0.0078125 0.0078125
0.054685
0.046875
0.125
0.171875 0.1171875
0.375 -2.0 -0.171875
0.65625
0.375 2.0 -0.054685 0.1171875
0.125
-0.0078125 0.046875
0.0078125

Table 1
Finite Impulse Response of the filters H,G,K and L that correspond to
the Quadratic Spline Wavelet of figure *

Second Method for Constructing Redundant Transform. The decomoposition procedure


is different from previous method in that the scaling of the wavelet is not achieved by
subsampling of the image in each step, but rather by a upsampling of the filters.
Redundant wavelet transform has more opportunity to give good match between a given
spanning function and the signal.
Assume f(x,y) is a given image of size M*N. At scale j=0, it is S 0 f f ( x, y ) .
Redundant wavelet transform at scale j decomposes f(x,y) into three wavelet subbands:
An approximation band

S j f ( x, y ) f j ( x , y ) ,

a horizontal detail band

W j1 f ( x, y ) f 1j ( x, y )

2
2
and a vertical detail band W j f ( x, y ) f j ( x, y ) .

j ( x, y ) is scaling function and 1j ( x, y ) , 2j ( x, y ) are horizontal and vertical wavelet

functions. By using filter bank structure , the redundant wavelet transform assumes the
following from.

11

Figure 7: redundant wavelet transform


6. Wavelet Packet Decomposition of an Image
Wavelet packet decomposition of an image is an extension of 1D wavelet packet in which
binary tree is replaced with a tree as follows. Relationship between node basis functions
are the same as for 1D case except that the proper filter coefficients are to be used in the
relations. The equations follow the same as used in filter bank structure shown in Fig.2 in
which for each direction two relations in tandem with each other and down-sampling are
to be considered. Decomposition tree is shown below. Decomposition of a1 is sown only.
Image I

a1
d1

d2

d3

Fig.8 Decomposition tree of wavelet packet for an image

Second example of the filter coefficients for a 2D image analysis. H lowpass and G highpass filter.
When j=0, they are:
H0=[-0.000423989,0.00110237, -0.00404203, 0.0363783, 0.254648,0.424413, 0.254648, 0.0363783, -0.00404203,
0.00110237, -0.000423989];
G0=[-0.000225, -0.030372, -0.664695,-2.053328, 2.053328, 0.664695, 0.030372, 0.000225];

12

You might also like