12
* Corresponding author. Tel.: #64-7994823; fax: #65-7912687; e-mail: egbi@ntu.edu.sg Signal Processing 74 (1999) 297308 Fast algorithms for the 2-D discrete W transform Guoan Bi* School of Electrical and Electronic Engineering, Block S1, Nanyang Technological University, Singapore 639798, Singapore Received 23 March 1998; received in revised form 27 October 1998 Abstract New fast algorithms are proposed for the two-dimensional type-II, -III and -IV discrete W transform. Detailed procedures of decomposition are given for the two-dimensional W transform. The proposed algorithms belong to the radix-category and have a regular computational structure to achieve desirable properties such as regular data indexing and in-place computation, which effectively minimizes the overall computation and implementation costs. In comparison with the rowcolumn algorithm, significant savings on the number of arithmetic operations can be achieved. However, the proposed algorithms need a few more operations than those used by the polynomial transform algorithm. ( 1999 Elsevier Science B.V. All rights reserved. Zusammenfassung Wir stellen neue schnelle Algorithmen zur Berechnung der zweidimensionalen Typ-II, -III, und -IV diskreten W-Transformation vor. Wir geben detaillierte Verfahren fu¨r die zwei-dimensionale W-Transformation an. Die vorge- schlagenen Algorithmen geho¨ ren der Radix-Kategorie an und haben eine regula¨ re Berechnungsstruktur. Diese Eigen- schaft ermo¨ glicht eine geordnete Datenindizierung und in-place Berechnungen, was den gesamten Rechenaufwand und den Implementierungsaufwand minimiert. Im Vergleich zum ZeilenSpalten Algorithmus ko¨ nnen signifikante Einsparungen in der Anzahl der arithmetischen Operationen erzielt werden. Die vorgeschlagenen Algorithmen brauchen jedoch einige wenige Operationen mehr als polynomial transform Algorithmen. ( 1999 Elsevier Science B.V. All rights reserved. Re´ sume´ Nous proposons de nouveaux algorithmes rapides pour les transformations en ondelettes discre` tes de type II, III et IV. Nous donnons les proce´ dures de´ taille´ es de de´ composition pour la transformation en ondelettes en deux dimensions. Les algorithmespropose´s appartiennent a` la cate´gorie radix et ont une structure de calcul re´gulie`re, permettant d’atteindre des proprie´te´s souhaitables comme l’indexage re´gulier des donne´es et le calcul en place, ce qui minimise efficacement les couˆ ts de calcul et d’imple´mentation. En comparaison avec l’algorithme en lignescolonnes, des e´conomies significatives peuvent eˆ tre re´alise´ es sur le nombre d’ope´rations arithme´ tiques. Cependant, les algorithmes propose´ s ne´cessitent un peu plus d’ope´rations que celles utilise´es par l’algorithme de transformation polynomiale. ( 1999 Elsevier Science B.V. All rights reserved. Keywords: Discrete Fourier transform; Generalized Hartley transform; Discrete W transform 0165-1684/99/$ see front matter ( 1999 Elsevier Science B.V. All rights reserved. PII: S 0 1 6 5 - 1 6 8 4 ( 9 8 ) 0 0 2 1 7 - 5

Fast algorithms for the 2-D discrete W transform

Embed Size (px)

Citation preview

*Corresponding author. Tel.: #64-7994823; fax: #65-7912687; e-mail: [email protected]

Signal Processing 74 (1999) 297—308

Fast algorithms for the 2-D discrete W transform

Guoan Bi*

School of Electrical and Electronic Engineering, Block S1, Nanyang Technological University, Singapore 639798, Singapore

Received 23 March 1998; received in revised form 27 October 1998

Abstract

