A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor...

37
A fast, discrete Gabor transform 1 A fast, discrete Gabor transform via a partition of unity Michael P. Lamoureux, Peter C. Gibson, Jeff P. Grossman, and Gary F. Margrave July 1, 2003 Abstract A partition of unity on the d-dimensional integer lattice Z d is used to create a generalized discrete Gabor transform, with analysis and synthesis windows of smooth, desirable characteristics. Factorizing the partition of unity allows for different choices of analysis and syn- thesis windows, a transformation on general lattices in the time and frequence domains is considered, and an approximate partition of unity via Gaussians gives an approximate inverse. Speed, implementation is- sues, and practical choices for partitions of unity useful in applications are discussed. 1 Introduction The Gabor transform is a mathematical transformation of functions that provides a joint time/frequency representation of a given signal, as well as a means to recover the signal from this time/frequency representation. Although Denis Gabor’s original motivation for introducing this transfor- mation lay in quantum mechanics (see [5]), the technique which bears his name has proven to be useful in a variety of signal processing contexts, in- cluding image processing, acoustics, medical imaging, electrical engineering, and others. For instance, the authors of this paper have a particular interest in seismic data processing and have used Gabor transforms to good effect (see for example, references [8], [9], [10] and [12]). 0 Mailing address: Dept. of Mathematics, University of Calgary, Canada. 0 Math Subject Classifications. 42C15, 65T99, 86A15. 0 Keywords and Phrases. Gabor transform, partition of unity. Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Transcript of A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor...

Page 1: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 1

A fast, discrete Gabor transform via a partition of

unity

Michael P. Lamoureux, Peter C. Gibson,Jeff P. Grossman, and Gary F. Margrave

July 1, 2003

Abstract

A partition of unity on the d-dimensional integer lattice Zd is usedto create a generalized discrete Gabor transform, with analysis andsynthesis windows of smooth, desirable characteristics. Factorizingthe partition of unity allows for different choices of analysis and syn-thesis windows, a transformation on general lattices in the time andfrequence domains is considered, and an approximate partition of unityvia Gaussians gives an approximate inverse. Speed, implementation is-sues, and practical choices for partitions of unity useful in applicationsare discussed.

1 Introduction

The Gabor transform is a mathematical transformation of functions thatprovides a joint time/frequency representation of a given signal, as wellas a means to recover the signal from this time/frequency representation.Although Denis Gabor’s original motivation for introducing this transfor-mation lay in quantum mechanics (see [5]), the technique which bears hisname has proven to be useful in a variety of signal processing contexts, in-cluding image processing, acoustics, medical imaging, electrical engineering,and others. For instance, the authors of this paper have a particular interestin seismic data processing and have used Gabor transforms to good effect(see for example, references [8], [9], [10] and [12]).

0Mailing address: Dept. of Mathematics, University of Calgary, Canada.0Math Subject Classifications. 42C15, 65T99, 86A15.0Keywords and Phrases. Gabor transform, partition of unity.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 2: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 2

Briefly, the Gabor transform is computed by comparing a signal withtranslations and modulations of a single analysis window, thereby derivingthe Gabor coefficients via an inner product. The reconstruction of the sig-nal is computed by summing certain translations and modulations of a fixedsynthesis (dual) window, weighted by the previously computed Gabor co-efficients. Since the windows are localized in space, the inner product onlydetects a localized portion of the original signal, and thus the Gabor coeffi-cents depend only locally on the signal information. The Gabor transformmay be thought of as a windowed, or short-time, Fourier transform.

Not only is the Gabor representation of a signal useful for analysinga signal, it also provides a convenient means to modify the signal in thetime/frequency domain. For instance, adjusting the magnitude of the Gaborcoefficients in a prescribed manner is a simple way to implement a time-varying filter; reconstruction of the modified signal using the inverse Gabortransform completes the implementation. A full exploration of these filteringtechniues leads to the theory of Gabor multipliers (see for instance [2]),although we are not directly concerned with them in this paper. Anothermotivation for using the Gabor transform is that it provides a representationwhere the physics of the process being modeled is clear, and proper filtersmay be designed.

In our seismic work, for instance, we have successfully implemented suchtime-variant filters to create commericially viable seismic data processingtechniques, including deconvolution, forward and inverse Q-filtering, wave-field extrapolation, and wave propagation. In exploration seismology, datasets of a size on the order of tens of gigabytes are not uncommon; thus speedand robustness of any processing algorithm are critically important. Thisprovides the motivation for the results presented in the present paper.

Here, we are concerned with the theoretcal issues that arise in a practicalimplementation of the Gabor transform. First of all, all our signals aresampled: that is, we are analysing functions in space l2(Zd) and so we areprimarily interested in the discrete transform. Second, we want to makea choice of windows which will allow us to create a fast algorithm for thetransform, with a fast inverse, while minimizing the appearance of artifactsin the final output. For instance, one often sees in the literature examples ofGabor windows and duals such as the pair illustrated in Figure 1; while thefirst (top) window is smooth and localized, the dual is objectionable bothbecause of its many singular points, and because it is much less localizedthan the first window. In fact, we wish to be able to choose both analysisand synthesis windows so that we reduce artifacts, and so that the physics ofthe processes we are modeling in the time/frequency domain remain clear in

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 3: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 3

this representatios. Often, this means we want both windows to be smoothand well-localized.

0 10 20 30 40 50 60 70 80 90 100−1

−0.5

0

0.5

1

1.5

2

Gabor window

Dual window

Figure 1: A Gabor window and its canonical dual.

The principal new result of this paper is the observation that a simplechoice of windows g and γ as factors of a partition of unity results in anexact reconstruction form for f ; that is, g and γ so chosen gives directly thetransform and inverse that recovers the original signal; the inverse frameoperator is never required. Moreover, rather than translating a single win-dow all over signal space, it can be preferable to start with a collection ofwindows {gn} and define a generalized Gabor transform; we still obtain ex-act inverses. Another major result of the paper is that we may translateand modulate over very general lattices in both the time and frequency do-main, provided the partition of unity condition holds. Finally, if g and γare factors of an approximate partition of unity, then the reconstruction isapproximately exact.

The structure of the paper is as follows. In the following section, wereview briefly the typical implementation of the discrete Gabor transform,using translations and modulations of a fixed window along a rectangularlattice. Section 3 moves away from translations of a single window, introduc-ing a general collection of windows that cover signal space, and indicating

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 4: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 4

the advantage of such an approach (namely, speed and reduction of process-ing artifacts). This is the starting point for the partition of unity approachto the Gabor transform. Section 4 moves away from a rectangular latticein the frequency domain, again with the motivation being the removal ofartifacts. Section 5 is the core of the paper, where we introduce the Gabortransform based on a partition of unity, and prove the key result on recon-struction of the signal from its Gabor transform. Section 6 discusses speedof the algorithm and its inverse, while Section 7 presents some commonerrors that can occur in implementation. Sections 8 and 9 discuss specialcases of the partition of unity idea applied to the discrete Gabor transformon general lattices, and with Gaussian windows. Section 10 is a summary,and we have left to the appendices some examples of practical windows wehave used in a variety of applications, with desirable properties for signalprocessing, and a proof of the modulation theorem in Section 4.