New fast algorithms are proposed for the two-dimensional type-II, -III and -IV discrete W transform. Detailedprocedures of decomposition are given for the two-dimensional W transform. The proposed algorithms belong to theradix-category and have a regular computational structure to achieve desirable properties such as regular data indexingand in-place computation, which effectively minimizes the overall computation and implementation costs. In comparisonwith the row—column algorithm, significant savings on the number of arithmetic operations can be achieved. However,the proposed algorithms need a few more operations than those used by the polynomial transform algorithm. ( 1999Elsevier Science B.V. All rights reserved.

Zusammenfassung

Wir stellen neue schnelle Algorithmen zur Berechnung der zweidimensionalen Typ-II, -III, und -IV diskretenW-Transformation vor. Wir geben detaillierte Verfahren fur die zwei-dimensionale W-Transformation an. Die vorge-schlagenen Algorithmen gehoren der Radix-Kategorie an und haben eine regulare Berechnungsstruktur. Diese Eigen-schaft ermoglicht eine geordnete Datenindizierung und in-place Berechnungen, was den gesamten Rechenaufwand und denImplementierungsaufwand minimiert. Im Vergleich zum Zeilen—Spalten Algorithmus konnen signifikante Einsparungen inder Anzahl der arithmetischen Operationen erzielt werden. Die vorgeschlagenen Algorithmen brauchen jedoch einigewenige Operationen mehr als polynomial transform Algorithmen. ( 1999 Elsevier Science B.V. All rights reserved.

Resume

Nous proposons de nouveaux algorithmes rapides pour les transformations en ondelettes discretes de type II, III et IV.Nous donnons les procedures detaillees de decomposition pour la transformation en ondelettes en deux dimensions. Lesalgorithmes proposes appartiennent a la categorie radix et ont une structure de calcul reguliere, permettant d’atteindredes proprietes souhaitables comme l’indexage regulier des donnees et le calcul en place, ce qui minimise efficacement lescouts de calcul et d’implementation. En comparaison avec l’algorithme en lignes—colonnes, des economies significativespeuvent etre realisees sur le nombre d’operations arithmetiques. Cependant, les algorithmes proposes necessitent un peuplus d’operations que celles utilisees par l’algorithme de transformation polynomiale. ( 1999 Elsevier Science B.V. Allrights reserved.

Keywords: Discrete Fourier transform; Generalized Hartley transform; Discrete W transform

0165-1684/99/$ — see front matter ( 1999 Elsevier Science B.V. All rights reserved.PII: S 0 1 6 5 - 1 6 8 4 ( 9 8 ) 0 0 2 1 7 - 5

1. Introduction

Image transforms play an important role in digital image processing as a theoretical and implementationaltool for numerous applications, notably in digital image filtering, restoration, encoding and analysis. Inparticular, the multi-dimensional discrete Fourier transform (DFT) has been a highly accepted tool forfrequency analysis ([4,7—9] for example). To deal with real sequences, however, the DFT is not the best choicesince complex operations are required. An alternative, the discrete W transform (DWT), is particularly usefulfor real input sequences [3,5]. The DWT is also known as the general discrete Hartley transform (GDHT) ifdifferences in constant scaling factors used in the definition of DWT and the GDHT are ignored [10].Dedicated processors with a large memory space may be needed for such applications because thecomputational complexity becomes prohibitive for processing tasks of more than one dimension.

A general theoretical framework [2] was reported to convert the multi-dimensional DHT successively intothe one-dimensional Fourier transform. The computational complexity is equivalent to that required by therow—column method for computation of the multi-dimensional transform. Fast algorithms for two-dimen-sional type-II and -III DWTs were reported to reduce the computational complexity [6,11]. They were basedon decomposing the multi-dimensional DWT into lower dimensional computations. It was also shown thatby using the polynomial transform the r-dimensional type-II and -III DWT can be decomposed into an(r!1)-dimensional polynomial transform and one-dimensional DWT. Substantial reduction of the com-putational complexity in the number of additions and multiplications was achieved compared to that neededin [2]. However, such an algorithm needs a process to reorder the input sequence for the conversion processand to reorder the coefficients of the (r!1)-dimensional polynomial transform to obtain the final transformoutputs. Such a reordering process requires a large portion of the overall computation time and memoryspace. The overhead in computational time and implementation complexity becomes heavy for higherdimensional data processing. In [11], the Diophantine index equation between the input index and theoutput index must be solved to convert the general two-dimensional DHT into N one-dimensional length-Ntype-II DHTs. Similar to that in [11], this approach also requires a data reordering process. Although thealgorithms in [2,6,11] can be used to reduce the computational complexity, they have a common drawbackof irregular computational structure which prevents further reduction of the overall processing costs.

In the literature, many fast algorithms have been proposed for various transforms such as the discreteFourier transform, the discrete cosine transform and the discrete Hartley transform. In particular, theradix-type fast algorithms [1,5] for these transforms have been popular because they require a balancedcomputational complexity and a regular computational structure. In particular, desirable features such assimple-data indexing by using bit-reversal techniques and in-place computation are critical for minimizingthe overall implementation and computation costs. Because the computational complexity for the multi-dimensional DWT is prohibitive, developing radix-type algorithms is extremely important. To the author’sknowledge, however, such algorithms for the 2-D DWT have not been reported in the literature.

This paper proposes new radix-type algorithms for the type-II, -III and -IV DWT. Rather than decompo-sing the multi-dimensional DWT into lower dimensional computation, the proposed algorithms decomposethe whole computation task into a number of smaller ones. In general, the decomposition approaches can beused for DWT of any dimension. For simplicity of presentation, the decomposition approaches areillustrated by two-dimensional DWT computations. Comparisons show that our algorithms are simpler instructure and possess all the desirable properties that are achievable from the radix-type algorithms.

For clarity, we restate the definition of the type-II, -III and -IV 2-D DWTs of a real-valued sequencex(n

1,n

2), 0)n

1)N

1!1, 0)n

2)N