2 The Standard Gabor Transform

The typical form of the Gabor transform is as follows: one begins with aHilbert space L2(X) of square integrable functions on some measure spaceX, and a single function g in L2(X), then defines modulations and transla-tions of g as

gmn = MmTng,

where Tn is translation by some amount indexed by n, and Mn is modulation,or multiplication by a complex exponential with some frequency indexed bym. The actual choice of index sets for m,n and indeed for the exact definitionof translation and modulation, depends on the particular space X.

From this choice of g, for any function (signal) f in L2(X), one definesthe Gabor coefficients of f , relative to g, as

Vmn(f) = 〈f, gmn〉,

where 〈·, ·〉 is the standard inner product on L2(X). The frame operator S,for given window g, is defined as

Sf =∑m,n

〈f, gmn〉gmn

where the sum is not necessarily over all possible indices m,n, but perhapssome specified, select, subset of indices. When the frame operator is invert-ible, there is a canonical dual window given by γc = S−1g, For instance, in

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 5: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 5

Figure 1 we see a typical window and its canonical dual. With the dual, onealso defines translations and dilations as

γcmn = MmTnγc.

From these functions, one recovers f as the sum

f =∑m,n

Vmn(f)γcmn,

where the sum is over the same subset as in the defining sum for S.In general, any function γ ∈ L2(X) coud be used in an attempt to

reconstruct f , so one can define a reconstruction operator R = Rγ for anyfunction γ as

Rf =∑m,n

Vmn(f)γmn.

Once again, this is a sum over some subset of possible indices m,n. Onechallenge in Gabor theory is to find windows g and γ with suitable propertiesfor signal processing, that also allow for perfect reconstructions, Rf = f .

In applications, the measure space X is usually a d-dimensional cube ofpoints,

X = [0, 1, . . . L1 − 1]× [0, 1, . . . L2 − 1]× . . .× [0, 1, . . . Ld − 1],

and the measure is just counting measure; the Hilbert space of squaresummable functions is usually denoted l2(X). Translations in X are justthe operators {Tn : n ∈ X} with

(Tnf)(x) = f(x− n),

where the difference x − n is computed using modulo arithmetic, or byassuming f is zero-extended outside the cube. Modulations are given asoperators {Mn : m ∈ X}, with

(Mmf)(x) = f(x)e2πix1m1

L1+

x2m2L2

+...+xdmd

Ld .

The Gabor coefficientsVmn(f) = 〈f, gmn〉

could be computed for all indices m, n in X, but in practice these are onlycomputed for some fixed sublattice in X. The question of which sublatticeleads directly to questions of over- and under-sampling.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 6: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 6

We point out three important limitations in this standard implementa-tion. First, only one window g gets translated to cover signal space; whynot use several different windows? (Section 3) Second, a rectangular latticespecifes the collection of vectors used to sample in the frequency domains;one can use a more general lattice (Section 4). Finally, there may be manypossible choices for the dual window that give an accurate reconstruction off . We create a method to produce “nice” windows by a factorization of apartition of unity (Section 5).

3 General Windows

The standard implementation of the discrete Gabor transform uses a singlewindow function g, defined on discrete points, which is translated along thelength of the signal, as in Figure 2.

−1 0 1 2 3 4 5 6−3

−2

−1

0

1

2

3

Signal

Windows

Reconstruction

Figure 2: Regular window translated along signal space.

In practice, there are a few problems with this regular structure. Firstof all, in certain areas the signal may be changing rapidly, while in otherareas it may have a more uniform character. It would be useful to useshort windows in the first case, to accurately track those changes, and uselarger windows in the second case. (Grossman’s work on the adaptive Ga-bor transform demonstrates this approach, see [10].) The second problemis that when applying a time-varying filter, typically we get edge effectsnear the sides of any window, and regularly spaced windows will give regu-

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 7: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 7

larly spaced artifacts. It is important to point out, of course, that artifactsnever appear if one only computes Gabor coefficients, and then inverts, asthe numerical inversion is essentially exact. However, when modifying theGabor coefficients before inverting (as when implementing a time-varyingfilter, or applying a Gabor multiplier), there will be changes in the outputsignal; unwanted changes we loosely describe as artifacts. Any artifacts,particularly regularly-spaced artifacts, can be confusing or annoying to theperson viewing the Gabor coefficients and can obfuscate the processed data.For instance, in image processing, one often observes artifacts that lie ona rectangular boundary (the jpeg effect, see [14]). Perhaps a more optimaltiling of the image space could be useful; for instance, the hexagonal tilingshown in Figure 3 corresponds to an optimal packing of discs in the plane.Even a non-periodic tiling might prove to be useful. In our seismic experi-

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

111111

1111

11

Figure 3: A hexagonal tiling of the plane

ments, it is numerically troublesome to have artifacts that accumulate alongthe direction of wave propagation, so again, something other than regular,rectangular division of the image space is useful.

Thus, we propose generating a Gabor transform using a collection ofwindows {gn}, and duals {γn} which appropriately cover signal space, asin Figure 4. Although the functions gn are not related to each other by

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 8: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 8

0 10 20 30 40 50 60 70 80 90 1000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

g1 g2 g3 g4

Figure 4: A collection of four non-uniform windows covering signal space.

translation, we may still define the modulation appropriately, as

gmn = Mmgn

and form Gabor coefficients of signal f as

Vmn(f) = 〈f, gmn〉,

and similarly for the reconstruction operator, using the general collection ofdual windows {γn} rather than a collection of translates.

The next section shows how we avoid rectangular lattices in the frequencydomain, and Section 5 pulls this all together to create a general Gabortransform.

4 Modulation functions and integer lattices

In the Gabor transform, the window functions are modified by modulationfunctions which, in one dimension, are simply complex exponential functionsof the form

Pα(j) = e2πiαj for all j ∈ Z,

for some fixed parameter α. In applications, it is common to choose onlyperiodic modulation functions, obtained by setting parameter α to be a ra-tional number, say α = m/M . In higher dimensions, one may take a productof several one dimensional modulaton functions, and obtain functions

Pm(j) = e2πim1j1/M1e2πim2j2/M2 . . . e2πimdjd/Md

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 9: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 9

for all j = (j1, j2, . . . jd) in Zd, where m = (m1,m2, . . . md) is an index in Zd

and M1 . . .Md is some fixed choice of integer denominators. It is convenientto fix a diagonal matrix B with integer entries

B =

M1 0 . . . 00 M2 . . . 0...

.... . .

...0 0 . . . Md

,

and then express the above modulation function via the standard innerproduct on Zd as

Pm(j) = e2πi(B−1m)·j for all j ∈ Zd.

In this form, it is clear that each modulation function is periodic in eachcomponent of j, and the “vector of frequencies” represented by function Pm

is the vector B−1m. Less obvious, but also true, is that there are only finitelymany different functions Pm (as two different indices m,m′ can give thefunctions Pm = Pm′), and a sum of the different Pm gives a delta function.

However, this is too restrictive a class of modulation functions, as es-sentially it restricts us to sampling in the frequency domain with a simplerectangular lattice, in this case the set of points 1

M1Z× 1

M2Z×· · ·× 1

MdZ. Just