2!1 as

XII(k

1,k

2)"

N1~1+

n1/0

N2~1+

n2/0

x(n1,n

2) casA

p(2n1#1)k

1N

1

#

p(2n2#1)k

2N

2B, (1)

298 G. Bi / Signal Processing 74 (1999) 297—308

XIII(k

1,k

2)"

N1~1+

n1/0

N2~1+

n2/0

x(n1,n

2) casA

pn1(2k

1#1)

N1

#

pn2(2k

2#1)

N2

B, (2)

XIV

(k1,k

2)"

N1~1+

n1/0

N2~1+

n2/0

x(n1,n

2) casA

p(2n1#1)(2k

1#1)

2N1

#

p(2n2#1)(2k

2#1)

2N2

B, (3)

where cas( )"cos( )#sin( ), the subscripts II, III, IV indicate the type-II, -III and -IV DWT, respectively,and N

1and N

2are powers of two which are not necessarily the same.

2. Algorithms for the type-II DWT

If both N1

and N2

are even, Eq. (1) can be decomposed into

X(2k1,2k

2)"

N1@2~1+

n1/0

N2@2~1+

n2/0

y0(n

1,n

2) casA

p(2n1#1)k

1N

1/2

#

p(2n2#1)k

2N

2/2 B, (4)

X(2k1,2k

2#1)"

N1@2~1+

n1/0

N2@2~1+

n2/0

y1(n

1,n

2) casA

p(2n1#1)k

1N

1/2

#

p(2n2#1)(2k

2#1)

2(N2/2) B, (5)

X(2k1#1,2k

2)"

N1@2~1+

n1/0

N2@2~1+

n2/0

y2(n

1,n

2) casA

p(2n1#1)(2k

1#1)

2(N1/2)

#

p(2n2#1)k

2N

2/2 B, (6)

X(2k1#1,2k

2#1)"

N1@2~1+

n1/0

N2@2~1+

n2/0

y3(n

1,n

2) casA

p(2n1#1)(2k

1#1)

2(N1/2)

#

p(2n2#1)(2k

2#1)

2(N2/2) B, (7)

where the input sequences for Eqs. (4)—(7) are

Cy0(n

1,n

2)

y1(n

1,n

2)

y2(n

1,n

2)

y3(n

1,n

2)D C

1 1 1 1

1 1 !1 !1

1 !1 1 !1

1 !1 !1 1 D Cx(n

1,n

2)

x(n1#N

1/2,n

2)

x(n1,n

2#N

2/2)

x(n1#N

1/2,n

2#N

2/2)D . (8)

According to their indices, Eqs. (4)—(7) are known as the type II even—even, even—odd, odd—even and odd—oddsequences, respectively. The even—even sequence is the N

1/2]N

2/2 type-II DWT, and the odd—odd sequence

is the N1/2]N

2/2 type-IV DWT. In the rest of this section, decomposition of the even—odd and odd—even

sequences is considered. Computation of the odd—odd sequence is considered in the next section.

2.1. The type-II even—odd sequence

For simplicity, let us formally define the N1]N

2type-II even—odd sequence to be

XEO

(k1,k

2)"

N1~1+

n1/0

N2~1+

n2/0

x(n1,n

2) casA

p(2n1#1)k

1N

1

#

p(2n2#1)(2k

2#1)

2N2

B , (9)

which can be grouped into

F0(k

1,k

2)"

XEO

(2k1,2k

2)#X

EO(2k

1,2k

2!1)

2

"

N1~1+

n1/0

N2~1+

n2/0

0.5x(n1,n

2)CcasA

p(2n1#1)k

1N

1/2

#

p(2n2#1)(4k

2#1)

2N2

B

G. Bi / Signal Processing 74 (1999) 297—308 299

# casAp(2n

1#1)k

1N

1/2

#

p(2n2#1)(4k

2!1)

2N2

BD"

N1@2~1+

n1/0

N2@2~1+

n2/0

f0(n

1,n

2) casA

p(2n1#1)k

1N

1/2

#

p(2n2#1)k

2N

2/2 B (10)

and

f0(n

1,n

2)"u

0(n

1,n

2) cos

p(2n2#1)

2N2

!l0(n

1,n

2) sin

p(2n2#1)

2N2

, (11)

where

u0(n

1,n

2)"x(n

1,n

2)#xA

N1

2#n

1,n

2B,

l0(n

1,n

2)"xAn1,

N2

2#n

2B#xAN

12

#n1,N

22#n

2B.(12)

Similarly, we have

G0(k

1,k

2)"

XEO

(2k1,2k

2)!X

EO(2k

1,2k

2!1)

2

"

N1@2~1+

n1/0

N2@2~1+

n2/0

g0(n

1,n

2) casA

!p(2n1#1)k

1N

1/2

!

p(2n2#1)k

2N

2/2 B, (13)

where

g0(n

1,n

2)"u

0(n

1,n

2) sin

p(2n2#1)

2N2

#l0(n

1,n

2) cos

p(2n2#1)

2N2

. (14)

Both Eqs. (10) and (13) are the N1/2]N

2/2 type-II DWT. Similarly, we have

F1(k

1,k

2)"

XEO

(2k1#1,2k

2)#X

EO(2k

1#1,2k

2!1)

2

"

N1@2~1+

n1/0

N2@2~1+

n2/0

f1(n

1,n

2) casA

p(2n1#1)(2k

1#1)

2(N1/2)

#

p(2n2#1)k

2N

2/2 B, (15)

G1(k

1,k

2)"

XEO

(2k1#1,2k

2)!X

EO(2k

1#1,2k

2!1)

2

"

N1@2~1+

n1/0

N2@2~1+

n2/0

g1(n

1,n

2) casA

!p(2n1#1)(2k

1#1)

2(N1/2)

!

p(2n2#1)k

2N

2/2 B, (16)

300 G. Bi / Signal Processing 74 (1999) 297—308

where

f1(n

1,n

2)"u

1(n

1,n

2) cos

p(2n2#1)

2N2

!l(n1,n

2) sin

p(2n2#1)

2N2

, (17)

g1(n

1,n

2)"u

1(n

1,n

2) sin

p(2n2#1)

2N2

#l1(n

1,n

2) cos

p(2n2#1)

2N2

, (18)

u1(n

1,n

2)"x(n

1,n

2)!xA

N1

2#n

1,n

2B,(19)

l1(n

1,n

2)"xAn1,

N2

2#n

2B!xAN

12

#n1,N

22#n

2B.Both Eqs. (15) and (16) are the N

1/2]N

2/2 type-II odd—even sequences which are to be considered in the

next subsection. The final outputs of Eq. (9) can be obtained by

XEO

(2k1,2k

2)"F

0(k

1,k

2)#G

0(k

1,k

2), X

EO(2k

1,2k

2!1)"F

0(k

1,k

2)!G

0(k

1,k

2), (20)

XEO

(2k1#1,2k

2)"F

1(k

1,k

2)#G

1(k

1,k

2), X

EO(2k

1#1,2k

2!1)"F

1(k

1,k

2)!G

1(k

1,k

2), (21)

where for Eqs. (20) and (21), 0)k1(N

1/2, 1)k

2(N

2/2 and X

EO(k

1,!1)"!X

EO(k

1,N

2!1), where

k1

is any positive integer.

2.2. The type-II odd—even sequence

The N1]N

2odd—even sequence is defined by

XOE

(k1,k

2)"

N1~1+

n1/0

N2~1+

n2/0

x(n1,n

2) casA

p(2n1#1)(2k

1#1)

2N1

#

p(2n2#1)k

2N

2B, (22)

where 0)k1(N

1/2, 1)k

2(N

2/2. Eq. (22) can be decomposed into

F2(k

1,k

2)"

XOE

(2k1,2k

2)#X

OE(2k

1!1,2k

2)

2

"

N1@2~1+

n1/0

N2@2~1+

n2/0

f2(n

1,n

2) casA

p(2n1#1)k

1N

1/2

#

p(2n2#1)k

2N

2/2 B, (23)

G2(k

1,k

2)"

XOE

(2k1,2k

2)!X

OE(2k

1!1,2k

2)

2

"

N1@2~1+

n1/0

N2@2~1+

n2/0

g2(n

1,n

2) casA

!p(2n1#1)k

1N

1/2

!

p(2n2#1)k

2N

2/2 B, (24)

F3(k

1,k

2)"

XOE

(2k1,2k

2#1)#X

OE(2k

1!1,2k

2#1)

2

"

N1@2~1+

n1/0

N2@2~1+

n2/0

f3(n

1,n

2) casA

p(2n1k1

N1/2

#

p(2n2#1)(2k

2#1)

2(N2/2) B, (25)

G. Bi / Signal Processing 74 (1999) 297—308 301

G3(k

1,k

2)"

XOE

(2k1,2k

2#1)!X

OE(2k

1!1,2k

2#1)

2

"

N1@2~1+

n1/0

N2@2~1+

n2/0

g3(n

1,n

2) casA

!p(2n1#1)k

1N

1/2

!

p(2n2#1)(2k

2#1)

2(N2/2) B. (26)

For Eqs. (23)—(26), the input sequences are

f2(n

1,n

2)"u

2(n

1,n

2) cos

p(2n1#1)

2N1

!l2(n

1,n

2) sin

p(2n1#1)

2N1

, (27)

g2(n

1,n

2)"u

2(n

1,n

2) sin

p(2n1#1)

2N1

#l2(n

1,n

2) cos

p(2n1#1)

2N1

, (28)

f3(n

1,n

2)"u

3(n

1,n

2) cos

p(2n1#1)

2N1

!l3(n

1,n

2) sin

p(2n1#1)

2N1

, (29)

g3(n

1,n

2)"u

3(n

1,n

2) sin

p(2n1#1)

2N1

#l3(n

1,n

2) cos

p(2n1#1)

2N1

, (30)

u2(n

1,n

2)"x(n

1,n

2)#xAn1,

N2

2#n

2B,l2(n

1,n

2)"xA

N1

2#n

1,n

2B#xAN

12

#n1,N

22#n

2B, (31)

u3(n

1,n

2)"x(n

1,n

2)!xAn1,

N2

2#n

2B,l3(n

1,n

2)"xA

N1

2#n

1,n

2B!xAN

12

#n1,N

22#n

2B. (32)

Both Eqs. (23) and (24) are the N1/2]N

2/2 type-II DWT, and Eqs. (25) and (26) are the N

1/2]N

2/2 type-II

even—odd sequence which can be computed as shown in the last subsection. The final outputs of Eq. (22) canbe obtained as

XOE

(2k1,2k

2)"F

2(k

1,k

2)#G

2(k

1,k

2), X

OE(2k

1!1,2k

2)"F

2(k

1,k

2)!G

2(k

1,k

2), (33)

XOE

(2k1,2k

2#1)"F

3(k

1,k

2)#G

3(k

1,k

2), X

OE(2k

1!1,2k

2#1)"F

3(k

1,k

2)!G

3(k

1,k

2), (34)

where for Eqs. (33) and (34), 0)k1)N

1/2!1, 1)k

2)N

2/2!1 and X

OE(!1,k

2)"!X

OE(N

1!1,k

2),

where k2

is any positive integer.

3. Algorithm for the type-IV DWT

The type-IV DWT defined in Eq. (3) can be decomposed into four N1/2]N

2/2 type-II DWT, as described

below:

F4(k

1,k

2)"

XIV

(2k1,2k

2)#X

IV(2k

1!1,2k

2!1)

2

"

N1@2~1+

n1/0

N2@2~1+

n2/0

f4(n

1,n

2) casA

p(2n1#1)k

1N

1/2

#

p(2n2#1)k

2N

2/2 B , (35)

302 G. Bi / Signal Processing 74 (1999) 297—308

G4(k

1,k

2)"

XIV

(2k1,2k

2)!X

IV(2k

1!1,2k

2!1)

2

"

N1@2~1+

n1/0

N2@2~1+

n2/0

g4(n

1,n

2)casA

!p(2n1#1)k

1N

1/2

!

p(2n2#1)k

2N

2/2 B, (36)

F5(k

1,k

2)"

XIV

(2k1,2k

2!1)#X

IV(2k

1!1,2k

2)

2

"

N1@2~1+

n1/0

N2@2~1+

n2/0

f5(n

1,n

2)casA

p(2n1#1)k

1N

1/2

#

p(2n2#1)k

2N

2/2 B, (37)

G5(k

1,k

2)"

XIV

(2k1,2k

2!1)!X

IV(2k

1!1,2k

2)

2

"

N1@2~1+

n1/0

N2@2~1+

n2/0

g5(n

1,n

2)casA

!p(2n1#1)k

1N

1/2

!

p(2n2#1)k

2N

2/2 B, (38)

where for Eqs. (35)—(38), 0)k1(N

1/2, 1)k

2(N

2/2. The input sequences for Eqs. (35)—(38) are

f4(n

1,n

2)"u

4(n

1,n

2)cosA

p(2n1#1)

2N1

#

p(2n2#1)

2N2

B!l4(n

1,n

2)sinA

p(2n1#1)

2N1

#

p(2n2#1)

2N2

B, (39)

g4(n

1,n

2)"u

4(n

1,n

2)sinA

p(2n1#1)

2N1

#

p(2n2#1)

2N2B#l

4(n

1,n

2) cosA

p(2n1#1)

2N1

#

p(2n2#1)

2N2B, (40)

f5(n

1,n

2)"u

5(n

1,n

2)cosA

p(2n1#1)

2N1

!

p(2n2#1)

2N2

B!l5(n

1,n

2)sinA

p(2n1#1)

2N1

!

p(2n2#1)

2N2

B, (41)

g5(n

1,n

2)"u

5(n

1,n

2)sinA

p(2n1#1)

N1

!

p(2n2#1)

N2

B#l5(n

1,n

2)cosA

p(2n1#1)

N1

!

p(2n2#1)

N2

B, (42)

u4(n

1,n

2)"x(n

1,n

2)!xA

N1

2#n

1,N

22

#n2B, l

4(n

1,n

2)"xA

N1

2#n

1,n

2B#xAn1,N

22#n

2B, (43)

u5(n

1,n

2)"x(n

1,n

2)#xA

N1

2#n

1,N

22

#n2B, l

5(n

1,n

2)"xA

N1

2#n

1,n

2B!xAn1,N

22#n

2B. (44)

The final transform outputs can be obtained by

XIV

(2k1,2k

2)"F

4(k

1,k

2)#G

4(k

1,k

2), X

IV(2k

1!1,2k

2!1)"F

4(k

1,k

2)!G

4(k

1,k

2), (45)

XIV

(2k1,2k

2!1)"F

5(k

1,k

2)#G

5(k

1,k

2), X

IV(2k

1!1,2k

2)"F

5(k

1,k

2)!G

5(k

1,k

2), (46)

where for Eqs. (45) and (46), 0)k1)N

1/2!1, 0)k

2)N

2/2!1 and X

IV(!1,!1)"

XIV

(N1!1,N

2!1),X

IV(k

1,!1)"!X

IV(k

1,N

2!1), X

IV(!1,k

2)"!X

IV(N

1!1,k

2), where k

1and

k2

are any positive integers.

4. Algorithm for the type-III DWT

Decomposition techniques similar to those used in the last two sections can be applied to decompose thetype-III DWT which is defined in Eq. (2). Instead of giving the details of the derivation, the necessary

G. Bi / Signal Processing 74 (1999) 297—308 303

equations are listed to describe the decomposition process. The type-III DWT can be computed by

XIII(k

1,k

2)"A(k

1,k

2)#B(k

1,k

2)#C(k

1,k

2)#D(k

1,k

2), (47)

where

A(k1,k

2)"AAk1

,N

22#k

2B"AAN

12#k

1,k

2B"AAN

12

#k1,N

22

#k2B

"

N1@2~1+

n1/0

N2@2~1+

n2/0

x(2n1,2n

2)casA

pn1(2k

1#1)

N1/2

#

pn2(2k

2#1)

N2/2 B, (48)

B(k1,k

2)"BAk1,

N2

2#k

2B"!BAN

12#k

1,k

2B"!BAN

12

#k1,N

22

#k2B

"

N1@2~1+

n1/0

N2@2~1+

n2/0

x(2n1#1,2n

2)casA

p(2n1#1)(2k

1#1)

2(N1/2)

#

pn2(2k

2#1)

N2/2 B, (49)

C(k1,k

2)"!CAk1,

N2

2#k

2B"CAN

12

#k1,k

2B"!CAN

12#k

1,N

22#k

2B"

N1@2~1+

n1/0

N2@2~1+

n2/0

x(2n1,2n

2#1)casA

pn1(2k

1#1)

N1/2

#

p(2n2#1)(2k

2#1)

2(N2/2) B, (50)

D(k1,k

2)"!DAk1,

N2

2#k

2B"!DAN

12

#k1,k

2B"CAN

12#k

1,N

22#k

2B"

N1@2~1+

n1/0

N2@2~1+

n2/0

x(2n1#1,2n

2#1)casA

p(2n1#1)(2k

1#1)

2(N1/2)

#

p(2n2#1)(2k

2#1)

2(N2/2) B, (51)

where for Eqs. (48)—(51), 0)k1(N

1/2, 1)k

2(N

2/2. It is noted that Eq. (48) is a type-III DWT, Eq. (51) is

a type-IV DWT which can be further decomposed as shown in the last section. Furthermore, Eqs. (49) and(50) are the type-III odd—even and even—odd sequences. Because they have a symmetric relation, we showonly the process of decomposing Eq. (49) in the rest of this section.

Let us define the N1]N

2type-III even—odd sequence to be

XEO

(k1,k

2)"

N1~1+

n1/0

N2~1+

n2/0

x(n1,n

2)casA

pn1(2k

1#1)

N1

#

p(2n2#1)(2k

2#1)

2N2

B , (52)

which can be expressed by

XEO

(k1,k

2)"cosA

p(2k2#1)

2N2BE0

(k1,k

2)#sinA

p(2k2#1)

2N2

BE1(k

1,k

2), (53)

where

E0(k

1,k

2)"

N1@2~1+

n1/0

N2@2~1+

n2/0

u0(n

1,n

2)casA

pn1(2k

1#1)

N1/2

#

pn2(2k

2#1)

N2/2 B

#

N1@2~1+

n1/0

N2@2~1+

n2/0

u1(n

1,n

2)casA

p(2n1#1)(2k

1#1)

2(N1/2)

#

pn2(2k

2#1)

N2/2 B , (54)

304 G. Bi / Signal Processing 74 (1999) 297—308

Fig. 1. Decomposition process for the type-II DWT.

in which the first term is N1/2]N

2/2 type-III DWT and the second term is the N

1/2]N

2/2 type-III

odd—even sequence. The input sequences in Eq. (54) are

u0(n

1,n

2)"x(2n

1,2n

2)#x(2n

1,2n

2!1),

u1(n

1,n

2)"x(2n

1#1,2n

2)#x(2n

1#1,2n

2!1).

(55)

Similarly, we have

E1(k

1,k

2)"

N1@2~1+

n1/0

N2@2~1+

n2/0

l0(n

1,n

2)casA

!pn1(2k

1#1)

N1/2

!

pn2(2k

2#1)

N2/2 B

#

N1@2~1+

n1/0

N2@2~1+

n2/0

l1(n

1,n

2)casA

!p(2n1#1)(2k

1#1)

2(N1/2)

!

pn2(2k

2#1)

N2/2 B, (56)

where the input sequences are

l0(n

1,n

2)"x(2n

1,2n

2)!x(2n

1,2n

2!1),

l1(n

1,n

2)"x(2n

1#1,2n

2)!x(2n

1#1,2n

2!1),

(57)

where in both Eqs. (55) and (57), x(n1,!1)"!x(n

1,N

2!1) and n

1is a positive integer. The N

1/2]N

2/2

type-III odd—even sequences in Eqs. (54) and (56) can be further decomposed into two N1/4]N

2/4 type-III

DWT and two N1/4]N

2/4 type-III odd—even sequences. The details of the decomposition are not presented.

5. Computational complexity

In summary, the entire N1]N

2type-II DWT can be decomposed into a type-II DWT, an even—odd

sequence, an odd—even sequence and a type-IV DWT whose transform size is N1/2]N

2/2. Fig. 1 shows the

first two steps of the decomposition process for the type-II DWT. Because the type-II has a symmetricrelation to the type-III DWT, we conclude that the decomposition of both types of DTW requires the samecomputational complexity. Therefore, the comments made for the type-II DWT are also valid for the type-IIIDWT.

The number of additions needed by the proposed algorithm for the type-II DWT is

AII(N

1]N

2)"A

IIAN

12

]N

22 B#A

IVAN

12

]N

22 B#A

EOAN

12

]N

22 B#A

OEAN

12

]N

22 B#2N

1N

2, (58)

G. Bi / Signal Processing 74 (1999) 297—308 305

where the last term is the number of additions needed by Eq. (8), and the number of multiplications is

MII(N

1]N

2)"M

IIAN

12

]N

22 B#M

IVAN

12

]N

22 B#M

EOAN

12

]N

22 B#M

OEAN

12

]N

22 B. (59)

The N1]N

2type-IV DWT can be decomposed into four N

1/2]N

2/2 type-II DWT. The required number

of additions is

AIV

(N1]N

2)"4A

IIAN

12

]N

22 B#3N

1N

2, (60)

where the last term is the number of additions needed by Eqs. (39)—(46), and the number of multiplications is

MIV

(N1]N

2)"4M

IIAN

12

]N

22 B#2N

1N

2, (61)

where the last term is the number of multiplications needed by the twiddle factors in Eqs. (39)—(42). In general,it is possible to have trivial twiddle factors so that a number of operations can be saved. When N"N

1"N

2,

for example, 6N multiplications and 2N additions can be saved.It can be easily verified from the decomposition process that the type-II (or type-III) even—odd and type-II

(or type-III) odd—even sequences require the same number of additions and multiplications. Therefore, onlythe number of operations required by the even—odd type-II sequence is given below:

AEO

(N1]N

2)"2A

OEAN

12

]N

22 B#2A

IIAN

12

]N

22 B#3N

1N

2, (62)

and the number of multiplications is

MEO

(N1]N

2)"2M

OEAN

12

]N

22 B#2M

IIAN

12

]N

22 B#

3N1N

22

. (63)

The last term of Eq. (63) is the number of multiplications needed by the twiddle factors as shown in Eqs. (11),(14), (17) and (18). When Eqs. (11) and (14) are substituted into Eq. (8), 0.5N

1N

2multiplications are needed.

Based on Eqs. (58)—(63), Table 1 lists the number of arithmetic operations needed for the computation oftype-II, -IV and even—odd type-II sequence whose transform size is N"N

1"N

2. The number of arithmetic

operations for N"2 and 4 are achieved by an optimized computation. As reported in [11], the number ofmultiplications needed by the row—column algorithms is

M(N]N)"N2(log2N!1) , (64)

and the number of additions is

A(N]N)"N2(3log2N!1), (65)

where N"N1"N

2. Compared to those given in Eqs. (64) and (65), the proposed algorithms achieve

a significant reduction of the arithmetic operations. However, they need more arithmetic operations than

306 G. Bi / Signal Processing 74 (1999) 297—308

Table 1The required computational complexity

Type-II DWT Type-IV DWT EO or OE DWTN M(N]N) A(N]N) M(N]N) A(N]N) M(N]N) A(N]N)

2 0 8 0 8 4 44 8 40 8 56 32 648 64 352 112 336 160 400

16 496 2016 672 2144 832 227232 2832 10,752 3840 11,072 4704 11,64864 16,080 53,312 19,136 55,168 21,216 57,088

128 77,648 255,424 96,320 262,144 99,168 269,952256 372,304 1,188,544 440,128 1,217,792 451,936 1,247,360

Fig. 2. Comparison of computational complexity needed by various algorithms.

those used by the polynomial transform algorithm [11]. Fig. 2 compares the computational complexityneeded by various algorithms using the number of arithmetic operations per transform point as a measure.

The main improvement made by the proposed algorithms is the regularity of the computational structure.It has all the desirable features, including in-place computation and regular data reordering, performed bythe bit-reversal method, which have been achieved by the radix-type algorithms for other transformcomputations. The simplicity of the proposed algorithms enables an easy implementation. Further reductionof the total computation time and implementation cost can be achieved. The techniques used in deriving thefast algorithms can easily be applied to derive fast algorithms for higher dimensional DWTs. In contrast, thealgorithms in [2,6,11] must use a large memory space and a considerable overhead of computation time forthe data reordering process. For processing of high-dimensional data, these issues will become the mainchallenges to obtain high processing throughput.

G. Bi / Signal Processing 74 (1999) 297—308 307

6. Conclusion

New fast algorithms for the two-dimensional type-II, -III and -IV DWT are proposed to achieve efficientcomputation and regular computational structures. Compared to the row—column-based algorithms, a sub-stantial reduction in the number of arithmetic operations can be achieved. Although the proposed algorithmsrequire a few more operations than needed by the polynomial transform algorithm, the simplicity andregularity of the computational structure achieved by our algorithms are crucial to minimizing the overallcomputational costs for high processing throughput.

Acknowledgements

The author would like to thank the reviewers for their useful comments on the previous manuscripts.

References

[1] G. Bi, Split-radix algorithm for 2-D Hartley transform, Signal Processing 63 (1997) 45—53.[2] T. Bortfeld, W. Dinter, Calculation of multidimensional Hartley transform using one-dimensional Fourier transform, IEEE Trans.

Signal Process. 42 (1995) 1306—1310.[3] S. Boussakta, A.G.J. Holt, Fast multidimensional discrete Hartley transform using Fermat number transform, IEE Proc. G. 135

(1988) 253—257.[4] O. Buneman, Multi-dimensional Hartley transform, Proc. IEEE 75 (1987) 267.[5] H. Hao, R.N. Bracewell, A three-dimensional DFT algorithm using fast Hartley transform, Proc. IEEE 75 (2) (1987) 264—266.[6] H. Hu, F.F. Liu, Fast computation of the two-dimensional generalized Hartley transforms, IEE Proc. Image Signal Process. 142 (1)

(1995) 35—39.[7] A. Kojima, N. Sakurai, J. Kishigami, Motion detection using 3D-FFT spectrum, in: Proc. IEEE ICASPP, 1993.[8] Z.-J. Mou, P. Duhamel, In-place butterfly-style FFT of 2-D real sequences, IEEE Trans. Acoust. Speech Signal Process. ASSP-36

(104) (1988) 1642—1650.[9] B. Porat, B. Friedlander, A frequency domain algorithm for multiframe detection and estimation of dim tragets, IEEE Trans.

Pattern Anal. Mach. Intell. 12 (1990) 398—401.[10] Z. Wang, Comments on ‘Generalized discrete Hartley transform’, IEEE Trans. Signal Process. 43 (7) (1995) 1711—1712.[11] Y. Zeng, X. Li, Multidimensional polynomial transform algorithm for multidimensional discrete W transform, in: Proc. ICSP’96,

1996, pp. 123—126.

308 G. Bi / Signal Processing 74 (1999) 297—308