as in the time domain, we wished to moved away from rectangular samplelattices, so here too we may do so in the frequency domain.1 The key isusing a more general form for matrix B and considering the lattices thesematrices generate.

A lattice is, roughly speaking, a regularly spaced collection of points inEuclidean space Rd; more precisely, it is a discrete subgroup of Rd underthe operation of vector addition. The standard example of a discrete latticeis the subset Zd of points in Euclidean space with integer coordinates. Forthe Gabor transform, we are interested in more general lattices that “fillout space,” which is to say, are not confined to some hyperplane in Rd, yetthe points don’t “bunch up” into a dense set; such lattices may always berepresented as the image of the standard lattice Zd under a linear transfor-mation. That is, there is an invertible d × d matrix A ∈ Md(R) with thelattice given as the set

AZd = {Az : z ∈ Zd}.

Figure 5 shows a portion of a typical lattice in the plane.1Our approach to lattices is quite a bit different than the symplectic case as considered

by Grochenig, [7].

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 10: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 10

z1//

z2OO

Figure 5: A non-rectangular lattice in the plane.

In the discussion on modulation functions, the diagonal matrix B definesa lattice of frequencies, namely the set

B−1Zd = {B−1z : z ∈ Zd}.

The matrix B also defines a lattice of periodicity for the modulation func-tions,

BZd = {Bz : z ∈ Zd},which (since B is integer), is a subset of the standard lattice Zd in Rd. Bylattice of periodicity, we simply mean that if indices j and j′ differ by someinteger multiple of B (i.e. j′ − j ∈ BZd), then Pm takes the same valuesthere, Pm(j′) = Pm(j).

To generalize the frequency sampling to non-rectangular lattices, fix Bto be any invertible d × d matrix with integer entries, and for any indexm ∈ Zd, define modulation function Pm by

Pm(j) = e2πi(B−1m)·j , for all j ∈ Zd.

We also define two equivalence relations on the lattice Zd by

m ∼ m′ iff m−m′ ∈ BZd,

andm ∼∗ m′ iff m−m′ ∈ B∗Zd,

where B∗ is the transpose of matrix B.The following proposition is easily proved in the case where B diagonal;

the proof for general B is deferred to an appendix.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 11: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 11

Proposition 1 Let B be an invertible d × d matrix with integer entries,defining equivalence relations ∼ and ∼∗, and modulation functions {Pm :m ∈ Zd} as above. Then

1. each function Pm is periodic, with j ∼∗ j′ ⇒ Pm(j) = Pm(j′);

2. Pm = Pm′ if and only if m ∼ m′;

3. there are exactly |det B| different modulation functions Pm, which areuniquely indexed by some finite cube

M = [0, . . . ,M1 − 1]× [0, . . . ,M2 − 1]× . . .× [0, . . . ,Md − 1] ⊂ Zd;

4. the finite sum of distinct modulation functions

P =∑

m∈M

Pm

is a delta function, with

P (j) ={|det(B)| if j ∈ B∗Zd

0 otherwise,

In the following sections, there may be only one fixed modulation matrixB, but in general, the matrix may vary with the choice of window function.

5 The discrete Gabor transform on a partition ofunity

A partition of unity is a collection of functions which sum to the constantfunction one; that is, a collection of functions {wn} which sum as∑

n

wn(j) = 1 for all j ∈ Zd.

For typical signal processing applications, it will be useful to choose the wn

with particular characteristics; say smooth, non-negative, rapidly decreas-ing, and/or with a well-behaved Fourier transform. In Appendix A, we listsome examples of practical windows that we have used in a variety of signalprocessing applications. In the following, however, the only restriction wemight make on each wn is that it have compact (i.e. finite) support. Eventhis restriction may be dropped: see the remark at the end of the section.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 12: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 12

Given a partition of unity {wn} on the set Zd, with each function wn ofcompact support, choose for each index n an invertible integer matrix Bn

so that the lattice B∗mZd intersects the difference set 2

supp(wn)− supp(wn) ≡ {j − k : j, k ∈ supp(wn)}

only at the origin. That is, choose Bn with entries large enough so that thenon-zero entries in the lattice B∗

mZd are far enough from the (finite) set ofdifferences of pairs of elements in supp(wn).

Then, choose functions gn and γn to form what we call a weighted fac-torization of the partition of unity; that is, gn and γn are chosen with

i) supp(gn) = supp(γn) = supp(wn);

ii) γngn|det Bn| = wn on the set Zd.

For instance, with a non-negative partition of unity, one may choose

gn =(

wn

|det Bn|

)p

γn =(

wn

|det Bn|

)1−p

for some real parameter 0 ≤ p ≤ 1. (In applications, the choice of p isimportant in controlling the rate of roll-off for a window.)

For each window index n, and for each integer vector m ∈ Zd, the mod-ulated version of the window functions are denoted by gmn and γmn and aredefined as

gmn(j) = gn(j)e2πi(B−1n m)·j

γmn(j) = γn(j)e2πi(B−1n m)·j

for all vectors j ∈ Zd. The Gabor transform of function f ∈ l2(Zd) is definedas

Vmn(f) = 〈f, gmn〉

and the inverse tranform given by

f =∑m,n

Vmn(f)γmn.

By this careful choice of window functions, we have the following result.2the Minkowski difference

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 13: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 13

Proposition 2 With this choice of modulated window functions gmn andγmn construction from a partition of unity, we have the exact reconstructionformula

f =∑m,n

〈f, gmn〉γmn

for all functions f ∈ l2(Zd). That is, the Gabor transform with windows gn

has an inverse transform with windows γn.

Proof. We compute∑m,n

〈f, gmn〉γmn(j) =∑

m,n,k

f(k)gn(k)e−2πi(B−1n m)·kγn(j)e2πi(B−1

n m)·j

=∑n,k

f(k)gn(k)γn(j)∑m

e2πi(B−1n m)·(j−k)

where the inner sum (over m) we recognize as the sum of modulation func-tons, which is non-zero only when j − k is in the lattice B∗Zd. The termgn(k)γn(j) is non-zero only when j − k is in the finite difference set

supp(γn)− supp(gn)

which, by construction, is the same set as supp(wn) − supp(wn). But theintersection

B∗Zd ∩ (supp(wn)− supp(wn))

is just the origin, and so the above sum collapses to the non-zero term withj = k, and becomes

=∑

n

f(j)gn(j)γn(j)|det Bn|

= f(j)∑

n

wn(j)

= f(j),

since the wn sum to one.

Having chosen the analysis windows gn with small support relative tomatrix Bn, the frame operator is also in a particularly simply form, asindicated in the following.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 14: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 14

Proposition 3 With window functions gm chosen as above, the frame op-erator

Sf =∑m,n

〈f, gmn〉gmn

is a multiplication operator on l2(Zd), by values

s(j) =∑

n

|gn(j)|2|det Bn|.

Proof. We compute the pointwise values

(Sf)(j) =∑m,n

〈f, gmn〉gmn(j)

=∑n,k

f(k)gn(k)gn(j)∑m

e2πi(B−1n m)·(j−k)

which collapses, as in the previous proof, to the sum

=∑

n

f(j)gn(j)gn(j)|det Bn|

= f(j)s(j)

with s(j) =∑

n |gn(j)|2|det Bn|.

There is a well-developed theory for the expansion of functions by non-orthogonal families of “basis” functions, namely frame theory, which is be-yond the scope of this article (see for instance [1]). However, it is useful toinsert the following observation, which is relevant to frame theory.

Corollary 4 A tight frame is obtained if and only if the functions w′n de-

fined byw′

n(j) = |gn(j)|2|det Bn|

form a partition of unity on Zd, times a fixed constant.

Proof. This is a consequence of the observation that the frame is tightif and only if the frame operator S is a scalar multiple of the identity;equivalently, that the multiplication operator S with values s(j) is a constantfunction. Since s(j) =

∑n w′

n(j), tightness is equivalent to the w′n forming

a partition of unity, up to scaling by some constant.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 15: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 15

It is worth observing that if the original partition of unity {wn} is non-negative, the choice of analysis window

gn =(

wn

|det Bn|

)1/2

will give a tight frame. It is also interesting to observe that once an analysiswindow gn is chosen with suitably small support relative to B∗

nZd, thenany choice of dual window with small support (including the canonical dualγc

n = S−1gn) gives rise to a partition of unity, as noted in the followingproposition.

Proposition 5 Suppose analysis windows gn and matrix Bn are chosensuch that supp(gn) is finite, and the intersection

B∗nZd ∩ (supp(gn)− supp(gn))

contains only the origin. If γ′n is any choice of dual windows, with supportthe same as the corresponding gn, that satisfies the reconstruction

f =∑m,n

〈f, gmn〉γ′mn for all f ∈ l2(Zd),

then the functionsw′

n = γ′gn|det Bn|

form a partition of unity for the set Zd.

Proof. As in the calculation above, we have

f(j) =∑m,n

〈f, gmn〉γ′mn(j)

= f(j)∑

n

γ′n(j)gn(j)|det Bn|

= f(j)∑

n

w′n(j).

The only way this equality can hold for all f is if the w′n sum to one.

For the canonical dual γcn = S−1gn, since operator S is simply an invert-

ible multiplication operator, the support of γcn is the same as the support

of gn, and thus the canonical dual times gn|det Bn| forms a partition ofunity {w′

n}. It is important to notice this is usually not the well-designed

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 16: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 16

partition of unity {wn} that we started out with, and the canonical dualdoes not necessarily have the nice properties, such as smoothness, that wedesigned in the factorization. Again, Figure 1 is a typical example of a poorcanonical dual.

Thus, in standard Gabor theory, there often are partitions of unity lurk-ing around in the background. Our approach in this paper can be summa-rized as saying that we begin with a well-designed partition of unity, andcreate well-behaved windows from this partition.

Remark: In certain applications, it is convenient to chose some windowswith non-finite support; for instance, in some filtering applications, it isuseful to set gn = wn and γn ≡ 1. Technically, this doesn’t quite work, asone recovers (in the reconstruction) a periodization of the original signal.However, all is not lost: by a good choice of the frequency lattice, one canensure the reconstruction is exact on the support of signal f , and just ignorethe periodization that occurs outside the support. More precisely, in manyapplications, there is some reasonable finite set F ⊂ Zd such that everysignal f of interest has support in F ; this set F may be used to truncatethe window γn to finite support. Given a partition of unity {wn}, we wishto chose a factorization with

wn = γngn|det Bn| on set F ,

where for the moment, matrix Bn is unspecified. One can choose supportsfor the windows to lie in the finite set F , and also

supp(γn) ∩ supp(gn) = supp(wn) ∩ F.

Now choose matrix Bn so that

B∗nZd ∩ (supp(γn)− supp(gn)) = {0}.

All the result above apply. Thus larger support are possible for γn or gn

than specified by the partition of unity. However, the price paid is thatmatrix Bn may have a large determinant, which means many modulationfunctions are required in analysis and reconstruction.

6 Speed of inverse

The discrete Gabor transform may be implemented in a straightforwardmanner using the Fast Fourier Transform. The Gabor coefficients

Vmn(f) = 〈f, gmn〉= 〈fgn, Pm〉

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 17: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 17

are obtained by fixing n, and taking a discrete Fourier transform of thewindowed signal fgn, over the frequencies determined by matrix (Bn)−1.Of course, for the fastest FFT implementation, Bn should be chosen to be adiagonal matrix with powers of 2 along the diagonal. With window functiongn of finite support, or more generally with signal f of finite support, thistruly gives a discrete, finite Fourier transform.

Other implementations of the forward Gabor transform use periodizationtechniques to speed up the transform computations. A MATLAB routineprovided by Feichtinger [4] is particularly effective. Figure 6 shows a com-parision of Feichtinger’s frame-based implementation to the direct methodvia the fast Fourier transform. Clearly, Feichtinger’s implementation is muchfaster than the direct method.

0 200 400 600 800 1000 1200−3

−2.5

−2

−1.5

−1Forward transform

log1

0(cp

u tim

e)

Points in time series

Frame theoryThis paper

Figure 6: Comparison of speed: frame-based implementation, and directmethod.

For the inverse transform arising from a partition of unity, a direct im-plementation by the FFT is also possible. The reconstruction of signal f is

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 18: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 18

obtained from the Gabor coefficients Vmn as

f(j) =∑m,n

Vmnγmn(j)

=∑

n

γn(j)

[∑m

Vmne2πi(B−1m)·j

]=

∑n

γn(j)iFFTm(Vmn)(j);

that is, for each index n, we take the inverse FFT of the coefficients Vmn

(transforming over index m), then take the pointwise product with γn toobtained a windowed slice of the output. Summing over each slice (indexedby n) recovers the signal f . (Keep in mind, the index set for m is somefinite cube as determined by matrix Bn, and in practice there are onlyfinitely many windows as indexed by n, so this is all a finite calculation.)

This direct FFT implementation of the inverse transform is quite fast.Figure 7 compares this method with code we obtained from Feichtinger. Inthis case, our POU technique allows for a significant speedup for computingthe inverse transform; in particular, we never need to use the frame operatorS explicitly, and never need to compute its inverse. The total time for ourmethod, combining both the forward and inverse transforms, is generallymuch faster, especially for long time series.

Although we have not done a detailed analysis of why our method isfaster, or whether there is room for improvement, it has allowed us to im-plement a practical method for Gabor deconvolution, a technique using Ga-bor multipliers to enhange the resolution of images in seismic data process-ing [13].

7 Implementation errors

In many applications, the signal f to be analyzed has compact support; thatis, for sampled signals, only finitely many sample values are nonzero. It isconvenient to choose windows with compact support, appropriately spreadout, so that only finitely many Gabor coefficients 〈f, gmn〉 are non-zero.Thus, complete information about the signal in Gabor space may be storedin finite number of coefficients – namely, coefficients for those (translated)windows whose support intersects with the support of the original signal.

However, a common implementation error is to use coefficients for asmaller set of windows, often those windows whose support is a subset of

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 19: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 19

0 200 400 600 800 1000 1200−2.5

−2

−1.5

−1

−0.5

0

0.5

1Inverse transform

log1

0(cp

u tim

e)

Points in time series

Frame theoryThis paper

Figure 7: Inverse speed: frame-based implementation, and our method.

the support of the signal – this is often for practical considerations in pro-gramming, where it is difficult to increase the size of the data array wherethe signal lives. This almost always leads to an “edge effect” type of error,when the signal is not properly reconstructed near the ends of the signal.Figure 8 shows a typical example, where a signal supported on interval [0, 5]is analyzed, and re-synthesized with raised cosine windows each of length 2.By not properly dealing with the edges, an error in reconstruction occurs.This type of error can occur even when no filtering is done.

In Figure 9, two additional windows are included, and this gives theproper reconstruction of the signal. In general, the key to a successful imple-mentation, including in higher dimensions, is to use all windows translatedvia the lattice whose support intersects with the support of the signal. Fornon-compactly supported windows, such as Gaussians, every window mayintersect with the signal and thus any finite implementation introduces someerror; with Gaussians, this error can be made arbitrarily small by includingsufficiently many.

Another potential source of error (or “edge effects”) again caused by aprogrammer’s insistence on not letting data arrays “get bigger than theyneed to be” is caused by the implicit periodization of a signal in the Gabor

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 20: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 20

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5−3

−2

−1

0

1

2

3

Signal

Windows

Reconstruction

Figure 8: Too few windows give a poor reconstruction.

−1 0 1 2 3 4 5 6−3

−2

−1

0

1

2

3

Signal

Windows

Reconstruction

Figure 9: Windows across the edge give a proper reconstruction.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 21: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 21

domain. When represented in the Gabor domain, a single windowed signalis equivalent to periodic version of the signal, repeating out to infinity. Per-forming a smoothing operation, such as a convolution, can cause a portionof the periodic signal to “leak” back into the windowed area; reconstructionwould then include these leakages. Figure 10 shows a conceptualization ofthis effect. This type of error only occurs when filtering (or multiplicationin the Gabor domain) has been implemented.

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5−1.5

−1

−0.5

0

0.5

1

1.5

2

Signal

Windowed signal

Periodized signal

Figure 10: Effective periodization of a signal in Gabor domain.

The solution to this is, of course, to chose matrix B with even largerentries; effectively, this increases the length of the period, and so leakageerrors have further to travel before mapping back into the windowed area.More precisely, given the windowed signal in some interval [m, n], one createsa zero pad by increasing the interval to [m−a, n+a], and perform the FFTon this larger interval. (More data points corresponds to larger B.) Indeed,in some applications, it can be useful to use the whole support of signal fas the analysis interval for each windowed signal — wraparound errors arealmost never a problem then.

8 The discrete Gabor transform on a lattice

Notwithstanding our interest in general partitions of unity, it is useful torestrict to the case where the partition arises as a collection of translationsof a single function. More precisely, we wish to analyze functions f in l2(Zd),

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 22: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 22

via translations and modulations of a given window function g along somelattice, and resynthesize it with a dual function γ. To this end, fix g andγ as bounded functions on Rd, translation matrix A ∈ Md(R) an invertibled× d matrix with real entries, and inverse frequency matrix B ∈ Md(Z) aninvertible d× d matrix with integer entries.

We point out explicitly that here, the analysis and synthesis windowsare more generally functions on Euclidean space (for instance, Gaussians),and one is permitted to translate them by arbitrary real vectors – typically,these windows and their translates are computed on the fly, and there is noneed to restrict the translations to the standard lattice. Indeed, in manyapplications, it is advantageous to use these general forms for the windowfunctions. In constrast, the function f is defined on the regular latticeZd, as it usually comes from sampled data in real applications. One mustrequire some moderate conditions on the decay of g, γ to ensure the sumof their translates converge; piecewise continuous with compact support, orintegrable (in Rd) is sufficient for our purposes here. Also note the inversefrequency matrix B need not be diagonal, as again there may be advantagesto sampling on a non-standard frequency lattice. Integer entries for B,however, are required for the reconstruction theorem.

The set of points {An : n ∈ Zd} forms a discrete lattice in Rd, while theset {Bm : m ∈ Zd} forms a sublattice of the discrete lattice Zd. A translateof function g along the lattice AZd is defined by

gn(x) = g(x−An), for all x ∈ Rd,

while the modulation of gn by frequencies B−1m is defined as

gmn(x) = gn(x)e2πi(B−1m)·x, for all x ∈ Rd.

The translations and modulation of the dual window γ are defined similarly.(The order of operation of translation and modulation is important. We havefixed it here with translations first, but observe that in some applications, itis relevant whether one is measuring phase relative to the signal, or relativeto the translated window.)

The discrete Gabor transform (for given A,B, g and γ) is defined asa map of functions f ∈ l2(Zd) to V (f) ∈ l∞(Zd × Zd) using the Gaborcoefficients

Vmn(f) = 〈f, gmn〉 =∑

k

f(k)g(k −An)e−2πi(B−1m)·k,

where 〈, 〉 denotes the usual inner product on l2(Zd). Since the inverse ofmatrix B occurs in the modulation, it is immediately clear that Vmn(f) is

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 23: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 23

periodic in m, with period B; that is Vmn(f) = Vm′n(f) when m ∼ m′

(modulo BZd). Thus the Gabor transform is completely determined on thefinite quotient set Zd/BZd, and the reconstruction of f may be defined bythe sum

f =∑

m ∈ Zd/BZd,n ∈ Zd

Vmn(f)γmn.

That is, the reconstruction of f is obtained by taking a linear combinationof translations and modulation γmn of the dual window function γ, usingweights Vmn(f), which come from the Gabor transform of f . The remark-able result is that this reconstruction depends only sparsely on the originalfunction f ; that is, the matrix representing this linear transformation fromf to f has many zeroes — we only need sum over equivalence classes in thesublattice B∗Zd.

Proposition 6 The reconstruction f satisfies

f(j) = |det(B)|∑

j′∼∗j

c(j, j′)f(j′)

for all j ∈ Zd, where the sum is over all indices j′ equivalent to j moduloB∗Zd, and c is the correlation function between the two functions γ, g overthe lattice generated by A, given as

c(j, j′) =∑

n

γ(j −An)g(j′ −An).

Proof. We compute:

f(j) =∑m,n

Vmn(f)γmn(j)

=∑m,n

Vmn(f)γ(j −An)e2πi(B−1m)·j

=∑m,n

(∑j′

f(j′)g(j′ −An)e−2πi(B−1n)·j′)γ(j −An)e2πi(B−1m)·j

=∑n,j′

f(j′)g(j′ −An)γ(j −An)

[∑m

e2πi(B−1m)·(j−j′)

]=

∑n,j′

f(j′)g(j′ −An)γ(j −An)P (j − j′)

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 24: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 24

where we recognize the last sum over m ∈ M as a sum of modulationfunctions as in Proposition 1, and thus this sum is equal to |det B| whenj− j′ ∈ B∗Zd, and zero otherwise. Thus, the sum over j′ collapses to a sumover those j′ equivalent to j modulo B∗Zd, and we write

f(j) = |det B|∑

n,j′∼∗j

f(j′)g(j′ −An)γ(j −An)

= |det B|∑

j′∼∗j

[∑n

g(j′ −An)γ(j −An)

]f(j′)

= |det B|∑

j′∼∗j

c(j, j′)f(j′)

where c(j, j′) =∑

n γ(j −An)g(j′ −An) is the correlation function.

Combining with the results in Section 5, we obtain the following.

Corollary 7 If invertible integer matrix B is chosen so that

(supp(γ)− supp(g)) ∩B∗Zd = {0}

and the functions wn = γngn form a partition of unity on Zd, then thereconstruction above satisfies

f = |det B|f for all f ∈ l2(Zd).

Proof. As in the previous section, the correlation function

c(j, j′) =∑

n

γ(j −An)g(j′ −An)

is non-zero only when j − j′ is in the set supp(γ)− supp(g). In the sum forthe reconstruction formula, we only get non-zero terms when j− j′ is in thelattice B∗Zd; combined with the observation about where c is non-zero, weconclude the sum collapses, and thus

f(j) = |det B|c(j, j)f(j).

With γngn a partition of unity, these diagonal entries c(j, j) are exactly one,and thus

f(j) = |det B|f(j).

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 25: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 25

One easy way to obtain a partition of unity over lattice translations issimply to fix a non-negative function v : Rd → R and symmetrize over thelattice AZd. That is, we define

w(x) =v(x)∑

n∈Zd v(x−An)for all xinRd.

Provided the denominator is never zero, this gives rise to a partition of unityby translating along AZd. A fatorization of the partition of unity may beobtained by setting

g(x) = w(x)p

γ = w(x)1−p

for any real parameter 0 ≤ p ≤ 1.The constructions the appendix show other ways to obtain practical

partitions of unity.

9 Gaussians and the Gabor transform

The original transform of Denis Gabor was defined using Gaussian windowson Euclidean space, for analysizing functions in L2(Rd). These Gaussians,restricted to the discrete lattice Zd, are useful windows for implementingthe discrete Gabor transform. For instance, the corresponding discrete cor-relation function is almost constant on the diagonal, and vanishes rapidlyoff the diagonal. Thus, while not exact, the reconstruction formula givesan approximate rescaling of the original signal f . The following provides aprecise statement of these facts.

Proposition 8 Suppose functions γ and g are Gaussians on Rd; that is,there are constants a, a′ > 0 with

γ(x) = e−ax·x

g(x) = e−a′x·x

for all x ∈ Rd. For a, a′ sufficiently small, the correlation function is nearlyconstant on the diagonal.

Proof. More precisely, we will prove for any ε > 0, we may choose a, a′

sufficiently small that

C(1− ε) ≤ cγ,g(j, j) ≤ C(1 + ε), for all j ∈ Zd,

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 26: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 26

where C is some normalizing constant. This result follows from the observa-tion that the sum of integer translates of a one-dimensional Gaussian e−ax2

is an even periodic function with cosine expansion∑n∈Z

e−a(x−n)2 = C(1 + 2e−1/aπ2cos(2πx) + 2e−4/aπ2

cos(4πx) + . . .);

that is, the LHS is simply the convolution of a Gaussian with a comb ofdelta functions, so its Fourier transform over the real line is a dual Gaussianmultiplied by the same comb of delta functions, which we can express as asum of cosines with weights given by the dual Gaussian evaluated at integerlocations. In this one dimensional case, given ε < 1, simply take a smallenough that 3e−1/aπ2

cos(2πx) < ε to force almost constant. (Note: twotimes the exponential is enough to dominate the first non-constant term inthe expansion, while the three is more than enough to dominate the firstterm and all the rest.) In the d-dimensional case on lattice AZd, diagonalizematrix AT A, and reduce to a product of one dimensional cases. The cor-relation function is simply a product of scaled versions of the above cosineexpansion.

Proposition 9 Suppose window functions γ, g are Gaussians on Rd; thatis, there are constants a, a′ > 0 with

γ(x) = e−ax·x

g(x) = e−a′x·x

for all x ∈ Rd. Then the correlation function c(j, j′) for the windows goesto zero rapidly as j − j′ gets large. That is, there exists constant C ′ with

c(j, j′) ≤ C ′e− aa′

a+a′ |j−j′|2, for all j, j′ ∈ Zd.

Proof. With j, j′ fixed, let j′′ = (aj +a′j′)/(a+a′) denote the weightedaverage of j, j′ and an easy computation shows

a(j−x)·(j−x)+a′(j′−x)·(j′−x) = (a+a′)(j′′−x)·(j′′−x)+aa′

a + a′(j−j′)·(j−j′).

Thus

γ(j −An)g(j′ −An) = e−(a+a′)(j′′−An)·(j′′−An)e− aa′

a+a′ (j−j′)·(j−j′)

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 27: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 27

and summing over all n gives the estimate

c(j, j′) ≤ C ′e− aa′

a+a′ |j−j′|2

where C ′ =∑

n∈Zd e−(a+a′)(An)·(An).

Note, we can estimate C ′ above by replacing the sum with an integral,and find that

C ′ ≈ (π

a + a′)d/2 1

det(A).

We may now choose a, a′ small enough that the correlation functionis nearly constant on the diagonal, then choose integer matrix B “large

enough” so that the term Ce− aa′

a+a′ |j−j′|2 is sufficiently small on the non-zeropoints in the sublattice BZd.

Proposition 10 Suppose the functions γ and g are Gaussians on Rd; thatis, there are constants a, a′ > 0 with

γ(x) = e−ax·x

g(x) = e−a′x·x

for all x ∈ Rd. Then for a, a′ sufficiently small, and integer matrix Bsufficiently large, the reconstruction satisfies

f ≈ |det B|C · f,

for some constant C. That is, we have an approximate reconstruction.

Proof. With a, a′ sufficiently small, the diagonal terms in the expansion

(f) = |det B|∑

j′∼B∗j

c(j, j′)f(j′)

are nearly constant, and introduce an error no larger than (|det B|Cε), timesthe size of f , as indicated in Proposition 6. The off-diagonal terms are

bounded by C ′e− aa′

a+a′ |j−j′|2 , with j − j′ ∈ B∗Zd, so with B large enough,these terms are small.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 28: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 28

10 Summary

We have shown that by using a partition of unity on the integer lattice Zd,we may define a generalized Gabor transform that provides a non-uniformtime/frequency decomposition of a signal, which comes with an associatedinverse transform. The Gabor coefficients depend only locally on the signal,as determined by the size and location of the support of the functions in thepartition, while the size of the frequency lattice must be chosen complimen-tarily to the size of the support. By factoring the functions in the partition,we obtain directly the Gabor synthesis and analysis windows; with a goodchoice of functions in the partition (eg. smooth, non-negative, compactsupport), we obtain Gabor windows with similar characteristics, which areuseful for practical signal processing tasks.

We have used the partition of unity technique to extend the standarddiscrete Gabor transform to more general lattices in Euclidean space, andto the approximate case with Gaussian windows. The inverse transform isshown to be fast, and thus practical, and we have examined a number ofother practical issues that arise in a real implementation of this generalizedGabor transform, in particular the reduction of artifacts.

Acknowledgments

We thank NSERC, MITACS, the sponsors of POTSI (PseudodifferentialOperator Theory in Seismic Imaging - a joint project between the depart-ments of Geophysics and Mathematics at University of Calgary) and theCREWES Project for their generous financial support. This work evolvedfrom a seminar on Gabor Analysis, led by POTSI, attended by the authorsover the past two years at University of Calgary.

References

[1] Daubechies, I., Grossmann, A., and Meyer, Y. (1986). Painlessnonorthogonal expansions: J. Math. Phys., 27 No. 5, 1271–1283.

[2] Feichtinger, H. G. and Nowak, K., (2003) A first survey of Gabor multi-pliers, Advances in Gabor analysis, 99–128, Appl. Numer. Hamon. Anal.Birkhasuer Boston.

[3] Feichtinger, H. G. and Strohmer, T. (1998). Gabor analysis and algo-rithms, theory and applications, Birkhauser.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 29: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 29

[4] Feichtinger, H. G. (2003). MATLAB code, in personal communication.

[5] Gabor, D. (1946). Theory of communication, J. IEEE, 93, 429–457.

[6] Gibson, P. and Lamoureux, M., (2003). Maximally symmetric, minimallyredundant partitions of unity in the plane, preprint.

[7] Grochenig, K. (2001). Foundations of time-frequency analysis,Birkhauser.

[8] Grossman, J. P., Margrave, G. F., Lamoureux, M. P., and Aggarwala,R., (2001). Constant-Q wavelet estimation via a nonstationary Gaborspectral model, CREWES Research Report 2001, Vol. 13.

[9] Grossman, J. P., Margrave, G. F., and Lamoureux, M. P., (2002). Fastwavefield extrapolation by phase-shift in the nonuniform Gabor domain,CREWES Research Report 2002, Vol. 14.

[10] Grossman, J. P., Margrave, G. F., and Lamoureux, M. P., (2002). Con-structing adaptive nonuniform Gabor frames from partitions of unity,CREWES Research Report 2002, Vol. 14.

[11] Hoffman, H. and Kunze, R. (1971). Linear Algebra, Prentice-Hall.

[12] Margrave, G. F. and Lamoureux, M. P., (2001). Gabor deconvolution,CREWES Research Report 2001, Vol. 13.

[13] Margrave, G. F., Henley D. C., Lamoureux, M. P., Iliescu, V., andGrossman, J. P., (2002). An update on Gabor deconvolution, CREWESResearch Report 2002, Vol. 14.

[14] Strang, G. and Nguyen, T., (1997). Wavelets and Filter Banks,Wellesley-Cambridge Press.

Submitted July 2003

Department of Mathematics and Statistics,University of Calgary, 2500 University Drive NW

T2N 1N4 Calgary, Canadae-mail: [email protected]

Department of Mathematics and Statistics,University of Calgary, 2500 University Drive NW

T2N 1N4 Calgary, Canadae-mail: [email protected]

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 30: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 30

Department of Geology and Geophysics,University of Calgary, 2500 University Drive NW

T2N 1N4 Calgary, Canadae-mail: [email protected]

Departments of Geology and Geophysics, Mathematics and Statistics,University of Calgary, 2500 University Drive NW

T2N 1N4 Calgary, Canadae-mail: [email protected]

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 31: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 31

A APPENDIX: Examples of partitions of unity

As discussed in the main section of this paper, a partition of unity is acollection of functions on Zd which sum to the constant function one; thatis, a collection of functions wn with∑

n

wn(z) = 1, for all z ∈ Zd.

It is worth pointing out that there is a general construction to obtain apartition of unity with useful characteristics: given any family of functionsφn (with n running over some index set, possibly infinite), we set

wn(z) =φn(z)∑n′ φn′(z)

.

Provided the denominator is never zero, nor infinite, the resulting functionswn form a partition of unity. If the φn are chosen non-negative, then so arethe wn; if the φn each have compact support, then so do the wn; and so on.That is, by choosing the φn with suitable characteristics, often the partitionof unity has simliar characteristics, which can be important for typical signalprocessing applications. It is sometimes convenient to begin with one basicfunction φ0 defined on Euclidean space Rd and define a family of functionsby translation:

φn(z) = φ0(z −An),

where A is a fixed d×d matrix and n ∈ Zd the index vector; with the supportof φ0 compatible with the norm of matrix A, a partition of unity is obtainedby the normalization method mentioned above.

There are of course many examples of partitions of unity built via simpleconstructions. In dimension one, translates of the boxcar function of lengtha give the simplest partition, with

wn(z) ={

1 for (n− 12)a ≤ z < (n + 1

2)a0 otherwise.

More generally, any doubly infinite, increasing sequence . . . k−1, k0, k1, . . . ofintegers can be used to define a partition of unity with boxcar functions

wn(z) ={

1 for kn ≤ z < kn+1

0 otherwise.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 32: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 32

A smoother choice of partition is obtained via translates of the raised cosinewindow, yielding functions

wn(z) ={

12(1 + cos(πz/a)) for (n− 1)a < z < (n + 1)a0 otherwise,

which also forms partition of unity on the set Z; that is, translates of thecosine hump sum uniformly to one. (In fact, they sum to one even whenextended to all real points R.) Each member in this family of functionshas compact support, and is the restriction (to the integers) of a continuousfunction with continuous derivative, which has some advantages as a windowfunction for signal processing.

More generally, one may design a partition of unity using translates ofa spline of class Ck(R); that is, a smooth function on R supported on somecompact interval [−a, a], constant one on the subinterval [−b, b] and chosenso the overlapping edges of translates sum to one. For instance, begin withthe unique odd polynomial p(x) of degree 2k + 1 that takes value p(1) = 1,with derivatives p(k′)(1) = 0 for k′ = 1, 2, . . . k. With parameters a > b > 0fixed, define the basic window function by

w0(z) =

12(1 + p( b+a+2z

a−b )) if −a ≤ z ≤ −b

1 if −b ≤ x ≤ b12(1 + p( b+a−2z

a−b )) if b ≤ z ≤ a.

Translates of this window by multiples of a + b forms a partition of unityfor Z, and indeed for R as well. (Our research team has named these “Lam-oureux windows” although they are properly called splines.) A C∞ windowmay be formed by replacing the polynomial p(x) in the formulas above witha rescaled version of the hyperbolic tangent function, p(x) = tanh( x

x2−1).

Figure 11 gives an example of a degree five Lamoureux window, with con-tinuous second derivatives.

In dimension d, a direct product of one-dimensional partitions overa1Z, . . . , adZ, such as

wd(x) = w(x1)w(x2) . . . w(xd),

forms a discrete partition of unity over the d-dimensional lattice a1Z× . . .×adZ. Other partitions, not of this form, may be defined: for instance, thehexagonal function shown in Figure 12 is given by symmetrizing a functionφ of compact support in R along a hexagonal lattice L6 to obtain a basicwindow function w0 as

w0(z) =ϕ(z · z)∑

l∈L6ϕ((z − l) · (z − l))

, for all z ∈ Z2.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 33: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 33

−100 −80 −60 −40 −20 0 20 40 60 80 1000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Figure 11: A C2 Lamoureux window, with p(x) = (15x − 10x3 + 3x5)/8,a, b = 100, 50.

Translates of w0 over the lattice L6 gives a partition of unity.

Figure 12: A partition of unity with hexagonal symmetry.

Each of these examples is a partition of unity with compact support.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 34: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 34

B APPENDIX: Proof of Proposition 1

In Section 4, we introduced the notion of frequency sampling on a non-rectangular lattice. Here we prove the key results leading to Proposition 1.Recall, B is an invertible d × d matrix with integer entries, for any indexm ∈ Zd, we define modulation function Pm by

Pm(j) = e2πi(B−1m)·j , for all j ∈ Zd,

and two equivalence relations are defined on the lattice Zd by

m ∼ m′ iff m−m′ ∈ BZd,

andm ∼∗ m′ iff m−m′ ∈ B∗Zd,

where B∗ is the transpose of matrix B.As is well-known from group theory, the equivalence ∼ divides up the

group Zd into equivalence classes, and these classes form elements of the so-called quotient group, denoted Zd/BZd. Since B is invertible, the quotientis a finite abelian group, and thus a direct product of cyclic groups. In fact,one may determine this quotient group precisely as in the following:

Proposition 11 Suppose B ∈ Md(Z) is an invertible, d×d matrix with in-teger entries. Then B factors uniquely as B = UZ, where U,Z are integermatrices, U is upper triangular with positive diagonal, and Z has determi-nant ±1. With

U =

M1 ∗ . . . ∗0 M2 . . . ∗...

.... . .

...0 0 . . . Md

,

where M1,M2, . . . Md are positive integers, then the cube

M = [0, 1, . . . M1 − 1]× [0, 1, . . . M2 − 1]× . . . [0, 1, . . . Md − 1] ⊂ Zd

maps bijectively onto the quotient group Zd/BZd.

Proof. Column reduction of matrix B over the ring of integers givesthe factorization above; forcing the diagonal to be positive gives uniqueness.The cardinality of the quotient group Zd/BZd is given by a volume form,which is just |det(B)| = M1 · M2 · . . .Md, and agrees with the cardinalityof the cube M . Thus, we need only verify the quotient map Zd → Zd/BZd

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 35: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 35

is injective on M . Since this map is a group homomorphism, it suffices toshow the kernel of the quotient map, intersect M , is just the zero element.So, if m ∈ M is equivalent to 0 mod BZd, then m = Bz for some elementz ∈ Zd. By the factorization,

m =

M1 ∗ . . . ∗0 M2 . . . ∗...

.... . .

...0 0 . . . Md

Zz

for some integer vector z. Starting at the last component in this equation,one sees that md = Mdzd, for some integer zd. Since 0 ≤ md < Md,one concludes that md = zd = 0. For the next-to-last component, thenmd−1 = Md−1zd−1 + (∗)zd; but since zd was zero, this simplifies to md−1 =Md−1zd−1. Once again, since 0 ≤ md−1 < Md−1, one obtains md−1 = zd−1 =0. Working back in this manner, one concludes all the components of m arezero, so m = 0, as desired.

The cube M = [0, . . . ,M1−1]×[0, . . . ,M2−1]×. . .×[0, . . . ,Md−1] aboveis precisely the cube that appears in Proposition 1. With this factorization,parts 1, 2, and 3 of Proposition 1 become clear (the periodicity comes fromobserving j ∼∗ j′ introduces a difference of an integer offset in the complexexponential e2πi, which exponentiate to no difference; similar for m ∼ m′).Part 4 is proved in the following.

Proposition 12 Define function P as

P (j) =∑

m∈Zd/BZd

e2πi(B−1m)·j , for vectors j ∈ Zd,

which the sum of modulation functions Pm(j). Then

P (j) ={|det(B)| if j ∈ B∗Zd

0 otherwise,

where B∗Zd is the discrete sublattice generated by the integer matrix B∗

obtained by transposing matrix B.

Proof. As noted above, the sum over the quotient is well-defined, sincethe modulation functions Pm, Pm′ are the same for vectors m, m′ equivalentmod BZd. Also, observe that the function P (j) is constant on equivalence

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 36: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 36

classes of j mod B∗Zd, for if j ∼∗ j′, then j′ = j + B∗z for some integervector z and thus the corresponding exponentials agree, for

e2πi(B−1m)·j′ = e2πi(B−1m)·(j+B∗z) = e2πi(B−1m)·je(BB−1m)·(z) = e2πi(B−1m)·j ;

Hence P (j) = P (j′).Now clearly, P (0) =

∑1, where the sum of these ones is just the car-

dinality of the quotient group, which is exactly |det(B)|; by periodicity,P (j) = |det(B)| for all j ∈ B∗Zd.

To show the other j evaluate to zero, we will show that P (j) 6= 0 impliesj ∈ B∗Zd. Fix j with P (j) 6= 0, and observe for all vectors m, by thefactorization of B as B = UZ, we have

(B−1m) · j = (Z−1U−1m) · j = (U−1m) · (Z∗)−1j = (U−1m) · z,

where we set z = (Z∗)−1j, an integer vector. Now, sum exponentials overvectors m in the cube M defined in the previous proposition, using the fac-torization for B, and expanding each m as a linear combination of standardbasis vectors e1, . . . ed, we observe

P (j) =∑

m∈M

e2πi(B−1m)·j

P (j) =∑

m∈M

e2πi(U−1m)·z

=∑

m∈M

d∏k=1

e2πi((U−1ek)·z)mk

=d∏

k=1

∑0≤mk<Mk

e2πi((U−1ek)·z)mk

Now, from the upper triangular form for U , we know U−1 is also uppertriangular, with diagonal entries 1/M1, 1/M2, . . . , 1/Md. Looking at thek = 1 factor in the above product, we see (U−1e1) · z = z1/M1, the firstcomponent of vector z, divided by the integer M1 on the diagonal of U .Since the factor ∑

0≤m1<M1

e2πi((U−1e1)·z)m1 =∑

0≤m1<M1

e2πi(

z1M1

)m1

is non-zero, the M1-root of unity e2πi(

z1M1

) must the the trivial root (i.e. one),

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003

Page 37: A fast, discrete Gabor transform via a partition of unitycaam641/inverseGaborFooter.pdfThe Gabor transform is a mathematical transformation of functions that provides a joint time/frequency

A fast, discrete Gabor transform 37

so z1 is a multiple of M1. Thus

z =

aM1

z2

z3...zd

.

Now, define j′ = j−B∗

a0...0

, so j′ is equivalent to j mod B∗Zd, and hence

P (j′) is non-zero as well. The corresponding vector z′ is thus

z′ = (Z∗)−1j′ = z − U∗

a00...0

=

0z′2z′3...z′d

.

That is, this new vector z′ has a zero in the first component. As in theargument above, we now examine the factor for k = 2, with

∑0≤m2<M2

e2πi((U−1e2)·z′)m2 =∑

0≤m2<M2

e2πi(

z′2M2

)m2

and since it is non-zero, we now conclude z′2 is a multiple of M2, and thus

z′ =

0bM2

z′3...z′d

.

Continuing for each factor in the product, we eventually construct vectorz(d), all of whose components are zero, and j(d) = (Z∗)z(d) = 0 which isequivalent to the original j (mod B∗Zd), so we have that j ∈ B∗Zd, asdesired.

Submitted to the Journal of Fourier Analysis and Applications, 2 July 2003