A WAVELET TOUR OF SIGNAL PROCESSING
This Page Intentionally Left Blank
A WAVELET TOUR OF S I G N A L PROCESSING Second Edition St~phane Mallat Ecole Polytechnique, Paris Courant Institute, New York University
ACADEMIC PRESS An Imprint of Elsevier San Diego
San Francisco New York
Boston London Sydney Tokyo
This book is printed on acid-free paper. (~ Copyright 9 1998, 1999, Elsevier All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopy, recording, or any information storage and retrieval system, without permission in writing from the publisher. Permissions may be sought directly from Elsevier's Science and Technology Rights Department in Oxford, UK. Phone: (44) 1865 843830, Fax: (44) 1865 853333, e-mail:
[email protected]. You may also complete your request on-line via the Elsevier homepage: http://www.elsevier.com by selecting "Customer Support" and then "Obtaining Permissions". Academic Press
An Imprint of Elsevier
525 B Street, Suite 1900, San Diego, California 92101-4495, USA http://www.academicpress.com
Academic Press 84 Theobald's Road, London WC1X 8RR, UK http://www.academicpress.com ISBN- 13: 978-0-12-466606-1
ISBN- 10: 0-12-466606-X
A catalogue record for this book is available from the British Library Produced by HWA Text and Data Management, Tunbridge Wells Printed in the United Kingdom at the University Press, Cambridge PRINTED IN THE UNITED STATES OF AMERICA 07 08 09 10 11 9 8
A mes parents,
Alexandre et Francine
This Page Intentionally Left Blank
Contents
PREFACE
xv
PREFACE TO THE SECOND EDITION NOTATION
xx
xxii
INTRODUCTION TO A TRANSIENT WORLD I.I 1.2
1.3
1.4
1.5
Fourier Kingdom Time-Frequency Wedding 1.2. I Windowed Fourier Transform 1.2.2 Wavelet Transform Bases of Time-Frequency Atoms 1.3. I Wavelet Bases and Filter Banks 1.3.2 Tilings of Wavelet Packet and Local Cosine Bases Bases for What? 1.4. I Approximation 1.4.2 Estimation 1.4.3 Compression Travel Guide 1.5. I Reproducible Computational Science 1.5.2 Road Map ee
VII
2 2 3 4 6 7 9 11 12 14 16 17 17 18
eoo
VIII
CONTENTS
II FOURIER K I N G D O M 2.1
Linear Time-Invariant Filtering 1
2.2
2. I. ! Impulse Response 2.1.2 Transfer Functions Fourier Integrals 1
2.3
2.2. I
Fourier Transform in L 1(R)
2.2.2
Fourier Transform in L 2(R)
2.2.3 Examples Properties 1 2.3. I 2.3.2
Regularity and Decay Uncertainty Principle
2.4
2.3.3 Total Variation Two-Dimensional Fourier Transform 1
2.5
Problems
20 21 22 22 23 25 27 29 29 30 33 38 40
III DISCRETE REVOLUTION 3.1
3.2
3.3
3.4
Sampling Analog Signals 1 3. I. I Whittaker Sampling Theorem 3.1.2 Aliasing 3.1.3 General Sampling Theorems Discrete Time-Invariant Filters 1 3.2. I Impulse Response and Transfer Function 3.2.2 Fourier Series Finite Signals 1 3.3. I Circular Convolutions 3.3.2 Discrete Fourier Transform 3.3.3 Fast Fourier Transform 3.3.4 Fast Convolutions Discrete Image Processing 1 3.4. I Two-Dimensional Sampling Theorem 3.4.2 3.4.3
3.5
Discrete Image Filtering Circular Convolutions and Fourier Basis
Problems
42 43 44 47 49 49 51 54 55 55 57 58 59 60 61 62 64
ix
CONTENTS
IV TIME MEETS FREQUENCY 4.1 4.2
Time-Frequency Atoms 1 Windowed Fourier Transform 1 4.2. ! 4.2.2 4.2.3
4.3
4.4
4.5
4.6
Completeness and Stability Choice of Window 2 Discrete Windowed Fourier Transform 2
67 69 72 75 77
Wavelet Transforms 1
79
4.3. I 4.3.2 4.3.3
80 84
Real Wavelets Analytic Wavelets Discrete Wavelets 2
Instantaneous Frequency 2 4.4. I Windowed Fourier Ridges 4.4.2 Wavelet Ridges Quadratic Time-Frequency Energy 1 4.5. I Wigner-Ville Distribution 4.5.2 Interferences and Positivity 4.5.3 Cohen's Class 2 4.5.4 Discrete Wigner-Ville Computations 2 Problems
89 91 94 102 107 107 112 116 120 121
V FRAMES 5.1
5.2 5.3 5.4 5.5
5.6
Frame 5. I. I 5.1.2 5.1.3
Theory 2 Frame Definition and Sampling Pseudo Inverse Inverse Frame Computations
125 125 127 132
5.1.4 Frame Projector and Noise Reduction Windowed Fourier Frames 2 Wavelet Frames 2 Translation Invariance 1 Dyadic Wavelet Transform 2
135 138 143 146 148
5.5. I 5.5.2 5.5.3
150 153 156 160
Wavelet Design "Algorithme ?t Trous" Oriented Wavelets for a Vision 3
Problems
X
CONTENTS
VI WAVELET Z O O M 6.1
6.2
6.3
6.4
6.5
Lipschitz Regularity 1 6. I. I Lipschitz Definition and Fourier Analysis 6.1.2 Wavelet Vanishing Moments 6.1.3 Regularity Measurements with Wavelets Wavelet Transform Modulus Maxima 2 6.2. ! Detection of Singularities 6.2.2 Reconstruction From Dyadic Maxima 3 Multiscale Edge Detection 2 6.3. I Wavelet Maxima for Images z 6.3.2 Fast Multiscale Edge Computations 3 Multifractals 2 6.4. ! Fractal Sets and Self-Similar Functions 6.4.2 Singularity Spectrum 3 6.4.3 Fractal Noises 3 Problems
163 164 166 169 176 176 183 189 189 197 200 200 205 211 216
VII
WAVELET BASES 7.1
7.2
7.3
7.4
7.5
Orthogonal Wavelet Bases 1 7. I. I Multiresolution Approximations 7.1.2 Scaling Function 7.1.3 Conjugate Mirror Filters 7'. 1.4 In Which Orthogonal Wavelets Finally Arrive Classes of Wavelet Bases 1 7.2. I Choosing a Wavelet 7.2.2 Shannon, Meyer and Battle-Lemari6 Wavelets 7.2.3 Daubechies Compactly Supported Wavelets Wavelets and Filter Banks 1 7.3. I Fast Orthogonal Wavelet Transform 7.3.2 Perfect Reconstruction Filter Banks 7.3.3 Biorthogonal Bases of 12(Z) 2 B iorthogonal Wavelet Bases 2 7.4. I Construction of Biorthogonal Wavelet Bases 7.4.2 Biorthogonal Wavelet Design 2 7.4.3 Compactly Supported Biorthogonal Wavelets 2 7.4.4 Lifting Wavelets 3 Wavelet Bases on an Interval 2 7.5. I Periodic Wavelets
220 221 224 228 235 241 241 246 249 255 255 259 263 265 265 268 270 273 281 282
CONTENTS
xi
7.5.2
286
7.7
Folded Wavelets Boundary Wavelets 3 Multiscale Interpolations 2 7.6. I Interpolation and Sampling Theorems 7.6.2 Interpolation Wavelet Basis 3 Separable Wavelet Bases 1
284
7.5.3
7.8
7.7. I Separable Multiresolutions 7.7.2 Two-Dimensional Wavelet Bases 7,7.3 Fast Two-Dimensional Wavelet Transform 7.7.4 Wavelet Bases in Higher Dimensions z Problems
293 293 299 303 304 306 310 313 314
7.6
VIII WAVELET PACKET A N D LOCAL COSINE BASES 8.1
Wavelet Packets 2
8.2
8. I. I Wavelet Packet Tree 8.1.2 Time-Frequency Localization 8.1.3 Particular Wavelet Packet Bases 8.1.4 Wavelet Packet Filter Banks Image Wavelet Packets 2
8.4
8.2. I Wavelet Packet Quad-Tree 8.2.2 Separable Filter Banks Block Transforms 1 8.3. I Block Bases 8.3.2 Cosine Bases 8.3.3 Discrete Cosine Bases 8.3.4 Fast Discrete Cosine Transforms 2 Lapped Orthogonal Transforms 2
8.5
8.4. I Lapped Projectors 8.4.2 Lapped Orthogonal Bases 8.4.3 Local Cosine Bases 8.4.4 Discrete Lapped Transforms Local Cosine Trees 2
8.6
8.5. I Binary Tree of Cosine Bases 8.5.2 Tree of Discrete Bases 8.5.3 Image Cosine Quad-Tree Problems
8.3
322 322 327 333 336 339 339 341 343 344 346 349 350 353 353 359 361 364 368 369 371 372 374
oo
XII
CONTENTS
IX AN APPROXIMATION TOUR 9.1
9.2
9.3 9.4
9.5
9.6
Linear Approximations 1 9. I. I Linear Approximation Error 9.1.2 Linear Fourier Approximations 9.1.3 Linear Multiresolution Approximations 9.1.4 Karhunen-Lo~ve Approximations 2 Non-Linear Approximations 1 9.2. I Non-Linear Approximation Error 9.2.2 Wavelet Adaptive Grids 9.2.3 Besov Spaces 3 Image Approximations with Wavelets 1 Adaptive Basis Selection 2 9.4. I Best Basis and Schur Concavity 9.4.2 Fast Best Basis Search in Trees 9.4.3 Wavelet Packet and Local Cosine Best Bases Approximations with Pursuits 3 9.5. I Basis Pursuit 9.5.2 Matching Pursuit 9.5.3 Orthogonal Matching Pursuit Problems
377 377 378 382 385 389 389 391 394 398 405 406 411 413 417 418 421 428 430
X
ESTIMATIONS ARE A P P R O X I M A T I O N S 10.1 Bayes Versus Minimax 2 I 0. I. I Bayes Estimation I 0. 1.2 Minimax Estimation 10.2 Diagonal Estimation in a Basis 2 I {I.2. I Diagonal Estimation with Oracles 10.2.2 Thresholding Estimation 10.2.3 Thresholding Refinements 3 10.2.4 Wavelet Thresholding 10.2.5 Best Basis Thresholding 3 10.3 Minimax Optimality 3 10.3. I Linear Diagonal Minimax Estimation 10.3.20rthosymmetric Sets 10.3.3 Nearly Minimax with Wavelets 10.4 Restoration 3 10.4. I Estimation in Arbitrary Gaussian Noise 10.4.2 Inverse Problems and Deconvolution
435 435 442 446 446 450 455 458 466 469 469 474 479 486 486 491
CONTENTS
10.5 Coherent Estimation 3 10.5. I Coherent Basis Thresholding 10.5.2 Coherent Matching Pursuit 10.6 Spectrum Estimation 2 10.6. I Power Spectrum 10.6.2 Approximate Karhunen-Lobve Search 3 10.6.3 Locally Stationary Processes 3 10.7 Problems
ooe
XIII
501 502 505 507 508 512 516 520
XI
TRANSFORM CODING I1.1 Signal Compression 2 I I. I. I State of the Art I I. 1.2 Compression in Orthonormal Bases I 1.2 Distortion Rate of Quantization 2 11.2. I Entropy Coding I 1.2.2 Scalar Quantization I 1.3 High Bit Rate Compression 2 I 1.3. I Bit Allocation I 1.3.2 Optimal Basis and Karhunen-Lo~ve I 1.3.3 Transparent Audio Code I 1.4 Image Compression 2 11.4. I Deterministic Distortion Rate I 1.4.2 Wavelet Image Coding I 1.4.3 Block Cosine Image Coding I 1.4.4 Embedded Transform Coding I 1.4.5 Minimax Distortion Rate 3 I 1.5 Video Signals 2 I 1.5. I Optical Flow I 1.5.2 MPEG Video Compression 11.6 Problems
526 526 527 528 529 537 540 540 542 544 548 548 557 561 566 571 577 577 585 587
Appendix A MATHEMATICAL COMPLEMENTS A.I A.2 A.3 A.4 A.5
Functions and Integration Banach and Hilbert Spaces Bases of Hilbert Spaces Linear Operators Separable Spaces and Bases
591 593 595 596 598
xiv
CONTENTS
A.6 A.7
Random Vectors and Covariance Operators Diracs
599 601
Appendix B SOFTWARE T O O L B O X E S B.I B.2 B.3
WAVELAB LASTWAVE Freeware Wavelet Toolboxes
603 609 610 612
BIBLIOGRAPHY INDEX
629
Preface
Facing the unusual popularity of wavelets in sciences, I began to wonder whether this was just another fashion that would fade away with time. After several years of research and teaching on this topic, and surviving the painful experience of writing a book, you may rightly expect that I have calmed my anguish. This might be the natural self-delusion affecting any researcher studying his comer of the world, but there might be more. Wavelets are not based on a "bright new idea", but on concepts that already existed under various forms in many different fields. The formalization and emergence of this "wavelet theory" is the result of a multidisciplinary effort that brought together mathematicians, physicists and engineers, who recognized that they were independently developing similar ideas. For signal processing, this connection has created a flow of ideas that goes well beyond the construction of new bases or transforms. A Personal Experience At one point, you cannot avoid mentioning who did what. For wavelets, this is a particularly sensitive task, risking aggressive replies from forgotten scientific tribes arguing that such and such results originally belong to them. As I said, this wavelet theory is truly the result of a dialogue between scientists who often met by chance, and were ready to listen. From my totally subjective point of view, among the many researchers who made important contributions, I would like to single out one, Yves Meyer, whose deep scientific vision was a major ingredient sparking this catalysis. It is ironic to see a French pure mathematician, raised in a Bourbakist culture where applied meant trivial, playing a central role XV
xvi
PREFACE
along this wavelet bridge between engineers and scientists coming from different disciplines. When beginning my Ph.D. in the U.S., the only project I had in mind was to travel, never become a researcher, and certainly never teach. I had clearly destined myself to come back to France, and quickly begin climbing the ladder of some big corporation. Ten years later, I was still in the U.S., the mind buried in the hole of some obscure scientific problem, while teaching in a university. So what went wrong? Probably the fact that I met scientists like Yves Meyer, whose ethic and creativity have given me a totally different view of research and teaching. Trying to communicate this flame was a central motivation for writing this book. I hope that you will excuse me if my prose ends up too often in the no man's land of scientific neutrality. A Few Ideas Beyond mathematics and algorithms, the book carries a few important ideas that I would like to emphasize. Important information often appears through a simultaneous analysis of the signal's time and frequency properties. This motivates decompositions over elementary "atoms" that are well concentrated in time and frequency. It is therefore necessary to understand how the uncertainty principle limits the flexibility of time and frequency transforms.
9 Time-frequency wedding
9 Scale f o r zooming Wavelets are scaled waveforms that measure signal vari-
ations. By traveling through scales, zooming procedures provide powerful characterizations of signal structures such as singularities. 9 More and more bases Many orthonormal bases can be designed with fast
computational algorithms. The discovery of filter banks and wavelet bases has created a popular new sport of basis hunting. Families of orthogonal bases are created every day. This game may however become tedious if not motivated by applications. 9 Sparse representations An orthonormal basis is useful if it defines a rep-
resentation where signals are well approximated with a few non-zero coefficients. Applications to signal estimation in noise and image compression are closely related to approximation theory. 9 Try it non-linear and diagonal Linearity has long predominated because of
its apparent simplicity. We are used to slogans that often hide the limitations of "optimal" linear procedures such as Wiener filtering or Karhunen-Lobve bases expansions. In sparse representations, simple non-linear diagonal operators can considerably outperform "optimal" linear procedures, and fast algorithms are available.
o,
PREFACE
XVII
Numerical experimentations are necessary to fully understand the algorithms and theorems in this book. To avoid the painful programming of standard procedures, nearly all wavelet and time-frequency algorithms are available in the WAVELABpackage, programmed in MATLAB.WAVELAB is a freeware software that can be retrieved through the Internet. The correspondence between algorithms and WAVELABsubroutines is explained in Appendix B. All computational figures can be reproduced as demos in WAVELAB.LASTWAVEis a wavelet signal and image processing environment, written in C for X1 i/Unix and Macintosh computers. This stand-alone freeware does not require any additional commercial package. It is also described in Appendix B. WAVELAB and LASTWAVEToolboxes
Teaching This book is intended as a graduate textbook. It took form after teaching "wavelet signal processing" courses in electrical engineering departments at MIT and Tel Aviv University, and in applied mathematics departments at the Courant Institute and l~cole Polytechnique (Paris). In electrical engineering, students are often initially frightened by the use of vector space formalism as opposed to simple linear algebra. The predominance of linear time invariant systems has led many to think that convolutions and the Fourier transform are mathematically sufficient to handle all applications. Sadly enough, this is not the case. The mathematics used in the book are not motivated by theoretical beauty; they are truly necessary to face the complexity of transient signal processing. Discovering the use of higher level mathematics happens to be an important pedagogical side-effect of this course. Numerical algorithms and figures escort most theorems. The use of WAVELABmakes it particularly easy to include numerical simulations in homework. Exercises and deeper problems for class projects are listed at the end of each chapter. In applied mathematics, this course is an introduction to wavelets but also to signal processing. Signal processing is a newcomer on the stage of legitimate applied mathematics topics. Yet, it is spectacularly well adapted to illustrate the applied mathematics chain, from problem modeling to efficient calculations of solutions and theorem proving. Images and sounds give a sensual contact with theorems, that can wake up most students. For teaching, formatted overhead transparencies with enlarged figures are available on the Internet: http ://www. cmap. polytechnique, f r / ~ m a l l a t / W a v e t o u r _ f i g /
Francois Chaplais also offers an introductory Web tour of basic concepts in the book at http ://cas. ensmp,
fr/~chaplais/Wavetour_presentation/.
Not all theorems of the book are proved in detail, but the important techniques are included. I hope that the reader will excuse the lack of mathematical rigor in the many instances where I have privileged ideas over details. Few proofs are long; they are concentrated to avoid diluting the mathematics into many intermediate results, which would obscure the text.
xviii
PREFACE
Course Design Level numbers explained in Section 1.5.2 can help in designing an introductory or a more advanced course. Beginning with a review of the Fourier transform is often necessary. Although most applied mathematics students have already seen the Fourier transform, they have rarely had the time to understand it well. A non-technical review can stress applications, including the sampling theorem. Refreshing basic mathematical results is also needed for electrical engineering students. A mathematically oriented review of time-invariant signal processing in Chapters 2 and 3 is the occasion to remind the student of elementary properties of linear operators, projectors and vector spaces, which can be found in Appendix A. For a course of a single semester, one can follow several paths, oriented by different themes. Here are a few possibilities. One can teach a course that surveys the key ideas previously outlined. Chapter 4 is particularly important in introducing the concept of local time-frequency decompositions. Section 4.4 on instantaneous frequencies illustrates the limitations of time-frequency resolution. Chapter 6 gives a different perspective on the wavelet transform, by relating the local regularity of a signal to the decay of its wavelet coefficients across scales. It is useful to stress the importance of the wavelet vanishing moments. The course can continue with the presentation of wavelet bases in Chapter 7, and concentrate on Sections 7.1-7.3 on orthogonal bases, multiresolution approximations and filter bank algorithms in one dimension. Linear and non-linear approximations in wavelet bases are covered in Chapter 9. Depending upon students' backgrounds and interests, the course can finish in Chapter 10 with an application to signal estimation with wavelet thresholding, or in Chapter 11 by presenting image transform codes in wavelet bases. A different course may study the construction of new orthogonal bases and their applications. Beginning with the wavelet basis, Chapter 7 also gives an introduction to filter banks. Continuing with Chapter 8 on wavelet packet and local cosine bases introduces different orthogonal tilings of the time-frequency plane. It explains the main ideas of time-frequency decompositions. Chapter 9 on linear and non-linear approximation is then particularly important for understanding how to measure the efficiency of these bases, and for studying best bases search procedures. To illustrate the differences between linear and non-linear approximation procedures, one can compare the linear and non-linear thresholding estimations studied in Chapter 10. The course can also concentrate on the construction of sparse representations with orthonormal bases, and study applications of non-linear diagonal operators in these bases. It may start in Chapter 10 with a comparison of linear and non-linear operators used to estimate piecewise regular signals contaminated by a white noise. A quick excursion in Chapter 9 introduces linear and non-linear approximations to explain what is a sparse representation. Wavelet orthonormal bases are then presented in Chapter 7, with special emphasis on their non-linear approximation properties for piecewise regular signals. An application of non-linear diagonal operators to image compression or to thresholding estimation should then be studied in some detail, to motivate the use of modem mathematics for understanding these problems.
PREFACE
xix
A more advanced course can emphasize non-linear and adaptive signal processing. Chapter 5 on frames introduces flexible tools that are useful in analyzing the properties of non-linear representations such as irregularly sampled transforms. The dyadic wavelet maxima representation illustrates the frame theory, with applications to multiscale edge detection. To study applications of adaptive representations with orthonormal bases, one might start with non-linear and adaptive approximations, introduced in Chapter 9. Best bases, basis pursuit or matching pursuit algorithms are examples of adaptive transforms that construct sparse representations for complex signals. A central issue is to understand to what extent adaptivity improves applications such as noise removal or signal compression, depending on the signal properties.
Responsibilities This book was a one-year project that ended up in a never will finish nightmare. Ruzena Bajcsy bears a major responsibility for not encouraging me to choose another profession, while guiding my first research steps. Her profound scientific intuition opened my eyes to and well beyond computer vision. Then of course, are all the collaborators who could have done a much better job of showing me that science is a selfish world where only competition counts. The wavelet story was initiated by remarkable scientists like Alex Grossmann, whose modesty created a warm atmosphere of collaboration, where strange new ideas and ingenuity were welcome as elements of creativity. I am also grateful to the few people who have been willing to work with me. Some have less merit because they had to finish their degree but others did it on a voluntary basis. I am thinking of Amir Averbuch, Emmanuel Bacry, Francois Bergeaud, Geoff Davis, Davi Geiger, Fr6d6ric Falzon, Wen Liang Hwang, Hamid Krim, George Papanicolaou, Jean-Jacques Slotine, Alan Willsky, Zifeng Zhang and Sifen Zhong. Their patience will certainly be rewarded in a future life. Although the reproduction of these 600 pages will probably not kill many trees, I do not want to bear the responsibility alone. After four years writing and rewriting each chapter, I first saw the end of the tunnel during a working retreat at the Fondation des Treilles, which offers an exceptional environment to think, write and eat in Provence. With WAVELAB,David Donoho saved me from spending the second half of my life programming wavelet algorithms. This opportunity was beautifully implemented by Maureen Clerc and J6r6me Kalifa, who made all the figures and found many more mistakes than I dare say. Dear reader, you should thank Barbara Burke Hubbard, who corrected my Franglais (remaining errors are mine), and forced me to modify many notations and explanations. I thank her for doing it with tact and humor. My editor, Chuck Glaser, had the patience to wait but I appreciate even more his wisdom to let me think that I would finish in a year. She will not read this book, yet my deepest gratitude goes to Branka with whom life has nothing to do with wavelets. St6phane Mallat
Preface to the second edition
Before leaving this Wavelet Tour, I naively thought that I should take advantage of remarks and suggestions made by readers. This almost got out of hand, and 200 pages ended up being rewritten. Let me outline the main components that were not in the first edition. 9 Bayes versus Minimax Classical signal processing is almost entirely built
in a Bayes framework, where signals are viewed as realizations of a random vector. For the last two decades, researchers have tried to model images with random vectors, but in vain. It is thus time to wonder whether this is really the best approach. Minimax theory opens an easier avenue for evaluating the performance of estimation and compression algorithms. It uses deterministic models that can be constructed even for complex signals such as images. Chapter 10 is rewritten and expanded to explain and compare the Bayes and minimax points of view. 9 Bounded Variation Signals Wavelet transforms provide sparse representa-
tions of piecewise regular signals. The total variation norm gives an intuitive and precise mathematical framework in which to characterize the piecewise regularity of signals and images. In this second edition, the total variation is used to compute approximation errors, to evaluate the risk when removing noise from images, and to analyze the distortion rate of image transform codes. 9 Normalized Scale Continuous mathematics give asymptotic results when
the signal resolution N increases. In this framework, the signal support is
PREFACE TO THE SECOND EDITION
xxi
fixed, say [0, 1], and the sampling interval N -1 is progressively reduced. In contrast, digital signal processing algorithms are often presented by normalizing the sampling interval to 1, which means that the support [O,N] increases with N. This new edition explains both points of views, but the figures now display signals with a support normalized to [0,1], in accordance with the theorems. 9 Video Compression Compressing video sequences is of prime importance
for real time transmission with low-bandwidth channels such as the Internet or telephone lines. Motion compensation algorithms are presented at the end of Chapter 11.
Notation
(f, g) Inner product (A.6). Ilfll Norm (A.3). f[n] - O(g[n]) Order of: there exists K such that f[n] <_ Kg[n]. f[n] -- o(g[n]) Small order of: l i m , ~ + ~ gf[n] ~ - _ O. Equivalent to: f[n] -- O(g[n]) and g[n] -- O(f[n]). fin] ~ gin] A is finite. A<+e~ A is much bigger than B. A >>B Complex conjugate of z E C. Z* Largest integer n < x. Smallest integer n > x. Remainder of the integer division of n modulo N. nmodN
Sets N Z R+ C
Positive integers including 0. Integers. Real numbers. Positive real numbers. Complex numbers.
Signals f(t) f[n]
Continuous time signal. Discrete signal. )O(ll
eee
NOTATION
a(t) a[n]
l[a,b]
Dirac distribution (A.30). Discrete Dirac (3.16). Indicator function which is 1 in [a, b] and 0 outside.
Spaces Co Cp Ca Ws(R) L~(R) LP(IR) lz(Z) IP(Z) CN U| U|
Uniformly continuous functions (7.240). p times continuously differentiable functions. Infinitely differentiable functions. Sobolev s times differentiable functions (9.5). Finite energy functions fly(t)[ 2 dt < +e~. Functions such that f If(t)l p dt < +c~. Finite energy discrete signals ~--~n=-~ If In] I2 < +c~. -k-e~ ip Discrete signals such that ~-~n=-~ If[ n] < + ~ " Complex signals of size N. Direct sum of two vector spaces. Tensor product of two vector spaces (A.19).
Operators Id f'(t) f(P)(t) Vf(x,y) f . g(t) f . g[n] f | g[n]
Identity. Derivative d fdt(t) " Derivative dPf(t) of order p dtP Gradient vector (6.55). Continuous time convolution (2.2). Discrete convolution (3.17). Circular convolution (3.57)
Transforms
)-[z:] Sf(u,s) Psf(u,~) Wf(u,s) Pwf(u,~) Pyf(u,~) Af(u,~)
Fourier transform (2.6), (3.23). Discrete Fourier transform (3.33). Short-time windowed Fourier transform (4.11). Spectrogram (4.12). Wavelet transform (4.31). Scalogram (4.55). Wigner-Ville distribution (4.108). Ambiguity function (4.24).
Probability X
E{X}
Random variable. Expected value. Entropy (11.4).
~0(III
xxiv
"~(x) Cov(Xl,X2) r[n]
NOTATION
Differential entropy (11.20). Covariance (A.22). Random vector. Autocovariance of a stationary process (A.26).
/ I N T R O D U C T I O N TO A T R A N S I E N T WORLD
fter a few minutes in a restaurant we cease to notice the annoying hubbub of surrounding conversations, but a sudden silence reminds us of the presence of neighbors. Our attention is clearly attracted by transients and movements as opposed to stationary stimuli, which we soon ignore. Concentrating on transients is probably a strategy for selecting important information from the overwhelming amount of data recorded by our senses. Yet, classical signal processing has devoted most of its efforts to the design of time-invariant and space-invariant operators, that modify stationary signal properties. This has led to the indisputable hegemony of the Fourier transform, but leaves aside many information-processing applications.
A
The world of transients is considerably larger and more complex than the garden of stationary signals. The search for an ideal Fourier-like basis that would simplify most signal processing is therefore a hopeless quest. Instead, a multitude of different transforms and bases have proliferated, among which wavelets are just one example. This book gives a guided tour in this jungle of new mathematical and algorithmic results, while trying to provide an intuitive sense of orientation. Major ideas are outlined in this first chapter. Section 1.5.2 serves as a travel guide and introduces the reproducible experiment approach based on the WAVELABand LASTWAVE softwares. It also discusses the use of level numbersmlandmarks that can help the reader keep to the main roads.
2 I.I
CHAPTER I
INTRODUCTION TO A TRANSIENT WORLD
FOURIER K I N G D O M
The Fourier transform rules over linear time-invariant signal processing because sinusoidal waves e ian are eigenvectors of linear time-invariant operators. A linear time-invariant operator L is entirely specified by the eigenvalues h(aJ): ^
V~ E R , Le i~"t - kt(co) e i~"t.
(1.1)
To compute L f , a signal f is decomposed as a sum of sinusoidal eigenvectors f (t) -- ~
1 f + o c f (~) e i~"td~.
(1.2)
CO
If f has finite energy, the theory of Fourier integrals presented in Chapter 2 proves that the amplitude f(~:) of each sinusoidal w a v e e i~t is the Fourier transform of f: ]f (aJ) - / + ~
f (t) e-i~t dt.
(1.3)
Applying the operator L to f in ( 1.2) and inserting the eigenvector expression (1.1) gives
1 f_+ooff(aJ)h(~)e ia~td~.
L f ( t ) -- ~
(1.4)
(X)
The operator L amplifies or attenuates each sinusoidal component e ian of f by h(aJ). It is a frequency filtering of f. As long as we are satisfied with linear time-invariant operators, the Fourier transform provides simple answers to most questions. Its richness makes it suitable for a wide range of applications such as signal transmissions or stationary signal processing. However, if we are interested in transient phenomena~a word pronounced at a particular time, an apple located in the left comer of an image~the Fourier transform becomes a cumbersome tool. The Fourier coefficient is obtained in (1.3) by correlating f with a sinusoidal wave e ia~t. Since the support of e ia~t covers the whole real line, f(a~) depends on the values f ( t ) for all times t CIR. This global "mix" of information makes it difficult to analyze any local property of f from 37. Chapter 4 introduces local time-frequency transforms, which decompose the signal over waveforms that are well localized in time and frequency. 1.2
TIME-FREQUENCY W E D D I N G
The uncertainty principle states that the energy spread of a function and its Fourier transform cannot be simultaneously arbitrarily small. Motivated by quantum mechanics, in 1946 the physicist Gabor [187] defined elementary time-frequency atoms as waveforms that have a minimal spread in a time-frequency plane. To measure time-frequency "information" content, he proposed decomposing signals over these elementary atomic waveforms. By showing that such decompositions
3
1.2 TIME-FREQUENCY WEDDING
are closely related to our sensitivity to sounds, and that they exhibit important structures in speech and music recordings, Gabor demonstrated the importance of localized time-frequency signal processing. Chapter 4 studies the properties of windowed Fourier and wavelet transforms, computed by decomposing the signal over different families of time-frequency atoms. Other transforms can also be defined by modifying the family of timefrequency atoms. A unified interpretation of local time-frequency decompositions follows the time-frequency energy density approach of Ville. In parallel to Gabor's contribution, in 1948 Ville [342], who was an electrical engineer, proposed analyzing the time-frequency properties of signals f with an energy density defined by
~ - ) f * ( t - 7 - )-~e Pvf(t,w) - ]~+~ f (t + -~
-i~ dT-.
O(3
Once again, theoretical physics was ahead, since this distribution had already been introduced in 1932 by Wigner [351 ] in the context of quantum mechanics. Chapter 4 explains the path that relates Wigner-Ville distributions to windowed Fourier and wavelet transforms, or any linear time-frequency transform. 1.2. I
W i n d o w e d Fourier Transform
Gabor atoms are constructed by translating in time and frequency a time window g:
gu,~(t) -- g ( t - u)e i~'. The energy of gu,~ is concentrated in the neighborhood of u over an interval of size crt, measured by the standard deviation of Igl 2. Its Fourier transform is a translation by { of the Fourier transform ~ of g: ~,u,{(~) = g, (~ -- ~ ) e -i"(w-{).
(~.5)
The energy of gu,~ is therefore localized near the frequency ~, over an interval of size ~r~, which measures the domain where ~(a~) is non-negligible. In a time-frequency plane (t, ~), the energy spread of the atom gu,~ is symbolically represented by the Heisenberg rectangle illustrated by Figure 1.1. This rectangle is centered at (u,~) and has a time width % and a frequency width cry. The uncertainty principle proves that its area satisfies 1
This area is minimum when g is a Gaussian, in which case the atoms gu,~ are called
Gabor functions. The windowed Fourier transform defined by Gabor correlates a signal f with each atom gu,~:
Sf(u,{) -
f(t) gu,{(t)dt O0
f(t) g ( t - u)e -i~t dt.
(1.6)
4
CHAPTER I
INTRODUCTION TO A TRANSIENT WORLD
.
................................ (,,
I
o
t:+ ilo ~ , r
(t) l
u
.~ ~,'t (t) I ~t v
FIGURE I. I Time-frequency boxes ("Heisenberg rectangles") representing the energy spread of two Gabor atoms.
It is a Fourier integral that is localized in the neighborhood of u by the window g(t- u). This time integral can also be written as a frequency integral by applying the Fourier Parseval formula (2.25):
1/7
Sf(u,{) -- -~
f(co) ao*,{(co)dco.
(1.7)
The transform Sf(u,r thus depends only on the values f(t) and 37(a;) in the time and frequency neighborhoods where the energies of gu,~ and gu,~ are concentrated. Gabor interprets this as a "quantum of information" over the time-frequency rectangle illustrated in Figure 1.1. When listening to music, we perceive sounds that have a frequency that varies in time. Measuring time-varying harmonics is an important application of windowed Fourier transforms in both music and speech recognition. A spectral line of f creates high amplitude windowed Fourier coefficients Sf(u, ~) at frequencies ~(u) that depend on the time u. The time evolution of such spectral components is therefore analyzed by following the location of large amplitude coefficients. 1.2.2
Wavelet Transform
In reflection seismology, Motet knew that the modulated pulses sent underground have a duration that is too long at high frequencies to separate the retums of fine, closely-spaced layers. Instead of emitting pulses of equal duration, he thus thought of sending shorter waveforms at high frequencies. Such waveforms are simply obtained by scaling a single function called a wavelet. Although Grossmann was working in theoretical physics, he recognized in Morlet's approach some ideas that were close to his own work on coherent quantum states. Nearly forty years after Gabor, Morlet and Grossmann reactivated a fundamental collaboration between theoretical physics and signal processing, which led to the formalization of the
1.2
TIME-FREQUENCYWEDDING
5
continuous wavelet transform [200]. Yet, these ideas were not totally new to mathematicians working in harmonic analysis, or to computer vision researchers studying multiscale image processing. It was thus only the beginning of a rapid catalysis that brought together scientists with very different backgrounds, first around coffee tables, then in more luxurious conferences. A wavelet ~ is a function of zero average:
f
+~(t)dt-O, O<3
which is dilated with a scale parameter s, and translated by u:
u,s ( t ) -
(1.8)
--;-
The wavelet transform of f at the scale s and position u is computed by correlating f with a wavelet atom Wf(u,s)-
~ f(t)--~
dt.
(1.9)
Time-Frequency Measurements Like a windowed Fourier transform, a wavelet transform can measure the time-frequency variations of spectral components, but it has a different time-frequency resolution. A wavelet transform correlates f with ~u,s. By applying the Fourier Parseval formula (2.25), it can also be written as a frequency integration:
W f ( u , s) _
f ( t ) ~ u , s9( t ) d t _ ~
~f(w) _"* _ _~bu,s(w)dw .
(1.10)
O()
The wavelet coefficient W f ( u , s ) thus depends on the values f ( t ) and )~(w) in the time-frequency region where the energy of ~u,s and ~u,s is concentrated. Time varying harmonics are detected from the position and scale of high amplitude wavelet coefficients. In time, ~u,s is centered at u with a spread proportional to s. Its Fourier transform is calculated from (1.8): ^
~u,s(W) - e-iu~ x / ~ ( s ~ ) , where ~ is the Fourier transform of ~. To analyze the phase information of signals, a complex analytic wavelet is used. This means that ~(w) = 0 for w < 0. Its energy is concentrated in a positive frequency interval centered at r/. The energy of ~u,s(W) is therefore concentrated over a positive frequency interval centered at rl/s, whose size is scaled by 1/s. In the time-frequency plane, a wavelet atom ~u,s is symbolically represented by a rectangle centered at (u, rl/s). The time and frequency spread are respectively proportional to s and 1Is. When s varies, the height and width of the rectangle change but its area remains constant, as illustrated by Figure 1.2.
6
CHAPTER I
INTRODUCTION TO A TRANSIENT WORLD
,S~(co) I
q
..........
~o3
S ::Gt
q _
SO
~' Vu~s~
Vu0,s )l
VuV
S~ t
t ............. ~l/u~
~ L/ fiok.J
~
So ~t
FIGURE 1.2 Time-frequency boxes of two wavelets Cu,s and ~u0,s0. When the scale s decreases, the time support is reduced but the frequency spread increases and covers an interval that is shifted towards high frequencies. Multiscale Zooming The wavelet transform can also detect and characterize transients with a zooming procedure across scales. Suppose that ~ is real. Since it has a zero average, a wavelet coefficient Wf (u, s) measures the variation of f in a neighborhood of u whose size is proportional to s. Sharp signal transitions create large amplitude wavelet coefficients. Chapter 6 relates the pointwise regularity of f to the asymptotic decay of the wavelet transform Wf(u,s), when s goes to zero. Singularities are detected by following across scales the local maxima of the wavelet transform. In images, high amplitude wavelet coefficients indicate the position of edges, which are sharp variations of the image intensity. Different scales provide the contours of image structures of varying sizes. Such multiscale edge detection is particularly effective for pattern recognition in computer vision [113]. The zooming capability of the wavelet transform not only locates isolated singular events, but can also characterize more complex multifractal signals having non-isolated singularities. Mandelbrot [43] was the first to recognize the existence of multifractals in most comers of nature. Scaling one part of a multifractal produces a signal that is statistically similar to the whole. This self-similarity appears in the wavelet transform, which modifies the analyzing scale. From the global wavelet transform decay, one can measure the singularity distribution of multifractals. This is particularly important in analyzing their properties and testing models that explain the formation of multifractals in physics.
1.3
BASES OF TIME-FREQUENCY ATOMS
The continuous windowed Fourier transform Sf(u,~) and the wavelet transform Wf (u, s) are two-dimensional representations of a one-dimensional signal f. This
1.3 BASESOF TIME-FREQUENCY ATOMS
7
indicates the existence of some redundancy that can be reduced and even removed by subsampling the parameters of these transforms. Frames Windowed Fourier transforms and wavelet transforms can be written as inner products in L z (R), with their respective time-frequency atoms
Sf(u,~) and
f(t) g*u,~(t)dt-
oo
f oo f(t)~u,s(t)dt- (f ,r +c~
Wf(u,s)-
Subsampling both transforms defines a complete signal representation if any signal can be reconstructed from linear combinations of discrete families of windowed Fourier atoms {gu,,~ } (n,k)ez2 and wavelet atoms {~u,,sj } (j,n)eZ2. The frame theory of Chapter 5 discusses what conditions these families of waveforms must meet if they are to provide stable and complete representations. Completely eliminating the redundancy is equivalent to building a basis of the signal space. Although wavelet bases were the first to arrive on the research market, they have quickly been followed by other families of orthogonal bases, such as wavelet packet and local cosine bases. 1.3. I
Wavelet Bases and Filter Banks
In 1910, Haar [202] realized that one can construct a simple piecewise constant function 1 if0
t
--2Jn 2J)}(j,n)EZ2
Any finite energy signal f can be decomposed over this wavelet orthogonal basis
{~/3j,n} (j,n)EZ2 f -- Z
Z
j=-c~
n=-c~
(f' ~j,n) 2/3j,n.
Since ~(t) has a zero average, each partial sum
-~-(X3 dj(t) -- Z
~j,n(t)
n-----Oo
(1.11)
CHAPTER I
INTRODUCTION TO A TRANSIENT WORLD
can be interpreted as detail variations at the scale 2 j. These layers of details are added at all scales to progressively improve the approximation of f, and ultimately recover f. If f has smooth variations, we should obtain a precise approximation when removing fine scale details, which is done by truncating the sum (1.11). The resulting approximation at a scale 2J is +O(3
f , Itl -
dj(t). j--J
For a Haar basis, f j is piecewise constant. Piecewise constant approximations of smooth functions are far from optimal. For example, a piecewise linear approximation produces a smaller approximation error. The story continues in 1980, when Strrmberg [322] found a piecewise linear function ~b that also generates an orthonormal basis and gives better approximations of smooth functions. Meyer was not aware of this result, and motivated by the work of Morlet and Grossmann he tried to prove that there exists no regular wavelet ~b that generates an orthonormal basis. This attempt was a failure since he ended up constructing a whole family of orthonormal wavelet bases, with functions ~b that are infinitely continuously differentiable [270]. This was the fundamental impulse that lead to a widespread search for new orthonormal wavelet bases, which culminated in the celebrated Daubechies wavelets of compact support [ 144]. The systematic theory for constructing orthonormal wavelet bases was established by Meyer and Mallat through the elaboration of multiresolution signal approximations [254], presented in Chapter 7. It was inspired by original ideas developed in computer vision by Burt and Adelson [108] to analyze images at several resolutions. Digging more into the properties of orthogonal wavelets and multiresolution approximations brought to light a surprising relation with filter banks constructed with conjugate mirror filters. Filter Banks
Motivated by speech compression, in 1976 Croisier, Esteban and Galand [ 141 ] introduced an invertible filter bank, which decomposes a discrete signal f[n] in two signals of half its size, using a filtering and subsampling procedure. They showed that fin] can be recovered from these subsampled signals by canceling the aliasing terms with a particular class of filters called conjugate mirror filters. This breakthrough led to a 10-year research effort to build a complete filter bank theory. Necessary and sufficient conditions for decomposing a signal in subsampled components with a filtering scheme, and recovering the same signal with an inverse transform, were established by Smith and Barnwell [316], Vaidyanathan [336] and Vetterli [339]. The multiresolution theory of orthogonal wavelets proves that any conjugate mirror filter characterizes a wavelet ~bthat generates an orthonormal basis ofL 2 (I~). Moreover, a fast discrete wavelet transform is implemented by cascading these conjugate mirror filters. The equivalence between this continuous time wavelet
1.3 BASESOF TIME-FREQUENCYATOMS
9
theory and discrete filter banks led to a new fruitful interface between digital signal processing and harmonic analysis, but also created a culture shock that is not totally resolved. Many signal processors have been and still are wondering what is the point of these continuous time wavelets, since all computations are performed over discrete signals, with conjugate mirror filters. Why bother with the convergence of infinite convolution cascades if in practice we only compute a finite number of convolutions? Answering these important questions is necessary in order to understand why throughout this book we altemate between theorems on continuous time functions and discrete algorithms applied to finite sequences. A short answer would be "simplicity". In L 2 (~), a wavelet basis is constructed by dilating and translating a single function ~. Several important theorems relate the amplitude of wavelet coefficients to the local regularity of the signal f. Dilations are not defined over discrete sequences, and discrete wavelet bases have therefore a more complicated structure. The regularity of a discrete sequence is not well defined either, which makes it more difficult to interpret the amplitude of wavelet coefficients. A theory of continuous time functions gives asymptotic results for discrete sequences with sampling intervals decreasing to zero. This theory is useful because these asymptotic results are precise enough to understand the behavior of discrete algorithms. Continuous time models are not sufficient for elaborating discrete signal processing algorithms. Uniformly sampling the continuous time wavelets {~)j,n(t)}(j,n)EZ2 does not produce a discrete orthonormal basis. The transition between continuous and discrete signals must be done with great care. Restricting the constructions to finite discrete signals adds another layer of complexity because of border problems. How these border issues affect numerical implementations is carefully addressed once the properties of the bases are well understood. To simplify the mathematical analysis, throughout the book continuous time transforms are introduced first. Their discretization is explained afterwards, with fast numerical algorithms over finite signals. Continuous Versus Discrete and Finite
1.3.2
Tilings of Wavelet Packet and Local Cosine Bases
Orthonormal wavelet bases are just an appetizer. Their construction showed that it is not only possible but relatively simple to build orthonormal bases of L 2 (•) composed of local time-frequency atoms. The completeness and orthogonality of a wavelet basis is represented by a tiling that covers the time-frequency plane with the wavelets' time-frequency boxes. Figure 1.3 shows the time-frequency box of each ~3j,n, which is translated by 2Jn, with a time and a frequency width scaled respectively by 2 j and 2 -j. One can draw many other tilings of the time-frequency plane, with boxes of minimal surface as imposed by the uncertainty principle. Chapter 8 presents
I0
CHAPTER I INTRODUCTION TO A TRANSIENT WORLD
~
"t ,n(t)
~+l,p(t)
FIGURE 1.3 The time-frequency boxes of a wavelet basis define a tiling of the time-frequency plane. several constructions that associate large families of orthonormal bases of L 2 (JR) to such new tilings. A wavelet orthonormal basis decomposes the frequency axis in dyadic intervals whose sizes have an exponential growth, as shown by Figure 1.3. Coifman, Meyer and Wickerhauser [ 139] have generalized this fixed dyadic construction by decomposing the frequency in intervals whose bandwidths may vary. Each frequency interval is covered by the time-frequency boxes of wavelet packet functions that are uniformly translated in time in order to cover the whole plane, as shown by Figure 1.4. Wavelet packet functions are designed by generalizing the filter bank tree that relates wavelets and conjugate mirror filters. The frequency axis division of wavelet packets is implemented with an appropriate sequence of iterated convolutions with conjugate mirror filters. Fast numerical wavelet packet decompositions are thus implemented with discrete filter banks.
Wavelet Packet Bases
Local Cosine Bases Orthonormal bases of Lz(R) can also be constructed by dividing the time axis instead of the frequency axis. The time axis is segmented in successive finite intervals [ap,ap+l]. The local cosine bases of Malvar [262] are obtained by designing smooth windows gp(t) that cover each interval [ap,ap+l], and multiplying them by cosine functions cos(~t + ~b) of different frequencies. This is yet another idea that was independently studied in physics, signal processing and mathematics. Malvar's original construction was done for discrete signals. At the same time, the physicist Wilson [353] was designing a local cosine basis with smooth windows of infinite support, to analyze the properties of quantum coherent states. Malvar bases were also rediscovered and generalized by the
1.4 BASES FOR WHAT?
0
I I
2:>
t
FIGURE 1.4 A wavelet packet basis divides the frequency axis in separate intervals of varying sizes. A tiling is obtained by translating in time the wavelet packets covering each frequency interval.
harmonic analysts Coifman and Meyer [138]. These different views of the same bases brought to light mathematical and algorithmic properties that opened new applications. A multiplication by cos(~t + q~)translates the Fourier transform ~p (co)of gp(t) by • Over positive frequencies, the time-frequency box of the modulated window gp(t)cos(~t + oh) is therefore equal to the time-frequency box of gp translated by ~ along frequencies. The time-frequency boxes of local cosine basis vectors define a tiling of the time-frequency plane illustrated by Figure 1.5. 1.4
BASES FOR WHAT?
The tiling game is clearly unlimited. Local cosine and wavelet packet bases are important examples, but many other kinds of bases can be constructed. It is thus time to wonder how to select an appropriate basis for processing a particular class of signals. The decomposition coefficients of a signal in a basis define a representation that highlights some particular signal properties. For example, wavelet coefficients provide explicit information on the location and type of signal singularities. The problem is to find a criterion for selecting a basis that is intrinsically well adapted to represent a class of signals. Mathematical approximation theory suggests choosing a basis that can construct precise signal approximations with a linear combination of a small number of vectors selected inside the basis. These selected vectors can be interpreted as intrinsic signal structures. Compact coding and signal estimation in noise are applications where this criterion is a good measure of the efficiency of a basis. Linear and non-linear procedures are studied and compared. This will be the occasion to show that non-linear does not always mean complicated.
12
CHAPTER I
INTRODUCTION TO A TRANSIENT WORLD
CO
>t
gp(t) 0
FIGURE 1.5
ap-1 ap
ap+ 1
t
lp
A local cosine basis divides the time axis with smooth windows
gp(t). Multiplications with cosine functions translate these windows in frequency and yield a complete cover of the time-frequency plane.
1.4. I
Approximation
The development of orthonormal wavelet bases has opened a new bridge between approximation theory and signal processing. This exchange is not quite new since the fundamental sampling theorem comes from an interpolation theory result proved in 1935 by Whittaker [349]. However, the state of the art of approximation theory has changed since 1935. In particular, the properties of non-linear approximation schemes are much better understood, and give a firm foundation for analyzing the performance of many non-linear signal processing algorithms. Chapter 9 introduces important approximation theory results that are used in signal estimation and data compression.
Linear Approximation tors that are chosen M:
A linear approximation projects the signal f over M vec-
a priori in an orthonormal basis 13 = {gm}meN, say the first M-1
f M- Z
( f , gm) gm.
(1.12)
m=O
Since the basis is orthonormal, the approximation error is the sum of the remaining squared inner products -~- o(3
e[M] - - I l f - fMII 2 -- ~ m=M
[(f, gm>l2"
1.4 BASESFOR WHAT?.
13
The accuracy of this approximation clearly depends on the properties of f relative to the basis 13. A Fourier basis yields efficient linear approximations of uniformly smooth signals, which are projected over the M lower frequency sinusoidal waves. When M increases, the decay of the error e[M] can be related to the global regularity of f . Chapter 9 characterizes spaces of smooth functions from the asymptotic decay of e[M] in a Fourier basis. In a wavelet basis, the signal is projected over the M larger scale wavelets, which is equivalent to approximating the signal at a fixed resolution. Linear approximations of uniformly smooth signals in wavelet and Fourier bases have similar properties and characterize nearly the same function spaces. Suppose that we want to approximate a class of discrete signals of size N, modeled by a random vector F[n]. The average approximation error when projecting F over the first M basis vectors of an orthonormal basis/3 {gm}O<_m
e[M]- E{ILF--FMII2} -
N-1
~_~
E{l(F, gm>12}.
m-M
Chapter 9 proves that the basis that minimizes this error is the Karhunen-Lobve basis, which diagonalizes the covariance matrix of F. This remarkable property explains the fundamental importance of the Karhunen-Lo~ve basis in optimal linear signal processing schemes. This is however only a beginning.
Non-linear Approximation The linear approximation (1.12) is improved if we choose a posteriori the M vectors gm, depending on f. The approximation of f with M vectors whose indexes are in IM is
f M= ~
( f , gm) gm.
(1.13)
mEIM
The approximation error is the sum of the squared inner products with vectors not in/M: e[M] - - I l f - fMl] 2 -- ~ I(f, gm)[2"
nr To minimize this error, we choose IM to be the set of M vectors that have the largest inner product amplitude ](f, gin} [. This approximation scheme is nonlinear because the approximation vectors change with f. The amplitude of inner products in a wavelet basis is related to the local regularity of the signal. A non-linear approximation that keeps the largest wavelet inner products is equivalent to constructing an adaptive approximation grid, whose resolution is locally increased where the signal is irregular. If the signal has isolated singularities, this non-linear approximation is much more precise than a linear scheme that maintains the same resolution over the whole signal support. The spaces of functions that are well approximated by non-linear wavelet schemes are
14
CHAPTER I
INTRODUCTION TO A TRANSIENT WORLD
thus much larger than for linear schemes, and include functions with isolated singularities. Bounded variation signals are important examples that provide useful models for images. In this non-linear setting, Karhunen-Lo~ve bases are not optimal for approximating the realizations of a process F. It is often easy to find a basis that produces a smaller non-linear error than a Karhunen-Lo~ve basis, but there is yet no procedure for computing the optimal basis that minimizes the average non-linear error. Adaptive Basis Choice
Approximations of non-linear signals can be improved by choosing the approximation vectors in families that are much larger than a basis. Music recordings, which include harmonic and transient structures of very different types, are examples of complex signals that are not well approximated by a few vectors chosen from a single basis. A new degree of freedom is introduced if instead of choosing a priori the basis/3, we adaptively select a "best" basis, depending on the signal f. This best basis minimizes a cost function related to the non-linear approximation error of f. A fast dynamical programming algorithm can find the best basis in families of wavelet packet basis or local cosine bases [ 140]. The selected basis corresponds to a time-frequency tiling that "best" concentrates the signal energy over a few time-frequency atoms. Orthogonality is often not crucial in the post-processing of signal coefficients. One may thus further enlarge the freedom of choice by approximating the signal f with M non-orthogonal v e c t o r s {g'~m}O<m<M,chosen from a large and redundant dictionary 79 = { g7 }-ycr: M-1
f M -- ~
am gTm"
m=0
Globally optimizing the choice of these M vectors in 79 can lead to a combinatorial explosion. Chapter 9 introduces sub-optimal pursuit algorithms that reduce the numerical complexity, while constructing efficient approximations [ 119, 259]. 1.4.2
Estimation
The estimation of a signal embedded in noise requires taking advantage of any prior information about the signal and the noise. Chapter 10 studies and contrasts several approaches: Bayes versus minimax, linear versus non-linear. Until recently, signal processing estimation was mostly Bayesian and linear. Non-linear smoothing algorithms existed in statistics, but these procedures were often ad-hoc and complex. Two statisticians, Donoho and Johnstone [ 167], changed the game by proving that a simple thresholding algorithm in an appropriate basis can be a nearly optimal non-linear estimator. Linear versus Non-Linear
A signal f[n] of size N is contaminated by the addition of a noise. This noise is modeled as the realization of a random process W[n], whose
1.4
I5
BASESFOR WHAT?.
probability distribution is known. The measured data are
X[n] = f [n] + W[n] . The signal f is estimated by transforming the noisy data X with an operator D:
F=DX. The risk of the estimator/3 of f is the average error, calculated with respect to the probability distribution of the noise W:
r(D, f ) = E{IIf - DXll2}. It is tempting to restrict oneself to linear operators D, because of their simplicity. Yet, non-linear operators may yield a much lower risk. To keep the simplicity, we concentrate on diagonal operators in a basis B. If the basis B gives a sparse signal representation, Donoho and Johnstone [ 167] prove that a nearly optimal non-linear estimator is obtained with a simple thresholding: N-1
~'--DX-EpT((X,
gm))gm.
m--O
The thresholding function pv(x) sets to zero all coefficients below T: {0
pv(x) =
iflxl < T if Ixl >_ T "
In a wavelet basis, such a thresholding implements an adaptive smoothing, which averages the data X with a kernel that depends on the regularity of the underlying signal f . Bayes Versus Minimax To optimize the estimation operator D, one must take advantage of any prior information available about the signal f. In a Bayes framework, f is considered as a realization of a random vector F, whose probability distribution 7r is known a priori. Thomas Bayes was a XVII century philosopher, who first suggested and investigated methods sometimes referred as "inverse probability methods," which are basic to the study of Bayes estimators. The Bayes risk is the expected risk calculated with respect to the prior probability distribution 7r of the signal:
r(D, rr) = F~{r(D,F)} . Optimizing D among all possible operators yields the minimum Bayes risk: rn(Tr) -- inf r(D, Tr). alI D
Complex signals such as images are clearly non-Gaussian, and there is yet no reliable probabilistic model that incorporates the diversity of structures such as edges and textures.
J~
CHAPTER I INTRODUCTION TO A TRANSIENT WORLD
In the 1940's, Wald brought a new perspective on statistics, through a decision theory partly imported from the theory of games. This point of view offers a simpler way to incorporate prior information on complex signals. Signals are modeled as elements of a particular set O, without specifying their probability distribution in this set. For example, large classes of images belong to the set of signals whose total variation is bounded by a constant. To control the risk for any f C O, we compute the maximum risk
r(D,O) - s u p r ( D , f ) fEo
.
The minimax risk is the lower bound computed over all operators D"
rn(O) = inf r(D allD
0).
In practice, the goal is to find an operator D that is simple to implement and which yields a risk close the minimax lower bound. Unless O has particular convexity properties, non-linear estimators have a much lower risk than linear estimators. If W is a white noise and signals in O have a sparse representation in/3, then Chapter 10 shows that thresholding estimators are nearly minimax optimal. In particular, the risk of wavelet thresholding estimators is close to the minimax risk for wide classes ofpiecewise smooth signals, including bounded variation images. Thresholding estimators are extended to more complex problems such as signal restorations and deconvolutions. The performance of a thresholding may also be improved with a best basis search or a pursuit algorithm that adapts the basis/3 to the noisy data. However, more adaptivity does not necessarily means less risk.
1.4.3 Compression Limited storage space and transmission through narrow band-width channels create a need for compressing signals while minimizing their degradation. Transform codes compress signals by decomposing them in an orthonormal basis. Chapter 11 introduces the basic information theory needed to understand these codes and optimize their performance. Bayes and minimax approaches are studied. A transform code decomposes a signal f in an orthonormal basis B =
{gm}O<_m
N-1 f-- E(f, m---O
gm) gm.
The coefficients (f, gm) are approximated by quantized values Q((f, gm)). A signal f is restored from these quantized coefficients"
N-1 3c-Ea{(f, m=O
gm))gm.
1.5 TRAVELGUIDE
17
A binary code is used to record the quantized coefficients Q((f, gm)) with R bits. The resulting distortion is d(e,f)
-
IIf- fll 2.
At the compression rates currently used for images, d(R, f ) has a highly non-linear behavior, which depends on the precision of non-linear approximations of f from a few vectors in the basis 13. To compute the distortion rate over a whole signal class, the Bayes framework models signals as realizations of a random vector F whose probability distribution 7r is known. The goal is then to optimize the quantization and the basis 13 in order to minimize the average distortion rate d(R, Tr) = E~{d(R,F)}. This approach applies particularly well to audio signals, which are relatively well modeled by Gaussian processes. In the absence of stochastic models for complex signals such as images, the minimax approach computes the maximum distortion by assuming only that the signal belongs to a prior set O. Chapter 11 describes the implementation of image transform codes in wavelet bases and block cosine bases. The minimax distortion rate is calculated for bounded variation images, and wavelet transform codes are proved to be nearly minimax optimal. For video compression, one must also take advantage of the similarity of images across time. The most effective algorithms predict each image from a previous one by compensating for the motion, and the error is recorded with a transform code. MPEG video compression standards are described. 1.5 1.5. I
TRAVEL GUIDE Reproducible Computational Science
The book covers the whole spectrum from theorems on functions of continuous variables to fast discrete algorithms and their applications. Section 1.3.1 argues that models based on continuous time functions give useful asymptotic results for understanding the behavior of discrete algorithms. Yet, a mathematical analysis alone is often unable to predict fully the behavior and suitability of algorithms for specific signals. Experiments are necessary and such experiments ought in principle be reproducible, just like experiments in other fields of sciences. In recent years, the idea of reproducible algorithmic results has been championed by Claerbout [127] in exploration geophysics. The goal of exploration seismology is to produce the highest possible quality image of the subsurface. Part of the scientific know-how involved includes appropriate parameter settings that lead to good results on real datasets. The reproducibility of experiments thus requires having the complete software and full source code for inspection, modification and application under varied parameter settings. Donoho has advocated the reproducibility of algorithms in wavelet signal processing, through the development of a WAVELABtoolbox, which is a large library of MATLABroutines. He summarizes Claerbout's insight in a slogan: [ 105]
18
CHAPTER I INTRODUCTION TO A TRANSIENT WORLD
An article about computational science in a scientific publication is not the scholarship itself it is merely advertising of the scholarship. The actual scholarship is the complete software environment and the complete set of instructions which generated the figures. Following this perspective, all wavelet and time-frequency tools presented in this book are available in WAVELAB. The figures can be reproduced as demos and the source code is available. The LASTWAVEpackage offers a similar library of wavelet related algorithms that are programmed in C, with a user-friendly shell interface and graphics. Appendix B explains how to retrieve these toolboxes, and relates their subroutines to the algorithms described in the book.
1.5.2
Road Map
Sections are kept as independent as possible, and some redundancy is introduced to avoid imposing a linear progression through the book. The preface describes several possible paths for a graduate signal processing or an applied mathematics course. A partial hierarchy between sections is provided by a level number. If a section has a level number then all sub-sections without number inherit this level, but a higher level number indicates that a subsection is more advanced. Sections of level 1 introduce central ideas and techniques for wavelet and timefrequency signal processing. These would typically be taught in an introductory course. The first sections of Chapter 7 on wavelet orthonormal bases are exampies. Sections of level 2 concern results that are important but which are either more advanced or dedicated to an application. Wavelet packets and local cosine bases in Chapter 8 are of that sort. Applications to estimation and data compression belong to this level, including fundamental results such as Wiener filtering. Sections of level 3 describe advanced results that are at the frontier of research or mathematically more difficult. These sections open the book to research problems. All theorems are explained in the text and reading the proofs is not necessary to understand the results. Proofs also have a level index specifying their difficulty, as well as their conceptual or technical importance. These levels have been set by trying to answer the question: "Should this proof be taught in an introductory course?" Level 1 means probably, level z probably not, level 3 certainly not. Problems at the end of each chapter follow this hierarchy of levels. Direct applications of the course are at the level 1. Problems at level z require more thinking. Problems of level 3 are often at the interface of research and can provide topics for deeper projects. The book begins with Chapters 2 and 3, which review the Fourier transform properties and elementary discrete signal processing. They provide the necessary background for readers with no signal processing experience. Fundamental properties of local time-frequency transforms are presented in Chapter 4. The wavelet and windowed Fourier transforms are introduced and compared. The measurement of instantaneous frequencies is used to illustrate the limitations of their time-frequency resolution. Wigner-Ville time-frequency distributions give a
1.5
TRAVELGUIDE
19
global perspective which relates all quadratic time-frequency distributions. Frame theory is explained in Chapter 5. It offers a flexible framework for analyzing the properties of redundant or non-linear adaptive decompositions. Chapter 6 explains the relations between the decay of the wavelet transform amplitude across scales and local signal properties. It studies applications involving the detection of singularities and analysis of multifractals. The construction of wavelet bases and their relations with filter banks are fundamental results presented in Chapter 7. An overdose of orthonormal bases can strike the reader while studying the construction and properties of wavelet packets and local cosine bases in Chapter 8. It is thus important to read in parallel Chapter 9, which studies the approximation performance of orthogonal bases. The estimation and data compression applications of Chapters 10 and 11 give life to most theoretical and algorithmic results of the book. These chapters offer a practical perspective on the relevance of these linear and non-linear signal processing algorithms.
II FOURIER K I N G D O M
he story begins in 1807 when Fourier presents a memoir to the Institut de France, where he claims that any periodic function can be represented as a series of harmonically related sinusoids. This idea had a profound impact in mathematical analysis, physics and engineering, but it took one and a half centuries to understand the convergence of Fourier series and complete the theory of Fourier integrals. Fourier was motivated by the study of heat diffusion, which is governed by a linear differential equation. However, the Fourier transform diagonalizes all linear time-invariant operators, which are the building blocks of signal processing. It is therefore not only the starting point of our exploration but the basis of all further developments.
T
2. I
LINEAR TIME-INVARIANT
FILTERING 1
Classical signal processing operations such as signal transmission, stationary noise removal or predictive coding are implemented with linear time-invariant operators. The time invariance of an operator L means that if the input f ( t ) is delayed by r, f~(t) -- f ( t - 7-), then the output is also delayed by 7-:
g(t) -- L f (t) =~ g ( t - r) = L f ~(t).
(2.1)
For numerical stability, the operator L must have a weak form of continuity, which means that L f is modified by a small amount if f is slightly modified. This weak 20
2. I
21
LINEARTII'4E-INVARIANT FILTERING
continuity is formalized by the theory of distributions [66, 69], which guarantees that we are on a safe ground without further worrying about it.
2.1.1
Impulse Response
Linear time-invariant systems are characterized by their response to a Dirac impulse, defined in Appendix A.7. If f is continuous, its value at t is obtained by an "integration" against a Dirac located at t. Let 3u(t) -- 3 ( t - u): +c~
f
f(t) --
f(U)6u(t)du. O0
The continuity and linearity of L imply that
Lf(t) --
f
+e~
f(u)L6u(t)du. O(3
Let h be the impulse response of L:
h(t) = L#(t). The time-invariance proves that L6u (t) = h (t - u) and hence
Lf(t)-
f7
f(u)h(t-u)duO()
h(u)f(t-u)du-h,
f(t).
(2.2)
A time-invariant linear filter is thus equivalent to a convolution with the impulse response h. The continuity of f is not necessary. This formula remains valid for any signal f for which the convolution integral converges. Let us recall a few useful properties of convolution products: 9 Commutativity
f .h(t) = h . f(t).
(2.3)
d df dh d t ( f .h)(t) - --dT.h(t)- f .--d~(t).
(2.4)
9 Differentiation
9 Dirac convolution
f .~(t)=
f(t-r).
(2.5)
Stability and Causality A filter is said to be causal if L f (t) does not depend on the values f(u) for u > t. Since
f +e~ L f (t) --
h(u) f (t - u)du, OO
22
CHAPTERII FOURIERKINGDOM
this means that h(u) = 0 for u < 0. Such impulse responses are said to be causal. The stability property guarantees that Lf(t) is bounded if f(t) is bounded. Since
[Lf(t)l <_ f+oo [ h ( u ) l l f ( t - u ) l d u < _ s u p l f ( u ) l cx)
u E1R
f+~
Ih(u)ldu,
oo
it is sufficient that f_+~ Ih(u)ldu < + ~ . One can verify that this condition is also necessary if h is a function. We thus say that h is stable if it is integrable. Example 2.1 An amplification and delay system is defined by
L f (t) -- A f (t - 7). The impulse response of this filter is h(t) -- A 6 ( t - 7). Example 2.2 A uniform averaging of f over intervals of size T is calculated by
1 ft+r/2 ~ , I t - T / 2 f(u)du.
Lf(t)-
This integral can be rewritten as a convolution of f with the impulse response
h = 1/T 2.1.2
l[_T/2,T/2].
Transfer Functions
Complex exponentials
e iwt
are eigenvectors of convolution operators. h(u) e ic~
L e ic~ - -
Indeed
du,
OO
which yields te
The eigenvalue
ic~ - - e itca
f
h(co) -
+oo
h(u) e -i~~ du = h(cv) e ic~ .
O0
f
+oo
h(u)e-iC~
O0
is the Fourier transform of h at the frequency co. Since complex sinusoidal waves e ic~ a r e the eigenvectors of time-invariant linear systems, it is tempting to try to decompose any function f as a sum of these eigenvectors. We are then able to express L f directly from the eigenvalues h(co). The Fourier analysis proves that under weak conditions on f , it is indeed possible to write it as a Fourier integral. 2.2
FOURIER INTEGRALS 1
To avoid convergence issues, the Fourier integral is first defined over the space L ~(IR) of integrable functions [57]. It is then extended to the space L z (IR) of finite energy functions [24].
2.2 2.2. I
23
INTEGRALS
FOURIER
Fourier Transform in
L 1(It{)
The Fourier integral (2.6)
~f(w) = / + ~ f (t) e-i~t dt
measures "how much" oscillations at the frequency co there is in f . If f c L 1 (R) this integral does converge and
If(a;)l <
If(t)ldt
oo
< +ec.
(2.7)
The Fourier transform is thus bounded, and one can verify that it is a continuous function of co (Problem 2.1). If f is also integrable, the following theorem gives the inverse Fourier transform. T h e o r e m 2.1 (INVERSE FOURIER TRANSFORM)
f (t) -- ~1
I f f E LI(R) and ]f C LI(R) then
f+oo ]f (co) e i~~dco.
(2.8)
o(3
Proof 2. Replacing 3e(a2) by its integral expression yields 127r/ ~ 7 f(co) exp(iaJt)dw = ~1 L 7
(J'7
f(u) exp[i~(t-u)]du ) dw.
We cannot apply the Fubini Theorem m.2 directly because f(u)exp[iaJ(t- u)] is not integrable in N2. To avoid this technical problem, we multiply by exp(-e2co2/4) which converges to 1 when e goes to 0. Let us define
'i_7(/7 f(u)
Ie(t) --- ~
exp
4
)
exp[iw(t-u)]du dco.
(2.9)
We compute I, in two different ways using the Fubini theorem. The integration with respect to u gives
If
I,(t) = ~ Since
f(a;) exp
f(co) exp
( - ~2032) 4
( -s4 ) exp(ia2t)dw.
exp[i~(t- u)] <_ Ij?(~)l
and since 37 is integrable, we can apply the dominated convergence Theorem A.1, which proves that l~-+o imI,(t)-
~1 f + ~ ~c(~) exp(icot)dco. oo
(2.10)
Let us now compute the integral (2.9) differently by applying the Fubini theorem and integrating with respect to co:
L(t) - f+~g~(t-u) f(u)du,
(2.11)
24
CHAPTERII
FOURIERKINGDOM
with g, (x) = ~I f 7
exp(ixw) exp ( -ezW2 4 ) dw.
A change of variable w' = ew shows that g,(x) = e-1 gl (e-lx), and it is proved in (2.32) that gl (x) -- 7r-1/2 e -x2 . The Gaussian gl has an integral equal to 1 and a fast decay. The squeezed Gaussians g, have an integral that remains equal to 1, and thus they converge to a Dirac ~ when e goes to 0. By inserting (2.11) one can thus verify that lim,_+o1 7
II'(t) - f(t)ldt : ~i~m~J" f g~(t-u) ,f(u) - f(t)ldudt=O.
Inserting (2.10) proves (2.8).
II
The inversion formula (2.8) decomposes f as a sum of sinusoidal w a v e s e i~t of amplitude f ( ~ ) . By using this formula, we can show (Problem 2.1) that the hypothesis f E L 1(R) implies that f must be continuous. The reconstruction (2.8) is therefore not proved for discontinuous functions. The extension of the Fourier transform to the space L2(I~) will address this issue. The most important property of the Fourier transform for signal processing applications is the convolution theorem. It is another way to express the fact that sinusoidal w a v e s e itw are eigenvalues of convolution operators.
Theorem 2.2 ( C O N V O L U T I O N )
Let f E L 1 (IR) and h E L 1(R). The function g =
h . f is in L1 (JR) and ~(w) -- kt(w) )~(w).
(2.12)
Proof 1. ~(w) --
exp(-itw) O<3
(f7
f(t-u)h(u)du
)
dt.
Since I f ( t - u)llh(u)l is integrable in R 2, we can apply the Fubini Theorem A.2, and the change of variable (t,u) --+ (v = t - u,u) yields ~(w)
=
=
Si f
exp[-i(u +v)w] f(v) h(u)dudv oo
(f+~exp(-iw)f(v)dv)(/~+~exp(-iuw)h(u)du),
which verifies (2.12).
II
The response L f - g - f , h of a linear time-invariant system can be calculated from its Fourier transform ~(w) -- f(~)it(w) with the inverse Fourier formula
g(t) - ~1
f+~
g ( ~ ) e i~t dw,
(2.13)
0(3
which yields
i f +~~t(w) f (w) e iwt dw.
L f (t) --- ~
O0
(2.14)
2.2
FOURIERINTEGRALS
25
Each frequency component e itu of amplitude f(w) is amplified or attenuated by ~t(~). Such a convolution is thus called a frequency filtering, and ~t is the transfer function of the filter. The following table summarizes important properties of the Fourier transform, often used in calculations. Most of these formulas are proved with a change of variable in the Fourier integral.
Property
Function
Inverse
f(~)
f(t)
27r f ( - ~ )
(2.15)
f l (~) f2(~) 1 ~ )~1 * f2(~)
(2.16)
f l * f2(t)
Multiplication
f l (t) f2(t)
Translation
Frequency derivatives
f ( t - u) e i~t f (t) f(t/s) f(P) (t) (-it) p f(t)
Complex conjugate Hermitian symmetry
f* (t) f(t) E IR
Scaling Time derivatives
2.2.2
f(t) Convolution
Modulation
Fourier Transform
(2.17)
e-iu~ ~c(~) ~f(~ - ~)
(2.18) (2.19)
Isl f ( s ~ ) (ico)p )~(a~)
(2.20) (2.21)
)~(P) (a~)
(2.22)
f* ( - ~ ) f(-co) -- f*(cc)
(2.23) (2.24)
Fourier Transform in L2(R)
The Fourier transform of the indicator function f = 1[_1,1] is
f(~) -
e-i~tdt_
2sinaJ
1
This function is not integrable because f is not continuous, but its square is integrable. The inverse Fourier transform Theorem 2.1 thus does not apply. This motivates the extension of the Fourier transform to the space L 2(N) of functions f with a finite energy f + ~ If(t)12dt < +oc. By working in the Hilbert space Lz(R), we also have access to all the facilities provided by the existence of an inner product. The inner product of f E L 2(R) and g E L 2 (R) is
(f ,g) - f + ~ f ( t ) g*(t)dt, and the resulting norm in L 2(]~) is +~
[Ifll 2 - (f ,f) -
f
If(t)12dt. O(3
26
CHAPTERII FOURIERKINGDOM
The following theorem proves that inner products and norms in L2(R) are conserved by the Fourier transform up to a factor of 27r. Equations (2.25) and (2.26) are called respectively the Parseval and Plancherel formulas. T h e o r e m 2.3 If f and h are in LI(R)NL2(N) then
(3O
' l+"O0 f (co) ~t*(co) dco.
f(t)h*(t)dt- ~
(2.25)
For h = f it follows that
i_oo
If(t)12dt -- ~117
I=dco.
(2.26)
Proof ~. Let g -
f . h with h(t) - h* ( - t ) . The convolution Theorem 2.2 and property (2.23) show that ~(co) - f(co) h* (co). The reconstruction formula (2.8) applied to g(0)
yields 77
1/§176~,(co)dco- ~177 i(co) ~*(co)dco.
f(t)h*(t)dt- g(O)- ~
O(3
Density Extension in L2(R) If f E L2(N) but f ~ LI(~), its Fourier transform cannot be calculated with the Fourier integral (2.6) because f ( t ) e i~t is not integrable. It is defined as a limit using the Fourier transforms of functions in L1 (~) f-'lLz (R). Since L I ( R ) n Lz(R) is dense in Lz(R), one can find a family {fn}ncz of functions in LI(R) n Lz(R) that converges to f: lira [ I f - f nll -- O. n--++c~
Since {fn}nEZ converges, it is a Cauchy sequence, which means that I[fn - fp[[ is arbitrarily small if n and p are large enough. Moreover, fn E L 1(R), so its Fourier t r a n s f o r m 3cn is well defined. The Plancherel formula (2.26) proves that {3c n }nEZ is also a Cauchy sequence because Ilfn--d%Pll--X/~lfn--fPll is arbitrarily small for n and p large enough. A Hilbert space (Appendix A.2) is complete, which means that all Cauchy sequences converge to an element of the space. Hence, there exists )~ C L2(R) such that lim
n-++~
IIf-
JCnl[- 0.
By definition, f is the Fourier transform of f. This extension of the Fourier transform to L 2(R) satisfies the convolution theorem, the Parseval and Plancherel formulas, as well as all properties (2.15-2.24).
2.2
27
FOURIERINTEGRALS
Diracs Diracs are often used in calculations; their properties are summarized in Appendix A.7. A Dirac 5 associates to a function its value at t = 0. Since e iwt = 1 at t = 0 it seems reasonable to define its Fourier transform by
6(~)-/+~(t)e-i~'dt-1.
(2.27)
This formula is justified mathematically by the extension of the Fourier transform to tempered distributions [66, 69].
2.2.3
Examples
The following examples often appear in Fourier calculations. They also illustrate important Fourier transform properties. 9 The indicator function f = I[-T,T] is discontinuous at t = +T. Its Fourier transform is therefore not integrable: f f (O2) - -
f T e - i w t dt - 2sin(Too) . T
(2.28)
02
9 An ideal low-pass filter has a transfer function ]~ - 1[_~,~] that selects low frequencies over [-{, {]. The impulse response is calculated with the inverse Fourier integral (2.8):
1 f~~e iwt d~ -
h(t)- ~
sin(~t) 7rt
(2.29)
9 A passive electronic circuit implements analog filters with resistances, capacities and inductors. The input voltage f ( t ) is related to the output voltage g(t) by a differential equation with constant coefficients: K
Z
M
ak f(k)(t) -- E
k=0
bk g(k)(t).
(2.30)
k--0
Suppose that the circuit is not charged for t < 0, which means that f ( t ) = g(t) = 0. The output g is a linear time-invariant function of f and can thus be written g = f , h. Computing the Fourier transform of (2.30) and applying (2.22) proves that
]~(w) - ~,(w) _ X
f(w)
m
r (iw)k f~"k=oak M E -0b (i )k
(2.31)
It is therefore a rational function of iw. An ideal low-pass transfer function 1[_~,~] thus cannot be implemented by an analog circuit. It must be approximated by a rational function. Chebyshev or Butterworth filters are often used for this purpose [14].
28
CHAPTERII FOURIERKINGDOM
9 A Gaussian f(t) - e x p ( - t 2) is a C ~ function with a fast asymptotic decay. Its Fourier transform is also a Gaussian: )'(co) -- ~
exp(-co 2/4).
(2.32)
This Fourier transform is computed by showing with an integration by parts that f ( ~ ) - f_+~ exp(-t2)e-i~tdt is differentiable and satisfies the differential equation 2 f'(a~) +aJ f(co) - 0.
(2.33)
The solution of this equation is a Gaussian f (co) - K exp(-a~ 2/4), and since f (O) - f_+~ exp(-t2) dt - v/-~, we obtain (2.32). 9 A Gaussian chirp f(t) - e x p [ - ( a - i b ) t 2] has a Fourier transform calculated with a similar differential equation:
(co) --
~/~ (-(a+ib)~2) a - ib exp 4(a2 + b2 )
.
(2.34)
9 A translated Dirac ~5~(t) - 6 ( t - r) has a Fourier transform calculated by evaluating e -i~t at t - 7-:
~(w)- f+~a(t-r)e-i~tdt-e
-i~.
(2.35)
9 The Dirac comb is a sum of translated Diracs -lt-oo
c(t)-- Z
8(t-nT)
that is used to uniformly sample analog signals. Its Fourier transform is derived from (2.35)" +oc
b(CO)- Z e-inTa~"
(2.36)
n~--cx)
The Poisson formula proves that it is also equal to a Dirac comb with a spacing equal to 27r/T. Theorem 2.4 (PoISSON FORMULA) In the sense of distribution equalities (A.32),
Z e n---c~
r
k---cx~
T
(2.37)
2.3
29
PROPERTIES
Proof 2.
The Fourier transform ? in (2.36) is periodic with period 27r/T. To verify the Poisson formula, it is therefore sufficient to prove that the restriction of b to [-Tr/T, 7r/T] is equal to 27r/T6. The formula (2.37) is proved in the sense of a distribution equality (A.32) by showing that for any test function ~(~) with a support included in [-Tr/T, 7r/T],
fWeoo N (C, (~) -- N--+-k-cx~lim Z exp(-inTw) ~(w) dw = ~27r ~(0). n-- -N The sum of the geometric series is N
exp(-inrw) -
sin[(N + 1/2)Tw]
(2.38)
sin[rw/2]
n-- -N
Hence lim N - + -k- cx~
2re f~/r T !J _ Tr/ T
Let
sin[(N + 1/2)Tw]
Tw/2
7f03
sin[Tw/2]
{~(~) si.-~z-/2j ~/2 ~(w)-
0
qS(w)dw.
(2.39)
if I~1-< ~/T if [w[ >
7r/T
and ~(t) be the inverse Fourier transform of zp(~). Since 2w -1 sin(aw) is the Fourier transform of l[-a,a] (t), the Parseval formula (2.25) implies --
N~+~lim2__f_~Tf ~ ~ sin[(N +Trwl/2)Tw]+(w)dw
=
lim 27r f(U+l/Z)T U--++~T "a_(N+l/2)r~(t)dt"
(2.40)
When N goes to -q-c~ the integral converges to ~(0) -- ~(0).
2.3 2.3. I
PROPERTIES 1 Regularity and Decay
The global regularity of a signal f depends on the decay of If(w)l when the frequency w increases. The differentiability of f is studied. If f E LI(•), then the Fourier inversion formula (2.8) implies that f is continuous and bounded:
If(t)[ _< ~1 ./+ ~ Iei~t~f( ~ ) [ d ~ - ~1 f +~ If(~)ld~ <
+~.
(2.41)
The next proposition applies this property to obtain a sufficient condition that guarantees the differentiability of f at any order p.
30
CHAPTERII FOURIERKINGDOM
Proposition 2.1 A function f is bounded and p times continuously differentiable with bounded derivatives if (2.42) O(3
Proof 1. The Fourier transform of the k th order derivative f(k)(t) is (i~)k~(~). Applying (2.41) to this derivative proves that
Condition (2.42) implies that f + ~ I~(~)11~1 ~ d~ < + ~ for any k < p, so f(k)(t) is continuous and bounded. II This result proves that if there exist a constant K and e > 0 such that - 1 + ]&l p-4-1-k-e' then
f E C p.
If 37 has a compact support then (2.42) implies that f C C ~. The decay of If @) I depends on the worst singular behavior of f . For example, f -- l[-r,r] is discontinuous at t - i T , so If( )I decays like In this case, it could also be important to know that f(t) is regular for t # +T. This information cannot be derived from the decay of If@)l. To characterize local regularity of a signal f it is necessary to decompose it over waveforms that are well localized in time, as opposed to sinusoidal w a v e s e i~~ Section 6.1.3 explains that wavelets are particularly well adapted to this purpose.
2.3.2
Uncertainty Principle
Can we construct a function f whose energy is well localized in time and whose Fourier transform ]c has an energy concentrated in a small frequency neighborhood? The Dirac 6 ( t - u) has a support restricted to t -- u but its Fourier transform e - i u ~ has an energy uniformly spread over all frequencies. We know that If( )l decays quickly at high frequencies only if f has regular variations in time. The energy of f must therefore be spread over a relatively large domain. To reduce the time spread of f , we can scale it by s < 1 while maintaining constant its total energy. If 1
fs(t)- ~f(s)
t
then
Ilfsl]2 - Ilfll 2
The Fourier transform ?s(~) - x/s)~(s~)is dilated by 1/s so we lose in frequency localization what we gained in time. Underlying is a trade-off between time and frequency localization. Time and frequency energy concentrations are restricted by the Heisenberg uncertainty principle. This principle has a particularly important interpretation in
2.3 PROPERTIES
31
quantum mechanics as an uncertainty as to the position and momentum of a free particle. The state of a one-dimensional particle is described by a wave function f C L2(R). The probability density that this particle is located at t is ~ 1 If(t) 12. The probability density that its momentum is equal to • is 2~11f112 average location of this particle is
lf+
tlf(t)12dt,
1 f+~
~1~(~)12d~.
u-iif[[2
~
The
(2.43)
and the average momentum is
-
27wllfll 2
~
(2.44)
The variances around these average values are respectively (2.45)
1L+cxzCxz(t-u)21f(t)12dt
0-2_ ii~ll 2 and
1 /+~~ (co -
2 __ cr~ 2rrl fl12
(2.46)
~c) 2 ? ( w ) l 2 dco.
The larger at, the more uncertainty there is concerning the position of the free particle; the larger cry, the more uncertainty there is concerning its momentum. T h e o r e m 2.5 (HEISENBERGUNCERTAINTY) The temporal variance and the frequency variance of f E L 2 (IR) satisfy 2> 1 cr2 cr~ _ ~.
(2.47)
This inequality is an equality if and only if there exist (u,~,a,b) E ]t~2 that f (t) -- a e x p [ i ~ t - b ( t - u)2].
X C. 2
such
(2.48)
Proof z. The following proofdue to Weyl [75] supposes that limltl_++~ v/tf(t) = 0, but the theorem is valid for any f E L2 (R). If the average time and frequency localization of f is u and ~, then the average time and frequency location of exp(-i~t) f(t + u) is zero. It is thus sufficient to prove the theorem for u = ~ = 0. Observe that 0_20_~2 ___
27r11 flf+~tf(t) 2dtf+~)f(~)12d~14
.
(2.49)
Since iwf(w) is the Fourier transform of f ' (t), the Plancherel identity (2.26) applied to iwf(w) yields 2__ 0-,2 0-~
1 ll/14
Itf(t) 2dr f + ~ if,(t)2dt.
(2.50)
32
CHAPTERII FOURIERKINGDOM
Schwarz's inequality implies
cr2cr~
~l
_ >__
>_
(t)
(t)ldt
12
l [f +~t~ [/'(t) f*(t) + f ' * ( t ) f ( t ) ] d t 12 411/114
[fl
t (If (t )
,2,,
dt
.
Since limltl_++~ v/tf(t) = 0, an integration by parts gives
O"t O " w __
411/114
If(t)l 2dt
= ~.
(2.51)
To obtain an equality, Schwarz's inequality applied to (2.50) must be an equality. This implies that there exists b E C such that
f'(t) = - 2 b t f(t).
(2.52)
Hence, there exists a C C such that f ( t ) = a exp(-bt2). The other steps of the proof are then equalities so that the lower bound is indeed reached. When u ~ 0 and sc ~ 0 the corresponding time and frequency translations yield (2.48). I In quantum mechanics, this theorem shows that we cannot reduce arbitrarily the uncertainty as to the position and the momentum of a free particle. In signal processing, the modulated Gaussians (2.48) that have a minimum joint time-frequency localization are called Gabor chirps. As expected, they are smooth functions with a fast time asymptotic decay.
Compact Support Despite the Heisenberg uncertainty bound, we might still be able to construct a function of compact support whose Fourier transform has a compact support. Such a function would be very useful in constructing a finite impulse response filter with a band-limited transfer function. Unfortunately, the following theorem proves that it does not exist. T h e o r e m 2.6 If f ~ 0 has a compact support then f (~) cannot be zero on a whole interval. Similarly, if f ~ 0 has a compact support then f (t) cannot be zero on a whole interval.
Proof 2. We prove only the first statement, since the second is derived from the first by applying the Fourier transform. If f has a compact support included in [-b, b] then f (t) = ~
b 3e(co) exp(icot)&o.
(2.53)
If f ( t ) = 0 for t E [c,d], by differentiating n times under the integral at to = (c + d)/2, we obtain
if
f(") (t0) = ~-~
b f (co) (ico)n exp(iaJto) &O = 0.
(2.54)
2.3
PROPERTIES
33
Since
b f(a~) exp[ico(t-to)] exp(icoto)daJ,
f (t ) = -~
(2.55)
developing exp[iaJ(t- to)] as an infinite series yields for all t E IR
1 ~ f(t) = ~ n = 0
[i(t--to)] n
n!
fb b
y(o.))o.) n exp(ia~to)dco - O.
I
This contradicts our assumption that f -7/=0. 2.3.3
(2.56)
Total Variation
The total variation measures the total amplitude of signal oscillations. It plays an important role in image processing, where its value depends on the length of the image level sets. We show that a low-pass filter can considerably amplify the total variation by creating Gibbs oscillations. Variations
If f is differentiable, its total variation is defined by
and Oscillations
Ilfllv -
f
+oc
0(3
(2.57)
If'(t)ldt.
If {Xp }p are the abscissa of the local extrema of f where f ' (Xp) - O, then
Ilfllw - ~
If(Xp+l) - f(xp)l. P
It thus measures the total amplitude of the oscillations of f . For example, if f ( t ) = e x p ( - t e ) , then [[fllv = 2. If f(t) = sin(yrt)/(Trt), then f has a local extrema atxp E [ p , p + 1] for any p E Z. Since I f ( X p + l ) - f ( X p ) [ ~ [p[-1, we derive that II/llv = +oc. The total variation of non-differentiable functions can be calculated by considering the derivative in the general sense of distributions [66, 79]. This is equivalent to approximating the derivative by a finite difference on an interval h that goes to zero:
Ilfllv
--
lim f + ~
h-+0J _ ~
If(t)
-
f(t-
Ihl
h)l dt.
(2.58)
The total variation of discontinuous functions is thus well defined. For example, if f - lid,b] then (2.58) gives Ilfllv - 2. We say that f has a bounded variation if
Ilfllv < +oc.
Whether f ' is the standard derivative of f or its generalized derivative in the sense of distributions, its Fourier transform is f ' (a~) - iaJf (a~). Hence
I~11f(~)l ~ f ~ ~ If'(t)l dt --Ilfllv,
34
CHAPTERII
FOURIERKINGDOM
which implies that
If(~)l ~ Ilfllg.
(2.59)
However, If(~)l- o([cJ1-1) is not a sufficient condition to guarantee that f has bounded variation. For example, if f ( t ) - sin(Trt)/(Trt), then f - 1[_~,~] satisfies
If(~)l -< 7rlc~ although be evaluated from If(aJ)l. ^
Ilfllv
- +oc. In general, the total variation of f cannot
Discrete Signals Let fN[n] -- f ( n / N ) be a discrete signal obtained with a uniform sampling at intervals N -1. The discrete total variation is calculated by approximating the signal derivative by a finite difference over the sampling distance h - N -1, and replacing the integral (2.58) by a Riemann sum, which gives"
IIfNllw -- ~ IfN[n]- f N [ n - 111.
(2.60)
n
If np are the abscissa of the local extrema of fN, then
IIf NIIv -- ~
If N[np+l] - f N[npll .
P
The total variation thus measures the total amplitude of the oscillations of f . In accordance with (2.58), we say that the discrete signal has a bounded variation if IIfNIIv is bounded by a constant independent of the resolution N. Gibbs Oscillations Filtering a signal with a low-pass filter can create oscillations that have an infinite total variation. Let fr -- f , he be the filtered signal obtained with an ideal low-pass filter whose transfer function is kt~ - 1[_~,~]. If f C L 2 (R),
then f~ converges to f in L2(~) norm: lim~_++~ IIf1[_~,~] and the Plancherel formula (2.26) implies that
[if_fell2_
l
~
]jT(co)- ~'r
2 d~ - ~l
f~ll- 0.
Indeed, f~ =
fl ~ I>r i~.(~v)12d~'
which goes to zero as ~ increases. However, if f is discontinuous in to, then we show that f~ has Gibbs oscillations in the neighborhood of to, which prevents s u p t ~ If(t) - fr from converging to zero as ~ increases. Let f be a bounded variation function Ilfllv < + ~ that has an isolated discontinuity at to, with a left limit f ( t o ) and fight limit f ( t + ) . It is decomposed as a sum of fc, which is continuous in the neighborhood of to, plus a Heaviside step of amplitude f (t +) - f ( t o ) :
f(t)-
f c ( t ) + [ f ( t o +) - f ( t o ) ] U ( t - t o ) ,
2.3
f (t)
35
PROPERTIES
f * h4v(t)
f -kh2v(t)
f -kh~(t)
I
04 f 0.2
0.4 0.2
0.2
0.2
0 -0.l
-0.
-0.
-0.
FIGURE 2. I Gibbs oscillations created by low-pass filters with cut-off frequencies that decrease from left to right.
with 1 0
u(t) -
ift_>O otherwise
"
(2.61)
Hence
f ~(t) = f c , h ~ ( t ) + [ f ( t + ) -
f(to)]u*h~(t-to).
(2.62)
Since fc has bounded variation and is uniformly continuous in the neighborhood of to, one can prove (Problem 2.13) that fc * h~(t) converges uniformly to fc(t) in a neighborhood of to. The following proposition shows that this is not true for u * h~, which creates Gibbs oscillations.
Proposition 2.2
(GIBBS) For any ~ > O, ~toosinx dx.
u*h~(t) -
7rx
(2.63)
Proof 2. The impulse response of an ideal low-pass filter, calculated in (2.29), is
h~(t) = sin((t)/(Trt). Hence 7-) f0 +~176 sin~(t- 7-) ::(t- ~) d~ -::(t- ~) d~. ..h~(t) - f ~~.(~) sin~(tThe change of variable x = ~ ( t - 7-) gives (2.63). The function
s( Cst) _ / ~ t
sinXTrxdx
is a sigmoid that increases from0 at t = - o o t o 1 att = +oo, with s ( 0 ) = 1/2. Ithas oscillations of period 7r/~, which are attenuated when the distance to 0 increases, but their total variation is infinite: I]s]]v = +oo. The maximum amplitude of the Gibbs oscillations occurs at t = +Tr/~, with an amplitude independent of ~:
A - s(Tr)- 1 -
f
~ sinx oo
7FX
d x - 1 ,.~ 0 . 0 4 5 .
3~ 9
CHAPTERII FOURIERKINGDOM
Inserting (2.63) in (2.62) shows that
f(t) - f ~(t) = [f(t0+) - f(to)]S(~(t- to)) +e(~,t) ,
(2.64)
where lim~_++oo suPlt_t0l 0 around to. The sigmoid s(Cs(t- to)) centered at to creates a maximum error of fixed amplitude for all {. This is seen in Figure 2.1, where the Gibbs oscillations have an amplitude proportional to the jump f (t+) - f (to ) at all frequencies {. Image Total Variation The total variation of an image f(xl,x2) depends on the amplitude of its variations as well as the length of the contours along which they occur. Suppose that f(xl ,x2) is differentiable. The total variation is defined by
Ilfllv- / f
f(x,,xe)ldxldX2,
(2.65)
where the modulus of the gradient vector is
IV f (x, ,x2 ) ] -
Of(Xl,X2)
OXl
2
+ Of(Xl,X2) 0x2
2) 1/2
As in one dimension, the total variation is extended to discontinuous functions by taking the derivatives in the general sense of distributions. An equivalent norm is obtained by approximating the partial derivatives by finite differences:
IAhf(xl,xe)l
f(xl,x2) -- f (xl -- h,x2) 2
h
+
f(Xl ,X2) -- f(Xl,X2 -- h) 2~ 1/2 h
)
One can verify that
Ilfff -< 01im/flzX f(xl'x2)ldx'dx2 <_ v llfll .
(2.66)
The finite difference integral gives a larger value when f(xl ,X2) is discontinuous along a diagonal line in the (xl ,x2) plane. The total variation of f is related to the length of it level sets. Let us define
Q y - {(Xl,X2) E ]1~2 " f(xl,x2) > y } . If f is continuous then the boundary O~'~y of ~"~yis the level set of all (xl ,X2) such that f(xl,x2) - y. Let Hl(Ofty) be the length of Ofty. Formally, this length is calculated in the sense of the monodimensional Hausdorff measure. The following theorem relates the total variation of f to the length of its level sets.
PROPERTIES
2.3
37
Theorem 2.7 (CO-AREA FORMULA) ff Ilfllv < + ~
then
J+i-i'
flit -
CX3
(2.67)
(O~-~y)dy.
Proof 2.
The proof is a highly technical result that is given in [79]. We give an intuitive explanation when f is continuously differentiable. In this c a s e O~"~yis a differentiable curve x(y,s) C IR2, which is parameterized by the arc-length s. Let -7(x) be the vector tangent to this curve in the plane. The gradient Vf(x) is orthogonal to ?(x). The Frenet coordinate system along O~"~y is composed of ?(x) and of the unit vector if(x) parallel to Vf(x). Let ds and dn be the Lebesgue measures in the direction of ? and ft. We have IVf(x)l =
~ f (x) . ~ - dy dn '
(2.68)
where dy is the differential of amplitudes across level sets. The idea of the proof is to decompose the total variation integral over the plane as an integral along the level sets and across level sets, which we write: Ilfl
IV f(xl,x2)ldx, dx2 =
I/
~ -
"
IL
fly
IV f(x(y,s))ldsdn.
"
(2.69)
By using (2.68) we can get
lifi v - j ' L . y d S d y . But
fOf~yas -
H
i
(OQy) is the length of the level set, which justifies (2.67).
II
The co-area formula gives an important geometrical interpretation of the total image variation. Images are uniformly bounded so the integral (2.67) is calculated over a finite interval and is proportional to the average length of level sets. It is finite as long as the level sets are not fractal curves. Let f -- c~lf~ be proportional to the indicator function of a set f~ C ~I~2 which has a boundary 0f~ of length L. The co-area formula (2.7) implies that If liT -- c~L. In general, bounded variation images must have step edges of finite length. Discrete Images A camera measures light intensity with photoreceptors that perform a uniform sampling over a grid that is supposed to be uniform. For a resolution N, the sampling interval is N -1 and the resulting image can be written fN[nl,n2]- f(nl/N, n2/N). Its total variation is defined by approximating derivatives by finite differences and the integral (2.66) by a Riemann sum: 1
( nl
(2.70)
If[nl,n2]--f[nl--l,n2]12+
n2
If[hi,n2]--f[nl,n2--1112)
1/2
In accordance with (2.66) we say that the image has bounded variation if IIfNllv is bounded by a constant independent of the resolution N. The co-area formula proves
38
CHAPTERII
FOURIERKINGDOM
FIGURE 2.2 (a): The total variation of this image remains nearly constant when the resolution N increases. (b): Level sets O~'-~yobtained by sampling uniformly the amplitude variable y.
that it depends on the length of the level sets as the image resolution increases. The ~ upper bound factor in (2.66) comes from the fact that the length of a diagonal line can be increased by x/~ if it is approximated by a zig-zag line that remains on the horizontal and vertical segments of the image sampling grid. Figure 2.2(a) shows a bounded variation image and Figure 2.2(b) displays the level sets obtained by discretizing uniformly the amplitude variable y. The total variation of this image remains nearly constant as the resolution varies. 2.4
T W O - D I M E N S I O N A L FOURIER T R A N S F O R M 1
The Fourier transform in IR" is a straightforward extension of the one-dimensional Fourier transform. The two-dimensional case is briefly reviewed for image processing applications. The Fourier transform of a two-dimensional integrable function f E LI(R 2) is
?(W1,W2) --
j~+oof+oo f (Xl,X2) exp[--i(WlXl +w2x2lldxl dx2. OO
In polar coordinates
(2.71)
O0
exp{i(wlX-+-w2y)] can be rewritten
exp[i(wlXl + w2x2)] -- exp[ip(xl cosO+ X2sinO)] with p - v/w12+ w2. It is a plane wave that propagates in the direction of 0 and oscillates at the frequency p. The properties of a two-dimensional Fourier transform are essentially the same as in one dimension. We summarize a few important results.
2.5 "I'WO-DIMENSIONALFOURIERTRANSFORM
39
9 If f E LI(]R 2) and 0r E LI(IR 2) then
f(xl,x2)- ~
(031,032)exp[i(03,x, +032x2)] do31 d032.
(2.72)
9 If f E L 1 (IR2) and h E L 1(]R2) then the convolution
g(xl,x2)- f .h(xl,x2)- f f f(ul,u2)h(xl-Ul,X2-u2)duldu2 has a Fourier transform
g(031,032) -- 5e(031,032)h(031,032).
(2.73)
9 The Parseval formula proves that
J"f f(xl,x2) g*(xl,x2)dxldx2 1
47r2
(031 032)
(2.74)
(031 032)d031 d032
.
If f = g, we obtain the Plancherel equality
IJ"
f (x~,x2)l 2 dxl dx2 - ~
ill1~(~,,~2) 12
d031 d032.
(2.75)
The Fourier transform of a finite energy function thus has finite energy. With the same density based argument as in one dimension, energy equivalence makes it possible to extend the Fourier transform to any function f E L 2 (]K2). 9 If f E L 2 (~2) is separable, which means that
f(xl,x2) = g(xl)h(x2), then its Fourier transform is
Je(031,032) -- g(031) h(032), where/~ and ~, are the one-dimensional Fourier transforms of g and h. For example, the indicator function
f(xl,x2)-
1
0
if Xl]<_T, I x z ] < T otherwise -
= I[-T,T](Xl) • I[-T,T](X2)
is a separable function whose Fourier transform is derived from (2.28):
f(031,032) -- 4sin(T031)sin(T032). 031 032 9 If
f(xl,x2) is rotated by 0: f O(Xl,X2) = f(Xl
cosO-x2sinO,xlsin0 -+-x2 COS0),
then its Fourier transform is rotated by - 0 : o(0 (03., 032) - of(03, cos0 +co2 sin0,-COl sin0 + co2cos0).
(2.76)
40 2.5
CHAPTERII FOURIERKINGDOM
PROBLEMS 2.1.
1 Prove that if f E LI(~)then j~(~)is acontinuous functionofw, a n d i f f E LI(~) then f (t) is continuous.
2.2. 1 Prove the translation (2.18), scaling (2.20) and time derivative (2.21) properties of the Fourier transform. 2.3. 1 Let fr(t)--Real[f (t)] and fi(t)--Ima[f(/)] be the real and imaginary parts of f(t). Prove that fr(6d)= [f (w) + f* (-w)]/2 a n d jci(02 ) - [3~( w ) - ? * ( - w ) ] / ( 2 i ) . 2.4. 1 By using the Fourier transform, verify that f+~ 2.5.
1
sin3 t
37r
t-5-- dt = - ~ and
f+~
o0
sin4t
27r
t-T-- dt = -~-.
Show that the Fourier transform of f(t) -- e x p ( - ( a - ib)t 2) is
f(w)=
~ T r ( a + i b ) a - i b e x p - 4 ( a 2 + b 2 )w 2 .
Hint: write a differential equation similar to (2.33). 2.6. 2 Riemann-Lebesgue Prove that if f E LI(II~) then lim f(w) -- 0. 02---+OO
Hint: Prove it first for C 1 functions with a compact support and use a density argument. 2.7. 1 Stability of passive circuits (a) Let p be a complex number with Real[p] < 0. Compute the Fourier transforms of f(t) -- exp(pt) 1[0,+~)(t) and of f(t) -- t n exp(pt) 1[o,+~)(t). (b) A passive circuit relates the input voltage f to the output voltage g by a differential equation with constant coefficients: K
M
E ak f(k)(t) --- E bk g(k)(t). k'-0
k--0
Prove that this system is stable and causal if and only if the roots of the M bk zk -- 0 have a strictly negative real part. equation ~--]k=0 (c) A Butterworth filter satisfies
I~(~)12 = 1 -+-(W/Wo)2N" For N = 3, compute kt(w) and h(t) so that this filter can be implemented by a stable electronic circuit. 2.8. 1 For any A > 0, construct f such that the time and frequency spread measured respectively by at and a~ in (2.46, 2.45) satisfy O"t > A and cr~ > A. 2.9. 2 Suppose that f(t) >_0 and that its support is in [-T,T]. Verify that If(~)l _ f(0). Let We be the half-power point defined by If(wc)l 2 - If(0)12/2 and If(~)l 2 < If(0)12/2 for w < Wc. Prove that WcT _> 7r/2.
2.10. 1 Hilbert transform
2.s PROBt.EMS
41
(a) Prove that if f ( ~ ) = 2/(iw) then f(t) = sign(t) = t/[t I. (b) Suppose that f E L I ( ~ ) is a causal function, i.e., f(t) = 0 for t < 0. Let fr(a)) = Real[f(~)] and f i ( ~ ) = Ima[f(w)]. Prove that f r = n f i and fi = - H f r where H is the Hilbert transform operator
ng(x) -- _If_ 7r +~ xg(u) - u du 2.11. 1 Rectification A rectifier computes g(t) = If(t)l, for recovering the envelope of modulated signals [57]. (a) Show that if f(t) -- a(t)sincoot with a(t) >_0 then
~(~o)
~
2 ~ ~ 7r
n - - --0(3
a(w-2nwo) 4n 2 - 1
(b) Suppose that a(~o) = 0 for I~l > w0. Find h such that a(t) = h , g(t). 2.12. 2 Amplitude modulation For 0 <_ n < N, we suppose that f,(t) is real and that fn(~O) = 0 for Iwl > ~0. (a) Double side-bands An amplitude modulated multiplexed signal is defined by N
g(t) = ~-~fn(t)cos(Zn~ot). n--O
Compute ~(~) and verify that the width of its support is 4N~0. Find a demodulation algorithm that recovers each f,, from g. (b) Single side-band We want to reduce the bandwidth of the multiplexed signal by 2. Find a modulation procedure that transforms each f,, into a real signal gn such that gn has a support included in [ - ( n + 1)~0,-n~0] U [n~0, (n + 1)w0], with the possibility of recovering f,, from gn. Compute the bandwidth of N-1 g -- ~-~n=0 gn, and find a demodulation algorithm that recovers each fn from g. 2.13. 2 Let f~ = f , h~ with h~ = 1[_~,~]. Suppose that f has a bounded variation Ilfllv < + ~ and that it is continuous in a neighborhood of to. Prove that in a neighborhood of to, f~(t) converges uniformly to f(t) when ~ goes to +c~. 2.14.
1 Tomography Let go(t) be the integral of f(xl,x2) along the line -Xl sin0 + x2 cos0 = t, which has an angle 0 and lies at a distance Itl from the origin:
go(t) = f + ~ 1 7 6(-tsinO + pcosO, tcosO + psinO)dp. Prove that ~0(w) = ) ~ ( - w s i n 0 , ~ c o s 0 ) . How can we recover f(xl,x2) from the tomographic projections go(t) for 0 < 0 < 27r ? 2.15.
1 Let f(xl,x2) be an image which has a discontinuity of amplitude A along a straight line having an angle 0 in the plane (Xl ,x2). Compute the am?litude of the Gibbs oscillations of f , h~(Xl,X2) as a function of ~, 0 and A, for h~(Wl,W2) ~--1[_~,~] (w,) 1 [_~,~](~o2).
/// DISCRETE REVOLUTION
igital signal processing has taken over. First used in the 1950's at the service of analog signal processing to simulate analog transforms, digital algorithms have invaded most traditional fortresses, including television standards, speech processing, tape recording and all types of information manipulation. Analog computations performed with electronic circuits are faster than digital algorithms implemented with microprocessors, but are less precise and less flexible. Thus analog circuits are often replaced by digital chips once the computational performance of microprocessors is sufficient to operate in real time for a given application. Whether sound recordings or images, most discrete signals are obtained by sampling an analog signal. Conditions for reconstructing an analog signal from a uniform sampling are studied. Once more, the Fourier transform is unavoidable because the eigenvectors of discrete time-invariant operators are sinusoidal waves. The Fourier transform is discretized for signals of finite size and implemented with a fast computational algorithm.
D
3. I
SAMPLING ANALOG SIGNALS 1
The simplest way to discretize an analog signal f is to record its sample values {f (nT)}nEZat intervals T. An approximation of f (t) at any t E R may be recovered by interpolating these samples. The Whittaker sampling theorem gives a sufficient condition on the support of the Fourier transform f to compute f(t) exactly. Aliasing and approximation errors are studied when this condition is not satisfied. More general sampling theorems are studied in Section 3.1.3 from a vector space point of view. 42
3. I
3. I. I
43
SAMPLINGANALOG SIGNALS
W h i t t a k e r Sampling Theorem
A discrete signal may be represented as a sum of Diracs. We associate to any sample f(nT) a Dirac f ( n T ) 3 ( t - nT) located at t - - nT. A uniform sampling of f thus corresponds to the weighted Dirac sum +~
f d(t) -- ~
(3.1)
f ( n T ) 6 ( t - nT).
n----oo
The Fourier transform of 6(t - nT) is e -inT~ Fourier series" +ec
]fd(aJ)- Z
so
the Fourier transform of f d is a (3.2)
f(nT)e-i"T~"
n--- --(3(3
To understand how to compute f(t) from the sample values f(nT) and hence f from fd, we relate their Fourier transforms f and fd. Proposition 3.1 The Fourier transform of the discrete signal obtained by sampling
f at intervals T is 1 +~ ( 2kTr) jCd@t3)- T Z 3c ~ _ T "
(3.3)
k~-oo
Proof 1.
Since
6 ( t - nT) is zero outside t -- nT,
f (nT) 6(t - nT) -- f (t) 6(t - nT), so we can rewrite (3.1) as multiplication with a Dirac comb: +~
fd(t) = f(t) Z
6(t-nT) -- f(t)c(t).
(3.4)
n-----oo
Computing the Fourier transform yields
~(~) -
1
~ ~.~(~).
(3.5)
The Poisson formula (2.4) proves that ?(~u)=T
~ ~-~
"
(3.6)
k---oo
Since f*~(~u - ~) - )~(~u- ~), inserting (3.6) in (3.5) proves (3.3).
II
Proposition 3.1 proves that sampling f at intervals T is equivalent to making its Fourier transform 27r/T periodic by summing all its translations f ( ~ - 2kTr/T). The resulting sampling theorem was first proved by Whittaker [349] in 1935 in a book on interpolation theory. Shannon rediscovered it in 1949 for applications to communication theory [306].
44
CHAPTER III
DISCRETE REVOLUTION
Theorem3.1 (SHANNON,WHITTAKER)If the support of f
is included in
then f (t) -- ~
f (nT) hr(t - nT),
(3.7)
n=-c~
with hr(t)-
(3.8)
sin(Trt/T).
7rt/T
Proof 1. If n 7~ 0, the support of f(w - mr~T) does not intersect the support of jr(w) because f(w) - 0 for IwI > ~/T. So (3.3) implies fd(w) = )~(w) if IwI < -~. T
-T
(3.9)
The Fourier transform of hT is hT -- T I[-,/T,~/T]. Since the support of A? is in [-Tr/T, Tr/T] it results from (3.9) that j~(w)--hr(w)fd(w). The inverse Fourier transform of this equality gives +~
f(t) -- hT* f d(t)
= hr* ~
f(nT)(5(t-nT)
nm--cx3 +er
=
~
f(nT)hr(t- nT).
n---oo
The sampling theorem imposes that the support of f is included in [-Tr/T, 7r/T], which guarantees that f has no brutal variations between consecutive samples, and can thus be recovered with a smooth interpolation. Section 3.1.3 shows that one can impose other smoothness conditions to recover f from its samples. Figure 3.1 illustrates the different steps of a sampling and reconstruction from samples, in both the time and Fourier domains.
3.1.2 Aliasing The sampling interval T is often imposed by computation or storage constraints and the support of j~ is generally not included in [-Tr/T, 7r/T]. In this case the interpolation formula (3.7) does not recover f . We analyze the resulting error and a filtering procedure to reduce it. Proposition 3.1 proves that 1 +~
(2~__~)
(3.10)
k----~
Suppose that the support of f goes beyond [-Tr/T, 7r/T]. In general the support of f(w - 2kTr/T) intersects [-Tr/T, 7r/T] for several k # 0, as shown in Figure
3. I
SAMPLING A N A L O G SIGNALS
45
f(t)
, i
(a)
T
A
/~t
T
fa(c~
(b)
-3~
T
(c)
-rt T
-7I T
fd(t)
rc -~
II T, TT,
3~
,~t~
A
A
7~ T
O~
-3T
-T
A
I/
I \1
T
T
--/1:
L/ W"xlv
T
~"~- t
3T
fd * hT(t)
d(O) hT(O)
(d)
T ~t
T
>CO
/I;
FIGURE 3. I (a): Signal f and its Fourier transform f . (b)" A uniform sampling of f makes its Fourier transform periodic. (c): Ideal low-pass filter. (d): The filtering of (b) with (c) recovers f . 3.2. This folding of high frequency components over a low frequency interval is called aliasing. In the presence of aliasing, the interpolated signal ---~oo
hT* f d(t) -- ~
f(nT)hT(t-nr)
n---c~3
has a Fourier transform
k---c~
(3.11) which may be completely different from f(co) over [-Tr/T, 7r/T]. The signal hr * fd may not even be a good approximation of f , as shown by Figure 3.2.
Example 3.1 Let us consider a high frequency oscillation
f (t) -- cos(co0t) --
e ic~ + e -ic~
4~
CHAPTER III
DISCRETE REVOLUTION
T f(t)
IAA
(a)
L_~ VVL./ T
A
T
---t
fd(t)
(b)
I
-3!
T
! - "I x
-n
T
!- / I x - I
~
T
!~- (0
.ITT
3_._x_~
T
1'7 h(t)
(c) T
T
T
T
-3~ ~-~ f ~
~
(d)
FIGURE 3.2 (a): Signal f and its Fourier transform 3?. (b): Aliasing produced by an overlapping of f(c~ - 2kTr/T) for different k, shown in dashed lines. (c): Ideal low-pass filter. (d): The filtering of (b) with (c) creates a low-frequency signal that is different from f. Its Fourier transform is
f(~)- 7r(d(~- ~o)+ d(w+~o)). If 27r/T > ~o > 7r/T then (3.11) yields
+~ (
2kTr
k---c~
~- +~o)+~(~+ T - ~ o ) , SO
2kTr
47
SAMPLINGANALOG SIGNALS
3. I
The aliasing reduces the high frequency coo to a lower frequency 2 7 r / T - coo E [ - u / T , 7r/T]. The same frequency folding is observed in a film that samples a fast moving object without enough images per second. A wheel turning rapidly appears as turning much more slowly in the film.
Removal of Aliasing To apply the sampling theorem, f is approximated by the closest signal f whose Fourier transform has a support in [-Tr/T, 7r/T]. The Plancherel formula (2.26) proves that 1 L nt-~176
=
2-7
-
27r
1
-
O0
A
If(co) - f(co)] 2 dco
L I>~/r
[f(a~) 12d.~ +
If(~) - / ( ~ ) [2d~.
'L I__~/r
~
This distance is minimum when the second integral is zero and hence
f (co) -- f (a~) l[_~/r,~/r](aJ) -- ~ hr(aJ) je(a~). It corresponds to f -
(3.12)
T1 f * hr. The filtering of f by hr avoids the aliasing by A
removing any frequency larger than 7r/T. Since f has a support in [-Tr/T, Tr/T], the sampling theorem proves that f(t) can be recovered from the samples f ( n T ) . An analog to digital converter is therefore composed of a filter that limits the frequency band to [-Tr/T, 7r/T], followed by a uniform sampling at intervals T. 3.1.3
General Sampling Theorems
The sampling theorem gives a sufficient condition for reconstructing a signal from its samples, but other sufficient conditions can be established for different interpolation schemes [335]. To explain this new point of view, the Whittaker sampling theorem is interpreted in more abstract terms, as a signal decomposition in an orthogonal basis. Proposition 3.2 Ifhr(t) -- sin(Trt/T)/(Trt/T) then {hr(t-- nT) }nEZ is an orthogonal basis of the space UT of functions whose Fourier transforms have a support included in [- 7r/T, 7r/T]. If f E UT then
1
f (nT) -- ~ ( f (t),hr(t -- nT)).
(3.13)
Proof z. Since ~tr - T l[-~/v,~/r] the Parseval formula (2.25) proves that (hr(t-nT),hv(t-pT))
=
1 f + ~~ T2l[_~/r,~/r](co) exp[--i(n--p)Tco]dco 27r
=
T 2 fTr/T exp[-i(n - p)TaJ] dw - T a[n - p]. 27r j-Tr/r
48
CHAPTER III
DISCRETE REVOLUTION
The family {hr(t -- nT) },,~z is therefore orthogonal. Clearly hr(t- nT) E UT and (3.7) proves that any f E UT can be decomposed as a linear combination of {hr(t -- nT) }nez. It is therefore an orthogonal basis of UT. Equation (3.13) is also proved with the Parseval formula l
(f(t),hr(t-nT)) = ~ Since the support of f is in
f(w)hr(w)
exp(inT~)d~o.
[-Tr/T, 7r/T] and hr = T l[-./T,~/r], T /-~/r ^
(f(t),hr(t-nT)) = ~ J_~/rf(W ) exp(inTw)dw = T f(nT). II Proposition 3.2 shows that the interpolation formula (3.7) can be interpreted as a decomposition of f CUT in an orthogonal basis of UT" 1 +~
f(t) = -~ E
(f(u),hT(u-- nT)) hr(t-- nT).
(3.14)
n---co
If f ~ UT, which means that f has a support not included in [-Tr/T, 7r/T], the removal of aliasing is computed by finding the function f E UT that minimizes [[)' - fll- Proposition A.2 proves that )~ is the orthogonal projection PUTfof f in UT. The Whittaker sampling theorem is generalized by defining other spaces UT such that any f E UT can be recovered by interpolating its samples {f(nT)}n~z. A signal f ~ UT is approximated by its orthogonal projection f - PUTf in UT, which is characterized by a uniform sampling {f(nT)}nzz. Block Sampler A block sampler approximates signals with piecewise constant functions. The approximation space UT is the set of all functions that are constant on intervals [nT, (n + 1)T), for any n E Z. Let hr = I[0,T). The family {hT(t- nT)},,~z is clearly an orthogonal basis of UT. Any f E UT can be written +~
f (t) -- E
f (nT) hT(t -- nT).
n----co
If f ~ UT then (A. 17) shows that its orthogonal projection on UT is calculated with a partial decomposition in an orthogonal basis of UT. Since IIhT(t -- nZ)II = - T , 1 +~
Pu~f(t) = ~ ~
n---co
Let hT(t) =
hr(--t). Then (f(u),hr(u-nT)) =
f
tinT
(n+l)T
f ( t ) d t = f .hT(nT).
(3.15)
3.2 DISCRETETIME-INVARIANT FILTERS
49
This averaging of f over intervals of size T is equivalent to the aliasing removal used for the Whittaker sampling theorem.
Approximation Space The space UT should be chosen so that PuTf gives an accurate approximation of f , for a given class of signals. The Whittaker interpolation approximates signals by restricting their Fourier transform to a low frequency interval. It is particularly effective for smooth signals whose Fourier transform have an energy concentrated at low frequencies. It is also well adapted to sound recordings, which are well approximated by lower frequency harmonics. For discontinuous signals such as images, a low-frequency restriction produces the Gibbs oscillations studied in Section 2.3.3. The visual quality of the image is degraded by these oscillations, which have a total variation (2.65) that is infinite. A piecewise constant approximation has the advantage of creating no spurious oscillations, and one can prove that the projection in UT decreases the total variation: IIeu~fllv <_ Ilfllv. In domains where f is a regular function, the piecewise constant approximation PUTf may however be significantly improved. More precise approximations are obtained with spaces UT of higher order polynomial splines. These approximations can introduce small Gibbs oscillations, but these oscillations have a finite total variation. Section 7.6.1 studies the construction of interpolation bases used to recover signals from their samples, when the signals belong to spaces of polynomial splines and other spaces UT. 3.2 3.2. I
DISCRETE TIME-INVARIANT FILTERS 1 Impulse Response and Transfer Function
Classical discrete signal processing algorithms are mostly based on time-invariant linear operators [55, 58]. The time-invariance is limited to translations on the sampling grid. To simplify notation, the sampling interval is normalized T = 1, and we denote fin] the sample values. A linear discrete operator L is time-invariant if an input f[n] delayed by p E Z, fp[n] -- f [ n - p], produces an output also delayed by p:
L f p [n] = L f In - p] .
Impulse Response We denote by 6[n] the discrete Dirac 1 0
6[n] =
ifn=O if n # 0 "
Any signal fin] can be decomposed as a sum of shifted Diracs -~CX3
f[n]=
~ p---oo
f[p]6[n-p].
(3.16)
50
CHAPTERIII DISCRETEREVOLUTION
Let L~[n]- h[n] be the discrete impulse response. invariance implies that
The linearity and time-
-Jr-o(3
Lf[n] -- Z
f[P] h[n - p] - f ,h[n].
(3.17)
p=-oo
A discrete linear time-invariant operator is thus computed with a discrete convolution. If h[n] has a finite support the sum (3.17) is calculated with a finite number of operations. These are called Finite Impulse Response (FIR) filters. Convolutions with infinite impulse response filters may also be calculated with a finite number of operations if they can be rewritten with a recursive equation (3.29). Causality and Stability A discrete filter L is causal if Lf[p] depends only on the values of f[n] for n < p. The convolution formula (3.17) implies that h[n] -- 0 if n<0. The filter is stable if any bounded input signal f[n] produces a bounded output signal Lf[n]. Since
Itf[n][ <_suplf[n]l nEZ
~ Ih[k]l,
k---c~
nt-oo
it is sufficient t h a t ~ - ' ~ n = - c ~ Ih[n]l < +c~, which means that h E II(z). One can verify that this sufficient condition is also necessary. The impulse response h is thus stable if h E I1(Z). Transfer Function The Fourier transform plays a fundamental role in analyzing discrete time-invariant operators, because the discrete sinusoidal waves e~[n] e iam a r e eigenvectors"
Le~[n] -
Z
ei~(n=P)hip] - e i~n Z
p=-c~
h[p]e -i~p
(3.18)
p=-oe
The eigenvalue is a Fourier series --~-(x3
kt(~)-- Z
h[p]e-i~P"
p=-cc
It is the filter transfer function. Example 3.2 The uniform discrete average 1
n+N
L f [n] -- 2N + 1 ~ p=n-N
f [p]
(3.19)
3.2
DISCRETETIME-INVARIANT FILTERS
51
is a time-invariant discrete filter whose impulse response is h - (2N + 1 )-1 I[-N,N]. Its transfer function is 1
+N
~t(co) - 2N + 1 Z
e-inc~
1 8in(N + 1/2)co 2N + 1 sinco/2
=
n---N
3.2.2
(3.20)
Fourier Series
The properties of Fourier series are essentially the same as the properties of the Fourier transform since Fourier series are particular instances of Fourier transforms for Dirac sums. If f(t) - ~+~_~ f[n] ~5(t- n) then f(co) -- ~-~n=-~+~f[n] e -i~n. For any n E Z, e -iwn has period 27r, so Fourier series have period 27r. An important issue is to understand whether all functions with period 27r can be written as Fourier series. Such functions are characterized by their restriction to [-Tr, 7r]. We therefore consider functions a E L2[-Tr, Tr] that are square integrable over [-rr, rr]. The space L2[-Tr, 7t-] is a Hilbert space with the inner product (a,b)-
~1
~
a( o)b* (co) daa
(3.21)
and the resulting norm [[&l]2 -
1 ~_~
la( o)
2
71"
The following theorem proves that any function in L2[-rr, rr] can be written as a Fourier series. T h e o r e m 3.2 The family of functions {e-ik~}k~Z is an orthonormal basis of
L2[-~,~].
Proof 2. The orthogonality with respect to the inner product (3.21) is established with a direct integration. To prove that {exp(-ik~o) }keZ is a basis, we must show that linear expansions of these vectors are dense in L2[-Tr, 7r]. We first prove that any continuously differentiable function ~ with a support included in [-Tr, 7r] satisfies +~
qS(co)- Z
(qS({),exp(-ik{))exp(-ikco),
(3.22)
k~_ - o o
with a pointwise convergence for any co C [-Tr, 7r]. Let us compute the partial sum N
SN(CO) --
Z
(~5(~),exp(-ik~)} exp(-ikco)
k-- -N
Nlf
Z
~(~) exp(ik~)d~ exp(-ikco)
~
k-- -N
7r N
1 27r
~b({) ~ 7r
k-- -N
exp[ik({ - co)] d{.
52
CHAPTER III
DISCRETE REVOLUTION
The Poisson formula (2.37) proves the distribution equality
N
+~
lim Z exp[ik({-w)] = 2rr Z a ( { - c o - 2rrk), N-++oc k=-N k=-~o and since the support of ~ is in [-rr, rr] we get lim SN(W)= ~(w). N~-+-oo Since 0 is continuously differentiable, following the steps (2.38-2.40) in the proof of ^ the Poisson formula shows that SN(w) converges uniformly to qS(w) on [-Tr, 7r]. To prove that linear expansions of sinusoidal waves {exp(-ikw)}keZ are dense in L2[-rr, rr], let us verify that the distance between a E L2[-rr, rr] and such a linear expansion is less than e, for any e > 0. Continuously differentiable functions with a support included in [-rr, rr] are dense in L2[-rr, rr], hence there exists ~ such that Ila- ~11 _< ~/2. The uniform pointwise convergence proves that there exists N for which sup IsuGo)- ~(~)1 < -~ ~oe[-~,~] - 2' which implies that Ilau - ~112 = ~
1 /'~ l&(~o)
~2
- ~(~0)12 d~o <
--.
- 4
It follows that a is approximated by the Fourier series &v with an error
Ila- &,ll _< Ila- r + I1~- sNII _< ~.
Theorem 3.2 proves that if f E Iz(z), the Fourier series -qt- (X)
f(co)- Z
f[n]e-iwn
(3.23)
n=-cx) can be interpreted as the decomposition of f C L2 [-rr, 7r] in an orthonormal basis. The Fourier series coefficients can thus be written as inner products
f[n]-
()e(6o),e -iwn) -- 1 /rr
f (~) eiwn dcO"
(3.24)
7r
The energy conservation of orthonormal bases (A. 10) yields a Plancherel identity:
Z+ ~ If[n]]2--IifiI2- ~1 n-- --oo
f~ "/I"
Ije(co)12dco.
(3.25)
3.7. DISCRETETIIVlE-INVARIANTFILTERS
53
Pointwise Convergence The equality (3.23) is meant in the sense of mean-square convergence N
lim
N~-t-oc
]f (w) - ~--~ f [k] e-i~k
-- 0.
k=-N
It does not imply a pointwise convergence at all w E R. In 1873, Dubois-Reymond constructed a periodic function f(w) that is continuous and whose Fourier series diverges at some points. On the other hand, if f (w) is continuously differentiable, then the proof of Theorem 3.2 shows that its Fourier series converges uniformly to ~(w) on [-Tr, 7r]. It was only in 1966 that Carleson [114] was able to prove that if f E LZ[-Tr, 7r] then its Fourier series converges almost everywhere. The proof is however extremely technical. Convolutions Since {e -ic~ are eigenvectors of discrete convolution operators, we also have a discrete convolution theorem.
Theorem 3.3 If f E 11(Z) and h E I1(Z) then g = f * h E 11(Z) and ~(w) - f(w)h(w).
(3.26)
The proof is identical to the proof of the convolution Theorem 2.2, if we replace integrals by discrete sums. The reconstruction formula (3.24) shows that a filtered signal can be written f ~ h[n] - ~
h(w) f (~) ei~n dw.
(3.27)
7r
The transfer function h(w) amplifies or attenuates the frequency components f (w) off[n]. Example 3.3 An ideal discrete low-passfilter has a 27r periodic transfer function defined by ~t(w) - 1[_~,~](w), for w E [-Tr, 7r] and 0 < ( < 7r. Its impulse response is computed with (3.24)" h[n] - ~
e iwn dw =
sin~n 71-n
(3.28)
It is a uniform sampling of the ideal analog low-pass filter (2.29). Example 3.4 A recursivefilter computes g - L f which is solution of a recursive equation K
M
ak f [n -- k] -- ~ k---0
bk g[n - k],
(3.29)
k--0
with b0 ~ 0. If gin] - 0 and fin] - 0 for n < 0 then g has a linear and time-invariant dependency upon f, and can thus be written g - f * h. The transfer function is
54
CHAPTER III
DISCRETE REVOLUTION
obtained by computing the Fourier transform of (3.29). The Fourier transform of
f k[n] - f [ n - k ] is f k(w) -- f ( w ) e -ik~ so
~1(03)- g((a3)_~ f (60)
_
_
K ak e_ikw
~-~k=0
M e_ik ~ ~k=obk
It is a rational function of e -i•. If bk ~ 0 for some k > 0 then one can verify that the impulse response h has an infinite support. The stability of such filters is studied in Problem 3.8. A direct calculation of the convolution sum g[n] -- f , h[n] would require an infinite number of operation whereas (3.29) computes g[n] with K + M additions and multiplications from its past values. Window Multiplication An infinite impulse response filter h such as the ideal lowpass filter (3.28) may be approximated by a finite response filter h by multiplying h with a window g of finite support: h[n] - g[n] h[n]. One can verify that a multiplication in time is equivalent to a convolution in the frequency domain:
h(~) - ~
r
/,(~)/~(~- ~) d~ -
! / , *~(w). 27r
(3.30)
Clearly h - h only if ~ - 27r~, which would imply that g has an infinite support and g[n] - 1. The approximation h is close to h only if ~ approximates a Dirac, which means that all its energy is concentrated at low frequencies. In time, g should therefore have smooth variations. The rectangular window g - I[-N,N] has a Fourier transform ~ computed in A
(3.20). It has impo~ant side lobes far away from w - 0. The resulting h is a poor approximation of h. The Hanning window 71-n
g [ n ] - co82 (~--~)I[-N,N][n] is smoother and thus has a Fourier transform better concentrated at low frequencies. The spectral properties of other windows are studied in Section 4.2.2. 3.3
FINITE SIGNALS 1
Up to now, we have considered discrete signals f[n] defined for all n E Z. In practice, fin] is known over a finite domain, say 0 < n < N. Convolutions must therefore be modified to take into account the border effects at n - 0 and n - N - 1. The Fourier transform must also be redefined over finite sequences for numerical computations. The fast Fourier transform algorithm is explained as well as its application to fast convolutions.
3.3 FINITESIGNALS
3.3. I
55
Circular Convolutions
Let j? and/t be signals of N samples. To compute the convolution product -nt- o o
* h[n] -
Z
f[P]/~[n - p] for 0 < n < N,
p----ec
we must know fin] and f~[n] beyond 0 _< n < N. One approach is to extend ) and /t with a periodization over N samples, and define
f[n] - 3r[nmodN] , h[n] - /t[nmodN]. The circular convolution of two such signals, both with period N, is defined as a sum over their period: N-1
N-1
f | h[n] - Z f[P] h[n - p] - Z fin - p] h[p]. p=0
p=0
It is also a signal of period N. The eigenvectors of a circular convolution operator
L f [n] - f | h [n] are the discrete complex exponentials ek[n] -- exp (i2rrkn/N). Indeed
Lek[n] -- exp
i2rrkn ) N
N-1
Z h[p] exp
(-i27rkp) N
'
p=0
and the eigenvalue is the discrete Fourier transform of h:
h[k]- Z
h[p] exp
N
"
p=O
3.3.2
Discrete Fourier Transform
The space of signals of period N is an Euclidean space of dimension N and the inner product of two such signals f and g is N-1
(f, g> -
g*
(3.31)
n--0
The following theorem proves that any signal with period N can be decomposed as a sum of discrete sinusoidal waves.
5~
CHAPTER III DISCRETEREVOLUTION
Theorem 3.4
Thefamily ek [n] -- exp ( i27rkn
is an orthogonal basis of the space of signals of period N. Since the space is of dimension N, any orthogonal family of N vectors is an orthogonal basis. To prove this theorem it is therefore sufficient to verify that {ek}o<_k
f =Z
(f, ek)
(3.32)
Ile ll
By definition, the discrete Fourier transform (DFT) of f is N-1
3elk] - (f, ek) = Z f[n] exp n=O Since [[ek[[2
.__ N,
(-i27rkn) N
(3.33)
(3.32) gives an inverse discrete Fourier formula:
1 -~ ~
N-1
f[n]-
j~[k] exp
(i2 N n)
"
(3.34)
k--O
The orthogonality of the basis also implies a Plancherel formula N-1
N-1
If In] ]2 - ~I f Y~ [k]l
Ilfll 2 - ~ n=0
12.
(3.35)
k=0
The discrete Fourier transform of a signal f of period N is computed from its values for 0 < n < N. Then why is it important to consider it a periodic signal with period N rather than a finite signal of N samples? The answer lies in the interpretation of the Fourier coefficients. The discrete Fourier sum (3.34) defines a signal of period N for which the samples f[0] and f [ N - 1] are side by side. If f[0] and f[N - 1] are very different, this produces a brutal transition in the periodic signal, creating relatively high amplitude Fourier coefficients at high frequencies. For example, Figure 3.3 shows that the "smooth" ramp fin] - n for 0 < n < N has sharp transitions at n - 0 and n = N once made periodic. Since {exp (i27rkn/N) }O<_k
Theorem 3.5
g-- f |
is
If f and h have period N then the discrete Fourier transform of ~[k] - f[k] h[k].
(3.36)
3.3 FINITESIGNALS
57
TTT .,TTTTTI.,,TT -1
FIGURE 3.3
0 1
N-1 N
Signal fin] - n for 0 < n < N made periodic over N samples.
The proof is similar to the proof of the two previous convolution Theorems 2.2 and 3.3. This theorem shows that a circular convolution can be interpreted as a discrete frequency filtering. It also opens the door to fast computations of convolutions using the fast Fourier transform. 3.3.3
Fast Fourier Transform
For a signal f of N points, a direct calculation of the N discrete Fourier sums f[k]-
(3.37)
U-~ f[n] exp (_i27rkn) , forO
requires N 2 complex multiplications and additions. The fast Fourier transform (FFT) algorithm reduces the numerical complexity to O(N log2 N) by reorganizing the calculations. When the frequency index is even, we group the terms n and n + N/2: N/2-1 .
f[2k]- Z
(f[n] + f[n + N/2])exp
(-i27rkn
.
(3.38)
n=O
When the frequency index is odd, the same grouping becomes f[2k + 1] -
N/2-1
Z
exp
(-i27rn) (
N
) (-i27rkn) f[n] - f[n +N/2] exp N/2 "
n=O
(3.39)
Equation (3.38) proves that even frequencies are obtained by calculating the discrete Fourier transform of the N/2 periodic signal
fe[n] = f[n] + f[n + N/2]. Odd frequencies are derived from (3.39) by computing the Fourier transform of the N/2 periodic signal
To[n] - exp ( - i 2U7 r n ) ( f [ n ] - f [ n + N / 2 ] ) . A discrete Fourier transform of size N may thus be calculated with two discrete Fourier transforms of size N/2 plus O(N) operations.
58
CHAPTERIII DISCRETEREVOLUTION
The inverse fast Fourier transform of f is derived from the forward fast Fourier transform of its complex conjugate f* by observing that N-1
f* [ n ] - ~ Z
[k] exp
N
k--0
(3.40)
Complexity Let C (N) be the number of elementary operations needed to compute a discrete Fourier transform with the FFT. Since f is complex, the calculation of f e and f o requires N complex additions and N / 2 complex multiplications. Let K N be the corresponding number of elementary operations. We have C(N)-2C(N/2)+KN.
(3.41)
Since the Fourier transform of a single point is equal to itself, C(1) - 0. With the change of variable 1 - log 2N and the change of function T(l) - --W-, c(s) we derive from (3.41) that T(I) - T ( I - 1 ) + K. Since T(0) -- 0 we get T(I) - K l and hence C ( N ) - K N logz(N ).
There exist several variations of this fast algorithm [ 177, 51]. The goal is to minimize the constant K. The most efficient fast discrete Fourier transform to this date is the split-radix FFT algorithm, which is slightly more complicated than the procedure just described, but which requires only N log 2N real multiplications and 3Nlog2 N additions. When the input signal f is real, there are half as many parameters to compute, since f [ - k ] - f* [k]. The number of multiplications and additions is thus reduced by 2.
3.3.4
Fast Convolutions
The low computational complexity of a fast Fourier transform makes it efficient to compute finite discrete convolutions by using the circular convolution Theorem 3.5. Let f and h be two signals whose samples are non-zero only for 0 < n < M. The causal signal g[n] - f , h[n] -
Z
f[k] h[n - k]
(3.42)
k=-c~
is non-zero only for 0 < n < 2M. If h and f have M non-zero samples, calculating this convolution product with the sum (3.42) requires M ( M + 1) multiplications and additions. When M _> 32, the number of computations is reduced by using the fast Fourier transform [11, 51]. To use the fast Fourier transform with the circular convolution Theorem 3.5, the non-circular convolution (3.42) is written as a circular convolution. We define
3.4
DISCRETEIMAGE PROCESSING
59
two signals of period 2M" fin]
if0
a[n]
-
0
b[n]
-
h[n] i f 0 < _ n < M 0 ifm_
(3.43) (3.44)
Let c - a | b, one can verify that c[n]- g[n] for 0 <_ n < 2M. The 2M nonzero coefficients of g are thus obtained by computing a and/~ from a and b and then calculating the inverse discrete Fourier transform of b - a/9. With the fast Fourier transform algorithm, this requires a total of O(Mlog2 M) additions and multiplications instead ofM (M + 1). A single FFT or inverse FFT of a real signal of size N is calculated with 2-1N log 2N multiplications, using a split-radix algorithm. The FFT convolution is thus performed with a total of 3M log 2M + 11M real multiplications. For M >_ 32 the FFT algorithm is faster than the direct convolution approach. For M < 16, it is faster to use a direct convolution sum. Fast Overlap-Add Convolutions The convolution of a signal f of L non-zero samples with a smaller causal signal h of M samples is calculated with an overlap-add procedure that is faster than the previous algorithm. The signal f is decomposed with a sum of L/M blocks f r having M non-zero samples:
L/M-1
f[n] -- ~
f r [ n - rM] with fr[n] - f[n + rM] I[0,M_I] [n].
(3.45)
r--0
For each 0 <_r < L/M, the 2M non-zero samples of gr - - f r ~ h are computed with the FFT based convolution algorithm, which requires O(Mlog 2M) operations. These L/M convolutions are thus obtained with O(Llog2M ) operations. The block decomposition (3.45) implies that L/M-1
f ,h[n]-- Z
gr[n-rM].
(3.46)
r---0
The addition of these L/M translated signals of size 2M is done with 2L additions. The overall convolution is thus performed with O(L log 2M) operations. 3.4
DISCRETE IMAGE PROCESSING ~
Two-dimensional signal processing poses many specific geometrical and topological problems that do not exist in one dimension [23; 34]. For example, a simple concept such as causality is not well defined in two dimensions. We avoid the complexity introduced by the second dimension by extending one-dimensional algorithms with a separable approach. This not only simplifies the mathematics but also leads to faster numerical algorithms along the rows and columns of images. Appendix A.5 reviews the properties of tensor products for separable calculations.
~0
CHAPTER III DISCRETEREVOLUTION
3.4. I
Two-Dimensional Sampling Theorem
The light intensity measured by a camera is generally sampled over a rectangular array of picture elements, calledpixels. The one-dimensional sampling theorem is extended to this two-dimensional sampling array. Other two-dimensional sampling grids such as hexagonal grids are also possible, but non-rectangular sampling arrays are hardly ever used. We avoid studying them following our separable extension principle. Let 7'1 and T2 be the sampling intervals along the xl and x2 axes of an infinite rectangular sampling grid. A discrete image obtained by sampling f(xl,x2) can be represented as a sum of Diracs located at the grid points:
f d(Xl,X2) -- Z
f(nlTl,n2T2)~(xl-nlT1)~(x2-n2T2).
nl ,n2--0<~
The two-dimensional Fourier transform of
~(Xl-nlT1)~(x2-n2T2)
is
exp[-i(nlTl~l-q-n2T2~2)].
The Fourier transform of fd is thus a two-dimensional Fourier series AV(X3
fd(COl'C02)-
Z
f(nlTl'n2T2)exp[-i(nlTlC~ at-n2T2c~
(3.47)
nl ,n2----o~3
It has period 27r/T1 along ~1 and period 27riTz along &2. An extension of Proposition 3.1 relates fd to the two-dimensional Fourier transform 37 of f.
Proposition 3.3 The Fourier transform of the discrete image obtained by sampling f at intervals T1 and T2 along Xl and x2 is +~
(
2klTr
2k27r)
Z f ~1-- T1 ,032- T2 jFd(a;1,&2) -- T11T2 kl,k2=-c~
.
(3.48)
We derive the following two-dimensional sampling theorem, which is analogous to Theorem 3.1.
Theorem 3.6 If f has a support included in [-TrlT1, 7rlT1] • [-TriTe, 7riTe] then -lt-oo
f(xl,x2)--
Z
f(nlTl'nzTz)hTl(Xl-nlT1)hT2(xz-nzT2)'
(3.49)
nl ,n2 ----cx~
where hT(t) --
sin(Trt/T) 7rt/T
(3.50)
3.4 DISCRETEIMAGE PROCESSING
6 1
Aliasing If the support of f is not included in the low-frequency rectangle [-Tr/T1,7r/T1] x [-Tr/T2,7r/T2], the interpolation formula (3.49) introduces aliasing errors. This aliasing is eliminated by prefiltering f with the ideal low-pass separable filter hrl (xl)hr2(xe)/(T1T2) whose Fourier transform is the indicator function of [-Tr/T1, 7r/T1] x [-Tr/T2, 7r/T2].
3.4.2
Discrete Image Filtering
The properties of two-dimensional space-invariant operators are essentially the same as in one dimension. The sampling intervals T1 and T2 are normalized to 1. A pixel value located at (nl,n2) is written f[nl,n2]. A linear operator L is space-invariant if for any fpl,p2[nl,n2] -- f[nl -- pl,n2 -- P2], with (Pl, P2) E Z 2,
L f pl,m[nl,n2 ] - Lf[nl - pl,n2 - P2]. ImpulseResponse Since an image can be decomposed as a sum of discrete Diracs: f[nl,n2] -
Z
f[Pl, P2] ~[nl - Pl] ~[n2 - P2],
Pl ~p2-----O~
the linearity and time invariance implies +ec
Lf[nl,n2]-
Z
f[pl,P2]h[nl-pl,n2-P2]-- f *h[nl,n2],
(3.51)
P l ~P2 = - c : ~
where h[nl,n2] is the response of the impulse ~0,0[Pl, P2] -- ~[Pl]3[P2]:
h[nl,n2] = L~o,o[nl,n2]. If the impulse response is separable:
h[nl,n2] -- hi [nil h2[n2],
(3.52)
the two-dimensional convolution (3.51) is computed as one-dimensional convolutions along the columns of the image followed by one-dimensional convolutions along the rows (or vice-versa): +co
f*h[nl,n2]-
Z p l ----cx~
+ec
hl[nl-Pl]
Z
h2[n2-P2]f[pl,P2].
(3.53)
p2 = - - o o
This factorization reduces the number of operations. average over squares of (2M + 1)2 pixels: M
For example, a moving
M
Z pz=-M Z f[nl-pl,ne-Pel Lf[nl,n2] - (2M 1-t- 1) 2 p,=-M
(3.54)
is a separable convolution with hi - he - (2M + 1)-11[-M,M]. A direct calculation with (3.54) requires (2M + 1)a additions per pixel whereas the factorization (3.53) performs this calculation with 2(2M + 1) additions per point.
62
CHAPTER III DISCRETEREVOLUTION
Transfer Function
The Fourier transform of a discrete image f is defined by the
Fourier series
f(r
q-c~ +cx~ Z Z f[nl,n2] exp[--i(colnl-+-c02n2)1. n 1:--oK)
(3.55)
n2----oo
The two-dimensional extension of the convolution Theorem 3.3 proves that if g - L f = f , h then its Fourier transform is
~(0.11,~2 ) -- je(a)l,C02) ]'/(a)l,(.d2), and ~t is the transfer function of the filter. When a filter is separable h[nl,n2] hi [nl] hz[n2], its transfer function is also separable:
~/((a31,~d2)- /-/1(031) ]-/2@02)" 3.4.3
(3.56)
Circular Convolutions and Fourier Basis
The discrete convolution of a finite image f raises border problems. As in one dimension, these border issues are solved by extending the image, making it periodic along its rows and columns:
f[nl,n2] - f[nl modN,n2 modN]. The resulting image f[nl,n2] is defined for all (nl,n2) E Z 2, and each of its rows and columns is a one-dimensional signal of period N. A discrete convolution is replaced by a circular convolution over the image period. If f and h have period N along their rows and columns, then
N-1 f ~) h[nl,n2] -- Z
f[Pl, P2] h[nl - pl,n2 - P2].
(3.57)
pl,p2=O Discrete Fourier Transform The eigenvectors of circular convolutions are twodimensional discrete sinusoidal waves:
%,k2 [nl ,nz] - exp
-i27r - ~ (kl n 1 + k2n2))
This family of N 2 discrete vectors is the separable product of two one-dimensional discrete Fourier bases {exp (i27rkn/U)}0
ekl,k2[nl,n2] - - e x p \
N (klnl +kzn2)
0<~I,~2
is an orthogonal basis of the space of images that are periodic with period N along their rows and columns. Any discrete periodic image f can be decomposed in this
3.4
63
DISCRETEIMAGE PROCESSING
orthogonal basis:
f[nl,n2]-
(i2 +,2n2,)
~-~ kl,k2__0
(3.58)
where )~ is the two-dimensional discrete Fourier transform of f f[kl,k2]-
(f , ekl,k2} - N-1 Z f[nl,n2]
exp
(_i27r (kln1+k2n2)) " N
(3.59)
nl ~n2---0
Fast Convolutions Since exp( ---y-i27r ( k 1l'/ 1 -t- k2n2)) are eigenvectors of two-dimensional circular convolutions, the discrete Fourier transform of g - f | h is
(3.60)
O(N4),
A direct computation of f | h with the summation (3.57) requires multiplications. With the two-dimensional FFT described next, f[kl,k2] and h[kl,k2] as well as the inverse DFT of their product (3.60) are calculated with O(N 2 logN) operations. Non-circular convolutions are computed with a fast algorithm by reducing them to circular convolutions, with the same approach as in Section 3.3.4.
Separable BasisDecomposition Let {ek }0<__k
(f'e~lek2} --
Z Z f[nl,n2]e*k~[nl]e*kz[n2] nl m~0n2--0 N-1
=
N-1
Z e'k,[n] ZS[nl'n2]e*k2 In2]" nl---0
(3.61)
n2--0
For 0 < n l < N, we must compute N-1
Tf[nl,k2] - Z f[nl'n2]e*k2[n2]' n2--0
which are the decomposition coefficients of the N image rows in the basis {ek2}0_
64
CHAPTER III
DISCRETE REVOLUTION
The fast Fourier transform algorithm of Section 3.3.3 decomposes a signal of size N in the discrete Fourier basis { e k [ n ] - exp(-i27rkn/N)}o
3.5
PROBLEMS 3.1. 1 Suppose that f has a support in [-(n + 1)Tr/T,-mr~T] U [mr~T, (n + 1)Tr/T] and that f(t) is real. Find an interpolation formula that recovers f(t) from
{f(nT)},,ez. 3.2. 2 Suppose that f has a support in [-~r/T, r~/r]. Find a formula that recovers f (t) from the average samples (nq-1/2)T
Vn E Z , ? ( n T ) =
f(t)dt . J(n-1/2)T
3.3. 1 An interpolation function f(t) satisfies f ( n ) = 6[n]. +oo
(a) Prove that y'~t,=_oof(co + 2kTr) = 1 if and only if f is an interpolation function. (b) Suppose that f(t) = y ~ +oo = _ ~ h[n] O(t- n) with 0 E L2(N). Find h(w) so that f(n) = 6[n], and relate f(~o) to 0(~). Give a sufficient condition on to guarantee that f E L2(N). +c~ -- n) E L 2 [0,1] then 3.4. 1 Prove that if f E L2(N) and y~n=_~f(t q-do
d-do
f (t--n) = ~
n:-cx~
~f(2k'/r)e i2~rkt .
k:-~
3.5. 1 Verify that K k=l
is an all-pass filter, i.e. basis of 12(Z). 3.6.
, __ e _ i w
1 + ak e/~~
Ih(~o)l = 1. Prove that {h[n- m]}meZ is an orthonormal
1 Let g[n] = (-- 1) n h[n]. Relate ~(co) to ]z(w). If h is a low-pass filter can ~(cv) be a low-pass filter?
3.7. 1 Prove the convolution Theorem 3.3. 3.8. 2 Recursivefilters (a) Compute the Fourier transform ofh[n] = a" 1[0,+~1 [n] for lal < 1. Compute the inverse Fourier transform of h(~o) = ( 1 - ae-i~) -p. (b) Suppose that g = f , h is calculated by a recursive equation with real coefficients K
M
ak f[n -- k] -- ~ k=0
bk g[n - k]
k=0
Show that h is a stable filter if and only if the equation Y~'M ~k=0bk Z _ k = 0 has roots with a modulus strictly smaller than 1.
3.s PROBLEMS
65
(c) Suppose that Ih(~)l 2 Ie(e-'~)12/ID(e-i~)l 2 where P(z) and D(z) are polynomials. If D(z) has no root of modulus 1, prove that one can find two polynomials Pl(z)and DI(Z)such that h ( ~ ) = Pl(e-i~)/Dl(e -i~) is the Fourier transform of a stable and causal recursive filter. Hint: find the complex roots of D(z) and compute D1 (z) by choosing the appropriate roots. (d) A discrete Butterworth filter with cut-off frequency Wc < 7r satisfies =
I~(~)1 = =
1 + (tan(w/2) tan(wc/2) ) 2N
Compute h(~) for N = 3 in order to obtain a filter h which is real, stable and causal. 3.9. 3.10.
1 Let a and b be two integers with many digits. Relate the product a b to a convolution. Explain how to use the FFT to compute this product. 1 Let h -1 be the inverse of h defined by h,h-l[n] = ~[n]. (a) Prove that if h has a finite support then h -1 has a finite support if and only if h[n] -- ~ [ n - p] for some p E Z. (b) Find a sufficient condition on h(~o) for h -1 to be a stable filter.
3.11.
1 Discrete interpolation Let )C[k] be the DFT of a signal f[n] of size N. We define f[N/2] = f[3N/2]-- f[N/2] and
^ { 2)~[k] ~[~] = 0 2)~[k-N]
if 0 <_ k < N/2 ifU/2
.
if 3N/2 < k < 2N
Prove that f[2n] -- f[n]. 3.12.
' Decimation Let x[n]-- y[Mn] with M > 1. M-1
(a) Show that k(w) -- M -1Y']k=0 Y(M-1 (w - 2kTr)). (b) Give a sufficient condition on )(w) to recover y from x. Describe the interpolation algorithm.
3.13. 1 Complexity of FFT (a) Find an algorithm that multiplies two complex numbers with 3 additions and 3 multiplications. (b) Compute the total number of additions and multiplications of the FFT algorithm described in Section 3.3.3, for a signal of size N. 3.14.
2 We want to compute numerically the Fourier transform of f(t). Let fd[n] = f (nT), and f p[n] = ~_~p=_~ +~ fa[n - pN]. (a) Prove that the DFT of fp[n] is related to the Fourier series of fa[n] and to the Fourier transform of f (t) by 217rT) " l=-~
~
CHAPTERIII DISCRETEREVOLUTION
(b) Suppose that If(t)l and [f(a;)l are negligible when t ~ [-to,to] and a; ~ [-a;o,a~o]. Relate N and T to to and a;o so that one can compute an approximation value of f(a;) at all ~o E I~ by interpolating the samples (fp[k]. Is it possible to compute exactly f(a;) with such an interpolation formula? (c) Let f ( t ) -
(
sin(Trt)/(Trt)
)4
. What is the support of f ? Sample f appro-
priately and compute f with the FFT algorithm of MATLAB. 3.15.
1 Suppose that f[nl,n2] is an image with N 2 non-zero pixels for 0 _< nl,n2 < N. Let h[nl,n2] be a non-separable filter with M 2 non-zero coefficients for 0 <_ nl,n2 < M. Describe an overlap-add algorithm to compute g[nl,n2] -f * h[nl ,n2]. How many operations does it require? For what range of M is it better to compute the convolution with a direct summation?
/V TIME MEETS FREQUENCY
hen we listen to music, we clearly "hear" the time variation of the sound "frequencies." These localized frequency events are not pure tones but packets of close frequencies. The properties of sounds are revealed by transforms that decompose signals over elementary functions that are well concentrated in time and frequency. Windowed Fourier transforms and wavelet transforms are two important classes of local time-frequency decompositions. Measuring the time variations of "instantaneous" frequencies is an important application that illustrates the limitations imposed by the Heisenberg uncertainty.
W
There is no unique definition of time-frequency energy density, which makes this topic difficult. Yet, some order can be established by proving that quadratic time-frequency distributions are obtained by averaging a single quadratic form called the Wigner-Ville distribution. This unified framework gives a more general perspective on windowed Fourier transforms and wavelet transforms. 4.1
TIME-FREQUENCYATOMS 1
A linear time-frequency transform correlates the signal with a family of waveforms that are well concentrated in time and in frequency. These waveforms are called time-frequency atoms. Let us consider a general family of time-frequency atoms {qS~}.~cr, where -~ might be a multi-index parameter. We suppose that qS.yC L2(R) and that II~LI- 1. The corresponding linear time-frequency transform of f C 67
CHAPTERIV TIME MEETSFREQUENCY
68
L2(~) is defined by
Tf('y)-
+c~
f
( f , fb7).
f(t)c~(t)dt(X)
The Parseval formula (2.25) proves that
Tf('y)-
f(t)q~;(t)dt-
?(~) ~ ; ( ~ ) d ~ .
~
O0
(4.1)
(X)
If ~b.y(t) is nearly zero when t is outside a neighborhood of an abscissa u, then (f, q%y)depends only on the values of f in this neighborhood. Similarly, if ~7(~) is negligible for ~ far from ~, then the right integral of (4.1) proves that (f, ~b7) reveals the properties of f in the neighborhood of ~. Example 4.1 A windowed Fourier atom is constructed with a window g translated by u and modulated by the frequency ~:
~7(t) -- g~,u(t) = e i~t g ( t - u).
(4.2)
A wavelet atom is a dilation by s and a translation by u of a mother wavelet ~b: ~(t)
l(t )
- ~s,u(t) - - ~ ~
---T-
(4.3)
Wavelets and windowed Fourier functions have their energy well localized in time, while their Fourier transform is mostly concentrated in a limited frequency band. The properties of the resulting transforms are studied in Sections 4.2 and 4.3. Heisenberg Boxes The slice of information provided by (f, 4~-~) is represented in a time-frequency plane (t,~) by a region whose location and width depends on the time-frequency spread of q~.y. Since
I1~112 -
f
+~
[q~(t)l 2 dt - 1, OO
we interpret 14~(t)[ 2 as a probability distribution centered at u~ -
f
+~
t lcb~(t)le dt.
(4.4)
CO
The spread around u.y is measured by the variance
~2(~) =
f
+c~
( t - u~) = I~(t) I=dt. OO
(4.5)
4.2 WINDOWED FOURIERTRANSFORM
69
The Plancherel formula (2.26) proves that f_+cr i~b~(~)lZd~_
27r1[0~112. The
center frequency of O~ is therefore defined by
~ = ~i f +~ ~ I~(~)12d~,
(4.6)
O0
and its spread around ~.y is
0.2(,.)/) _ ~i f +~176 (CO_ ~,y)2 I~,),(CO)12dco.
(4.7)
(3O
The time-frequency resolution of 0-y is represented in the time-frequency plane (t, co) by a Heisenberg box centered at (u~,~.y), whose width along time is crt('~) and whose width along frequency is cr~ (3,). This is illustrated by Figure 4.1. The Heisenberg uncertainty Theorem 2.5 proves that the area of the rectangle is at least 1/2: 1
at a~o _> ~.
(4.8)
This limits the joint resolution of qS.r in time and frequency. The time-frequency plane must be manipulated carefully because a point (t0,co0) is ill-defined. There is no function that is perfectly well concentrated at a point to and a frequency coo. Only rectangles with area at least 1/2 may correspond to time-frequency atoms. Energy Density Suppose that for any (u,~) there exists a unique atom 0-y(u,O centered at (u,() in the time-frequency plane. The time-frequency box of ~b-y(u,O specifies a neighborhood of (u,~) where the energy of f is measured by
PTf(u,~)-
I(f,0~(u,r
2 --
J•+•
f(t)O;(u,O(t) dt 12
(4.9)
O0
Section 4.5.1 proves that any such energy density is an averaging of the WignerVille distribution, with a kernel that depends on the atoms 0-y. 4.2
WINDOWED
FOURIER TRANSFORM 1
In 1946, Gabor [187] introduced windowed Fourier atoms to measure the "frequency variations" of sounds. A real and symmetric window g(t)--- g ( - t ) is translated by u and modulated by the frequency ~: (4.10)
gu,~(t) = e i{t g(t - u).
It is normalized ]lull = 1 so that Ilgu,~ll = 1 for any (u,{) c IR2. The resulting windowed Fourier transform of f C L 2 (1R) is
Sf(u,{)-
( f , gu,{) -
f(t)g(t-u)e O0
-i~tdt.
(4.11)
70
CHAPTERIV TIMEMEETSFREQUENCY
at i i i
(t)[
FIGURE 4. !
Heisenberg box representing an atom ~b.y.
This transform is also called the short time Fourier transform because the multiplication by g ( t - u) localizes the Fourier integral in the neighborhood of t = u. As in (4.9), one can define an energy density called a spectrogram, denoted Ps:
Psf(u,~) - [Sf(u,~)l 2 -
f- -
j_
+c~ f(t)
g ( t - U) e-i(t
dt
12.
(4.12)
O0
The spectrogram measures the energy of f in the time-frequency neighborhood of (u,~) specified by the Heisenberg box of gu,~.
Heisenberg Boxes Since g is even, gu,~(t) = e i{tg(t - u) is centered at u. The time spread around u is independent of u and {:
cr2t -- / + ~ ( t - u ) 2 l g u , ~ ( t )
2 d t - f_+~t2ig(t)[2dt.
(4.13)
The Fourier transform ~ of g is real and symmetric because g is real and symmetric. The Fourier transform of gu,r is ~u,~ (aJ) = ~(a~ - ~) exp[-iu(aJ - ~)1.
(4.14)
It is a translation by ~ of the frequency window ~, so its center frequency is ~. The frequency spread around ~ is
2__
(~-~)2lDu,e(~)ldaJ- ~1
cr~ ~ O<3
[D(~)ldco.
(4.15)
O<3
It is independent of u and ~. Hence gu,~ corresponds to a Heisenberg box of area o-t o-~ centered at (u,~), as illustrated by Figure 4.2. The size of this box is independent of (u,~), which means that a windowed Fourier transform has the same resolution across the time-frequency plane. E x a m p l e 4.2 A sinusoidal wave f(t) - exp(i(0t) whose Fourier transform is a Dirac f(a~) - 27r6(co- ~0) has a windowed Fourier transform
Sf(u,~) - ~(~ - ~0) e x p [ - i u ( ~ - ~0)].
4.2
71
WINDOWED FOURIER TRANSFORM
~vT(m) J
Ot
>-'- ................................
u
I -- '~t
.
(- ....
II%
i
,,
I
o '
FIGURE 4.2
'
~ , ~
(t) l
. ~ F _ ~ , v (t) l
u
>t
v
Heisenberg boxes of two windowed Fourier atoms gu,~ and g~,7-
Its energy is spread over the frequency interval [{0 - 0-~/2, {0 § 0-~/2].
Example 4.3 The windowed Fourier transform of a Dirac f(t) - 6(t - uo) is S f(u,~) - g(uo- u)exp(-i{uo). Its energy is spread in the time interval [u0 -0-t/2,uo § 0-t/2]. Example4.4 A linear chirp f ( t ) exp(iat e) has an "instantaneous frequency" that increases linearly in time. For a Gaussian window g ( t ) (Tr0-a)-1/4 exp[-ta/(20-a)], the windowed Fourier transform of f is calculated using the Fourier transform (2.34) of Gaussian chirps. One can verify that its spectrogram is
psf(u()_jSf(u()j2 '
'
( 4 7 r 0 - 2 )1/2 1 + 4a 2O- 4
exp
(
-
0-2((_2au)2 ) 1 § 4a 20-4
"
(4.16) For a fixed time u, Psf(u,~) is a Gaussian that reaches its maximum at the frequency ~(u) = 2au. Observe that if we write f(t) = exp[i~b(t)], then ~(u) is equal to the "instantaneous frequency," defined as the derivative of the phase: a~(u) = cj(u) = 2au. Section 4.4.1 explains this result.
Example 4.5 Figure 4.3 gives the spectrogram of a signal that includes a linear chirp, a quadratic chirp and two modulated Gaussians. The spectrogram is computed with a Gaussian window dilated by 0- = 0.05. As expected from (4.16), the linear chirp yields large amplitude coefficients along the trajectory of its instantaneous frequency, which is a straight line. The quadratic chirp yields large
72
CHAPTER IV TIME MEETS FREQUENCY
FIGURE 4.3 The signal includes a linear chirp whose frequency increases, a quadratic chirp whose frequency decreases, and two modulated Gaussian functions located at t = 0.5 and t = 0.87. (a) Spectrogram Psf(u,~). Dark points indicate large amplitude coefficients. (b) Complex phase of Sf(u,~) in regions where the modulus Ps f (u, ~) is non-zero.
coefficients along a parabola. The two modulated Gaussians produce low and high frequency blobs at u = 0.5 and u = 0.87.
4.2. I
Completeness and Stability
When the time-frequency indices (u,() vary across ]~2, the Heisenberg boxes of the atoms gu,~cover the whole time-frequency plane. One can thus expect that f can be recovered from its windowed Fourier transform Sf(u,~). The following theorem gives a reconstruction formula and proves that the energy is conserved.
4.2 WINDOWED FOURIERTRANSFORM
73
T h e o r e m 4.1 / f f E L 2 (R) then
f(t) - ~1 / 7
f+~
(4.17)
Sf(u,~) g ( t - u ) e i~t d~du
and If(t) 12dt - ~
' f+ J7
O(3
(4.18)
ISf(u,~)l 2 d{du.
O0
Proof 1. The reconstruction formula (4.17) is proved first. Let us apply the Fourier Parseval formula (2.25) to the integral (4.17) with respect to the integration in u. The Fourier transform of f~(u) -- Sf(u, ~) with respect to u is computed by observing that +oc
Sf(u,~)--exp(-iu{)
f(t)g(t-u)exp[i{(u-t)]dt--exp(-iu{)f
.g~(u),
OO
where gr
- g ( t ) exp(i{t), because g ( t ) - g ( - t ) .
Its Fourier transform is therefore
0?~(~) - ) ( ~ + ~) ~ ( ~ + ~) = Y(~ + ~)/~(~). The Fourier transform of g ( t - u) with respect to u is ~(w) exp(-itcc). Hence
~ ~ Sf(u,~)g(t- u) exp(iC~t)du) d~ 1 (f+~f+~ 27r 1 f+~(1 ~ ~ f +~ ~ ) ( w + { ) l ) ( w ) l 2 exp[it(w+{)]dw ) d{ 27r
--
If 0? C L 1(1R), we can apply the Fubini Theorem A.2 to reverse the integration order. The inverse Fourier transform proves that
l /~+oc
2re
jc(w+~) exp[it(w+~)]d~ -- f(t).
0<5
Since ~1 f + ~ [~(w)l 2dw -- 1, we derive (4.17). If )~ ~ LI(N), a density argument is used to verify this formula. Let us now prove the energy conservation (4.18). Since the Fourier transform in u of Sf(u,{) is f(cc + {) )(w), the Plancherel formula (2.26) applied to the right-hand side of (4.18) gives
I ]'~ ~I+~ 2re
Sf (u,{)t 2dud{ -- ~I / + ~ ~1 I ~ ~ I)(cc + ~) g(a)) 12dwd{.
The Fubini theorem applies and the Plancherel formula proves that
1 {+oc
2rr which implies (4.18).
10?(co_qt_~)]2 d~ -- ]IN] 2
74
CHAPTER IV TIME MEETS FREQUENCY
The reconstruction formula (4.17) can be rewritten
f ( t ) -- ~
~
~
(4.19)
( f , gu,~) gu,~(t)d~ du.
It resembles the decomposition of a signal in an orthonormal basis but it is not, since the functions {gu,{}u,{~2 are very redundant in L2(R). The second equality (4.18) justifies the interpretation of the spectrogram P s f ( u , ~ ) - - I a f ( u , { ) l 2 a s an energy density, since its time-frequency sum equals the signal energy.
Reproducing Kernel A windowed Fourier transform represents a one-dimensional signal f ( t ) by a two-dimensional function S f ( u , { ) . The energy conservation proves that S f c L2(•2). Because S f ( u , ~ ) is redundant, it is not true that any 9 E L2(]R 2) is the windowed Fourier transform of some f E L2 (]I~). The next proposition gives a necessary and sufficient condition for such a function to be a windowed Fourier transform.
Proposition 4.1
Let 9 E L2(R2). S f (u, ~) if and only if
There exists f E
L2(R) such
that ~ ( u , ( ) -
e(.0.{0)-
(4.20)
with (4.21)
K(uo,u,~o,~) = (gu,~,guo,{o) .
Proof 2. Suppose that there exists f such that ~(u,~) = Sf(u,~). Let us replace f with its reconstruction integral (4.17) in the windowed Fourier transform definition: S f ( uo , ~o) --
/ ( /]f7 +~ ~
-~1
Sf(u,~)g=,((t)dud~
guo,io(t)dt.
(4.22)
Inverting the integral on t with the integrals on u and ~ yields (4.20). To prove that the condition (4.20) is sufficient, we define f as in the reconstruction formula (4.17):
f(t)-
~
~
~ ~(u,~)g(t-u)exp(i~t)d~du
and show that (4.20) implies that ~(u,~) = Sf(u,~).
II
Ambiguity Function The reproducing kernel K(uo,u,~o,~) measures the timefrequency overlap of the two atoms gu,{ and gu0,{0. The amplitude of K(uo, u, ~0, ~) decays with uo - u and ~0 - { at a rate that depends on the energy concentration of g and ~. Replacing gu,~ and gu0,{0 by their expression and making the change of variable v = t - (u + u0)/2 in the inner product integral (4.21) yields
K(uo,u,~o,~) - exp
(i
- ~ ( ~ 0 - ~)(u + u0)
)
Ag(uo - u,~o - ~)
(4.23)
4.2
75
WINDOWED FOURIER TRANSFORM
where
Ag(7-,7)-
f+oo ~ g ( v+-~7-)(7-) g v--~
e-
i~ivdv
(4.24)
is called the ambiguity function of g. Using the Parseval formula to replace this time integral with a Fourier integral gives
A g ( 7, ,7) - ~
oo
g'
-+- -~ ) g,
-- -~ ) eiraJ d~.
(4.25)
The decay of the ambiguity function measures the spread of g in time and of ) in frequency. For example, if g has a support included in an interval of size T, then ag(7-,a~) = 0 for 17-1>_ T/2. The integral (4.25) shows that the same result applies to the support of ~. 4.2.2
Choice of Window z
The resolution in time and frequency of the windowed Fourier transform depends on the spread of the window in time and frequency. This can be measured from the decay of the ambiguity function (4.24) or more simply from the area ch cr~ of the Heisenberg box. The uncertainty Theorem 2.5 proves that this area reaches the minimum value 1/2 if and only if g is a Gaussian. The ambiguity function Ag(7-,'7) is then a two-dimensional Gaussian. The time-frequency localization of g can be modified with a scaling. Suppose that g has a Heisenberg time and frequency width respectively equal to at and cry. Let gs(t) -- s -1/2 g(t/s) be its dilation by s. A change of variables in the integrals (4.13) and (4.15) shows that the Heisenberg time and frequency width of gs are respectively sat and cr~/s. The area of the Heisenberg box is not modified but it is dilated by s in time and compressed by s in frequency. Similarly, a change of variable in the ambiguity integral (4.24) shows that the ambiguity function is dilated in time and frequency respectively by s and 1/s
Window Scale
ags(7-,7) - - a g
(7) ,s'7
9
The choice of a particular scale s depends on the desired resolution trade-off between time and frequency. Finite Support In numerical applications, g must have a compact support. Theorem 2.6 proves that its Fourier transform ~ necessarily has an infinite support. It is a symmetric function with a main lobe centered at w - 0, which decays to zero with oscillations. Figure 4.4 illustrates its behavior. To maximize the frequency resolution of the transform, we must concentrate the energy of ~ near w -- 0. Three important parameters evaluate the spread of ~:
76
CHAPTER IV TIME MEETS FREQUENCY
A
~~
/-'~-~
~A
FIGURE 4.4 The energy spread of ~ is measured by its bandwidth Aw and the maximum amplitude A of the first side-lobes, located at w - -+-wo.
9 The root mean-square bandwidth Aw, which is defined by I~r
I (o)12
1 2
9 The maximum amplitude A of the first side-lobes located at w - +w0 in Figure 4.4. It is measured in decibels:
I ( o)12
A - - lOloglo i~(0)[ 2 .
9 The polynomial exponent p, which gives the asymptotic decay of I~(~)l for large frequencies" I~(w)l-
o(w-p-~).
(4.26)
Table 4.1 gives the values of these three parameters for several windows g whose supports are restricted to [ - 1 / 2 , 1/2] [204]. Figure 4.5 shows the graph of these windows. To interpret these three frequency parameters, let us consider the spectrogram of a frequency tone f(t) = exp(i~0t). IfAw is small, then ISf(u,~)[ 2 = [ g ( ~ - - ~ 0 ) [ 2 has an energy concentrated near ~ - ~0. The side-lobes of ~ create "shadows" at = ~0 + w0, which can be neglected if A is also small. If the frequency tone is embedded in a signal that has other components of much higher energy at different frequencies, the tone can still be detected if ~ ( w - ~) attenuates these components rapidly when I w - ~1 increases. This means that I~(w) ] has a rapid decay, and Proposition 2.1 proves that this decay depends on the regularity of g. Property (4.26) is typically satisfied by windows that are p times differentiable.
4.2
77
W I N D O W E D FOURIER TRANSFORM
Name
g(t)
AaJ
A
el
Rectangle
1
0.89
13db
0
Hamming
0.54 + 0.46cos(27rt)
1.36
-43db
0
1.55
-55db
0
Gaussian
exp(
18t 2)
Hanning
cos2(Trt)
1.44
-32db
2
Blackman
0.42 + 0.5 cos(27rt) +0.08 cos (47rt)
1.68
-58db
2
Table 4. I Frequency parameters of five windows g whose supports are restricted to [ - 1 / 2 , 1/2]. These windows are normalized so that g(0) - 1 but Ilgll r 1.
Hamming
Gaussian
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.~
0.2 0 I
-0.5
0
0.5
-0.5
0
Hanning 1
0.8
0.8
0.6
0.6
0.4
0.4
0.~ ./
0.~
FIGURE 4.5
4.2.3
Blackman
1
-0.5
0
0.5
0.5
1
-0.5
-. 0
0.5
Graphs of four windows g whose support are [ - 1/2, 1/2].
Discrete Windowed Fourier Transform z
The discretization and fast computation of the windowed Fourier transform follow the same ideas as the discretization of the Fourier transform described in Section 3.3. We consider discrete signals of period N. The window gin] is chosen to be a symmetric discrete signal of period N with unit norm Ilgll = 1. Discrete windowed Fourier atoms are defined by
78
CHAPTER IV TIMEMEETSFREQUENCY
The discrete Fourier transform of
gm,,[k] -
gm,l is
~[k- 1] exp
-i2rcm(k- l) ) N
"
The discrete windowed Fourier transform of a signal f of period N is N-1
Sf[m, I] - (f , gm,l) --
f[n] g[n - m] exp
Z
(-i2rcln) N
'
(4.27)
n--0
For each 0 < m < N, Sf[m, l] is calculated for 0 < l < N with a discrete Fourier transform of f[n]g[n - m]. This is performed with N FFT procedures of size N, and thus requires a total of O(N 2 log 2N) operations. Figure 4.3 is computed with this algorithm. Inverse Transform The following theorem discretizes the reconstruction formula and the energy conservation of Theorem 4.1.
Theorem 4.2
If f is a signal of period N then 1 N-1N-1 (i2rcln) f [n] -- ~ ~ ~ S f [m, 1]g[n - m] exp N
(4.28)
m--O I = 0
and N-1
N-1N-1
Z
if[n][2 -
n=O
1
(4.29) l = 0 m--O
This theorem is proved by applying the Parseval and Plancherel formulas of the discrete Fourier transform, exactly as in the proof of Theorem 4.1. The reconstruction formula (4.28) is rewritten N-1
N-1
f [n] -- -~ ~ gin - m] ~ S f [m, l] exp m=0
N
"
I=0
The second sum computes for each 0 _< m < N the inverse discrete Fourier transform of Sf[m,1] with respect to I. This is calculated with N FFT procedures, requiring a total of O(N 2 log2 N) operations. A discrete windowed Fourier transform is an N 2 image Sf[1,m] that is very redundant, since it is entirely specified by a signal f of size N. The redundancy is characterized by a discrete reproducing kernel equation, which is the discrete equivalent of (4.20).
4.3
4.3
79
WAVELET TRANSFORMS 1
WAVELET TRANSFORMS
1
To analyze signal structures of very different sizes, it is necessary to use timefrequency atoms with different time supports. The wavelet transform decomposes signals over dilated and translated wavelets. A wavelet is a function ~b E L2(R) with a zero average:
f
+oo ~b(t)dt
(4.30)
O.
oO
It is normalized I1 11 - 1, and centered in the neighborhood of t - 0. A family of time-frequency atoms is obtained by scaling ~ by s and translating it by u" 1
~,,s(t) - - ~ ~ (~@ff-) 9 These atoms remain normalized: at time u and scale s is
II .,sll
Wf(u,s) - (f ,~bu,s) Linear Filtering
- 1. The wavelet transform of f E Lz(R)
/~o~ f ( t ) - ~ 1 b,(t_U) dt. --7
(4.31)
The wavelet transform can be rewritten as a convolution product:
Wf(u,s) - f + o~~ f ( t ) - - ~1 b , ( t ~
) d t - f ,@s(U)
(4.32)
with -7
"
The Fourier transform of ~bs(t) is A
~b,(co) - x/~ ~b*(sw).
(4.33)
Since ~(0) - f + ~ ~(t)dt - O, it appears that ~ is the transfer function of a bandpass filter. The convolution (4.32) computes the wavelet transform with dilated band-pass filters. Analytic Versus Real Wavelets
Like a windowed Fourier transform, a wavelet transform can measure the time evolution of frequency transients. This requires using a complex analytic wavelet, which can separate amplitude and phase components. The properties of this analytic wavelet transform are described in Section 4.3.2, and its application to the measurement of instantaneous frequencies is explained in Section 4.4.2. In contrast; real wavelets are often used to detect sharp signal transitions. Section 4.3.1 introduces elementary properties of real wavelets, which are developed in Chapter 6.
80
4.3. I
CHAPTER IV TIMEMEETSFREQUENCY
Real W a v e l e t s
Suppose that ~ is a real wavelet. Since it has a zero average, the wavelet integral
Wf (u,s) - f 7
1 ~b*(t-u) f (t) --~ --~ dt
measures the variation of f in a neighborhood of u, whose size is proportional to s. Section 6.1.3 proves that when the scale s goes to zero, the decay of the wavelet coefficients characterizes the regularity of f in the neighborhood of u. This has important applications for detecting transients and analyzing fractals. This section concentrates on the completeness and redundancy properties of real wavelet transforms.
Example 4.6 Wavelets equal to the second derivative of a Gaussian are called
Mexican hats. They were first used in computer vision to detect multiscale edges [354]. The normalized Mexican hat wavelet is
~b(t)-
2(,2)(_,2)
71-1/4v/~ ~-2- 1
exp
~
.
(4.34)
For 0- = 1, Figure 4.6 plots -~p and its Fourier transform
+(03)--V/-~ __ 0-5/27I1/4032exp ( -0-2032) x/3
2
.
(4.35)
Figure 4.7 shows the wavelet transform of a signal that is piecewise regular on the left and almost everywhere singular on the right. The maximum scale is smaller than 1 because the support of f is normalized to [0, 1]. The minimum scale is limited by the sampling interval of the discretized signal used in numerical calculations. When the scale decreases, the wavelet transform has a rapid decay to zero in the regions where the signal is regular. The isolated singularities on the left create cones of large amplitude wavelet coefficients that converge to the locations of the singularities. This is further explained in Chapter 6. A real wavelet transform is complete and maintains an energy conservation, as long as the wavelet satisfies a weak admissibility condition, specified by the following theorem. This theorem was first proved in 1964 by the mathematician Calder6n [ 111 ], from a different point of view. Wavelets did not appear as such, but Calder6n defines a wavelet transform as a convolution operator that decomposes the identity. Grossmann and Morlet [200] were not aware of Calder6n's work when they proved the same formula for signal processing.
4.3
81
WAVELET TRANSFORMS
-+(~)
-r 1.5 0.5
1 0.5 0
-0~5
0
FIGURE 4.6
5
-5
0
5
Mexican hat wavelet (4.34) for a - 1 and its Fourier transform.
FIGURE 4.7 Real wavelet transform Wf(u,s) computed with a Mexican hat wavelet (4.34). The vertical axis represents log 2 s. Black, grey and white points correspond respectively to positive, zero and negative wavelet coefficients.
Theorem 4.3 (CALDERON, GROSSMANN, MORLET) Let r E L2(R) be a realfunc-
tion such that Cr
a) /o +~ I~(~)1 ~
dw < +oc.
(4.36)
Any f E L2(R) satisfies 1
f(t) -- ~
/0/7 +~
1
Wf(u,s) --~ r
t -
--~
u
du
--
s2 ,
(4.37)
82
CHAPTER IV TIME MEETSFREQUENCY
and
1
as
If(t)12dt - ~
IWf(u,s)l 2 du s--g.
(X)
(4.38)
O0
Proof 1.
The proof of (4.38) is almost identical to the proof of (4.18). Let us concentrate on the proof of (4.37). The right integral b(t) of (4.37) can be rewritten as a sum of convolutions. Inserting Wf(u,s) - f ,~s(U) with ~s(t) - s -1/2 ~2(t/s) yields
b(t) = =
C,1 ~oo+~176 Wf(.,s),~bs(t) ds 7 ds C,1 fo +~ f*~s *~2s(t) 7s
(4.39)
The .... indicates the variable over which the convolution is calculated. We prove that b -- f by showing that their Fourier transforms are equal. The Fourier transform of b is b(~) -
}(a~) v~
(s~)v~(s~)
-
iz}(sw)l 2 ds. s
Since ~b is real we know that I@(-~) 12 - I@(~) 12, The change of variable ( -- sco thus proves that
The theorem hypothesis Ce-
&)
dco < + c o
is called the wavelet admissibility condition. To guarantee that this integral is finite we must ensure that f ( 0 ) - 0, which explains why we imposed that wavelets must ^
have a zero average. This condition is nearly sufficient. If z}(0) - 0 and z}(~) is continuously differentiable then the admissibility condition is satisfied. One can verify that ~/;(a;) is continuously differentiable if C has a sufficient time decay
f +~
+ It ) ~(t)ldt < -+-~.
Reproducing Kernel Like a windowed Fourier transform, a wavelet transform is a redundant representation, whose redundancy is characterized by a reproducing kernel equation. Inserting the reconstruction formula (4.37) into the definition of the wavelet transform yields
wf(uo,so)- f T (
~1 fo+O~/_7 Wf(u,S)~u,s(t)du-~ds) Cuo,so(t)dt.
4.3 WAVELETTRANSFORMS
83
Interchanging these integrals gives ds
Wf(uo,so) -- ~1 f+c~ oo K(u, uo,s,so) Wf(u,s)du--S2
(4.40)
K(uo,u, so,s) = (~,,,s,~uo,so) .
(4.41)
with The reproducing kernel K (u0, u, so, s) measures the correlation of two wavelets ~bu,s and ~bu0,so. The reader can verify that any function ~(u,s) is the wavelet transform of some f E L2 (IR) if and only if it satisfies the reproducing kernel equation (4.40). Scaling Function When Wf(u,s) is known only for s < so, to recover f we need a complement of information corresponding to Wf(u,s)for s > so. This is obtained by introducing a scaling function c) that is an aggregation of wavelets at scales larger than 1. The modulus of its Fourier transform is defined by i@(co)l2 _
i@(sco) 2
s
_
I~(~__~) d{,
(4.42)
and the complex phase of ~5(w) can be arbitrarily chosen. One can verify that I1 11- 1 and we derive from the admissibility condition (4.36) that lim 1~5(co)12 - C w.
(4.43)
co--+0
The scaling function can thus be interpreted as the impulse response of a low-pass filter. Let us denote
(~s(t)-
~
1
t
q5 ( s )
and
~3s(t)- ~s(-t).
The low-frequency approximation of f at the scale s is (4.44)
l(t-u))--f~s(U)~ L f (u,s) -- ( f (t), --~c)
With a minor modification of the proof of Theorem 4.3, it can be shown that
ds + Cfso 1 Lf(.,so),Oso(t). f(t) -- ~1 L s~Wf(. ,s)*fs(t) -~
(4.45)
Example 4.7 If ~ is the second order derivative of a Gaussian whose Fourier transform is given by (4.35), then the integration (4.42) yields ~/~
Figure 4.8 displays q5 and ~5 for cr - 1.
Cd2+ ~-5 exp
2
"
(4.46)
84
CHAPTERIV
TIME MEETS FREQUENCY
+(t) 1.5
0.8 0.6 0.4
0.5
0.2
0
0
-5
-5
5
6
6
s
FIGURE 4.8 Scaling function associated to a Mexican hat wavelet and its Fourier transform calculated with (4.46).
4.3.2
Analytic Wavelets
To analyze the time evolution of frequency tones, it is necessary to use an analytic wavelet to separate the phase and amplitude information of signals. The properties of the resulting analytic wavelet transform are studied. Analytic Signal A function fa E L2(IR) is said to be analytic if its Fourier transform is zero for negative frequencies: fa(~t3)--0
ifw < 0.
An analytic function is necessarily complex but is entirely characterized by its real part. Indeed, the Fourier transform of its real part f -- Real[fa] is je(O.3 ) -- Jea(&3)+ jea(--(.~ )
2 and this relation can be inverted: Jea((M) --
(2f(~o) 0
if w_> 0 if ~o < 0 "
(4.47)
The analytic part fa(t) of a signal f(t) is the inverse Fourier transform of )'a (co) defined by (4.47). Discrete Analytic Part The analytic part fa[n] of a discrete signal f[n] of size N is also computed by setting to zero the negative frequency components of its discrete Fourier transform. The Fourier transform values at k = 0 and k = N / 2 must be carefully adjusted so that Real[fa] = f:
fa[k]
{ f[k] -2f[k] 0
if k - 0, N / 2 if0 < k < N/2 if N/2 < k < N
We obtain fa [n] by computing the inverse discrete Fourier transform.
(4.48)
85
4.3 WAVELETTRANSFORMS
Example 4.8 The Fourier transform of f ( t ) -- acos(co0t + qS) -- a (exp[i(coot + qS)] + exp[-i(coot + 05)])
f(co) -- rra (exp(i~b)c$(co -coo) + exp(-iqS)c$(co +coo)). The Fourier transform of the analytic part computed with (4.47) is fa(co) 2rra exp(iqS) c$(co- coo) and hence (4.49)
f a(t) = a exp[i(co0t + qS)].
Time-Frequency Resolution An analytic wavelet transform is calculated with an analytic wavelet ~: Wf(u,s) = (f, ~u,s) -
oo f ( t ) --~
dt.
(4.50)
Its time-frequency resolution depends on the time-frequency spread of the wavelet atoms ~u,s. We suppose that ~ is centered at 0, which implies that ~?u,s is centered at t - u. With the change of variable v - -t-u 7 , we verify that
f
+ ~ 1 7 6 U) 2 I~u,s(t) l2 d t
--
s 2 02,
(4.51)
OO
with a 2 - f+oc t2 i~b(t)[2 dt. Since ~(co) is zero at negative frequencies, the center frequency ~7of ~ is - ~1
~0 +~ co l+(co)l 2 dco.
(4.52)
The Fourier transform of ~bu,s is a dilation of ~ by 1Is" +~,s(co) -- x/~)(sco)exp(-icou).
(4.53)
Its center frequency is therefore ~l/s. The energy spread of ~bu,~around rl/s is 2w
co--s
(b u ,s ( co )
d co - Cr2 ,
(4.54)
with (3-w 2
~ 1 f0 +~176 (CO -- 7-])2 1113(CO)12 dco.
The energy spread of a wavelet time-frequency atom ~bu,s thus corresponds to a Heisenberg box centered at (u, rl/s), of size sat along time and c ~ / s along frequency. The area of the rectangle remains equal to crt cr~ at all scales but the resolution in time and frequency depends on s, as illustrated in Figure 4.9.
8~
CHAPTERIV TIMEMEETSFREQUENCY
cot i~,s(CO)l 11
........
s
S0
-~
i' i 0
UflV
sot }
V ti o k~/
So t
FIGURE 4.9 Heisenberg boxes of two wavelets. Smaller scales decrease the time spread but increase the frequency support, which is shifted towards higher frequencies. An analytic wavelet transform defines a local time-frequency energy density
P w f , which measures the energy of f in the Heisenberg box of each wavelet ~bu,s centered at (u,~ - q/s): (4.55)
ewf(U,~) _ iWf(ig, s)12 _ iWf(ll ' ~)]2. This energy density is called a scalogram.
Completeness An analytic wavelet transform of f depends only on its analytic part fa. The following theorem derives a reconstruction formula and proves that energy is conserved for real signals. Theorem 4.4 For any f C Lz(R)
1 Wfa(U,S) W f (u, s) - -~
(4.56)
If C, - f o + ~ -' [+(w)[2 dw < + ~ and f is real then
f(t)_ C,2_2_Real [fo+~f +~ ~ W f ( u ' s ) g 2 s ( t - u ) d u 7as
,
(4.57)
and
]Wf (u,s)] 2 duds s 2"
(4.58)
4.3 WAVELETTRANSFORMS
87
Proof 1. Let us first prove (4.56). The Fourier transform with respect to u of is(u) = W f ( u , s ) = f ,~s(U) is )~, (co) - j? (cJ) xfi ~* (sco). Since ~(co) - 0 at negative frequencies, and fa(w) - 2f(w) for co >_ 0, we derive that 1
~,
,
jes(CO) = ~ JCa(CU)V/S (SW) which is the Fourier transform of (4.56).
With the same derivations as in the proof of (4.37) one can verify that the inverse wavelet formula reconstructs the analytic part of f:
ds du. fa(t) = ~1 f 0 + ~ S + ~~ Wfa(U,S) G(t-- U) 72
(4.59)
Since f - Real[fa], inserting (4.56) proves (4.57). An energy conservation for the analytic part fa is proved as in (4.38) by applying the Plancherel formula:
/7
Ifa(t)l 2 dt = -~
[Waf (U,S)[2du d__ss S 2"
Since W f a ( U , S ) = 2Wf(u,s) and [[fa[[ 2 -- 2[{f [2, equation (4.58)follows.
II
If f is real the change of variable ~ - 1/s in the energy conservation (4.58) proves that I{fll 2 -
2 /0+ f7
~
Pwf(u,{)dud{.
It justifies the interpretation of a scalogram as a time-frequency energy density. W a v e l e t Modulated Windows
An analytic wavelet can be constructed with a frequency modulation of a real and symmetric window g. The Fourier transform of ~b(t) - g(t) exp(h/t) (4.60) is ~(w) = ~(w - r/). If ~(w) - 0 for Icol > ~7 then ~(w) - 0 for co < 0. Hence ~b is analytic, as shown in Figure 4.10. Since g is real and even, } is also real and symmetric. The center frequency of ~ is therefore r/and
}@(rl)l- sup I@(cc)l- ~(0).
(4.61)
coER
A Gabor wavelet ~b(t) - g(t)e irlt is obtained with a Gaussian window g(t)-
(O.271.)1/4 exp
(t2) ~
.
(4.62)
The Fourier transform of this window is )(co) - (47ro-2) 1/4 exp(-crzco2/2). If 0-2/_]2 ) ) 1 then/~(w) 0 for ]w] > rl. Such Gabor wavelets are thus considered to be approximately analytic.
88
CHAPTERIV TIMEMEETSFREQUENCY
^
l 0
FIGURE 4. I 0
n
Fourier transform z}(cc) of a wavelet ~b(t) - g(t)exp(i~Tt).
Example 4.9 The wavelet transform of f(t) - a exp(i~c0t) is Wf (u, s) - ax/~ +* (saJ0) exp(iaJ0t) - a V/S ~,(scoo - rl) exp(iw0t). Observe that the normalized scalogram is maximum at ~ - aJ0"
~ P w f ( u , ~ ) - - sl [ w f ( u , s ) 1 2 - a 2 Example4.10 The wavelet transform of a linear chirp f ( t ) exp(iat 2) exp[iq$(t)] is computed for a Gabor wavelet whose Gaussian window is (4.62). By using the Fourier transform of Gaussian chirps (2.34) one can verify that
]Wf(u,s)12 2 ( = 47r0. s
1 + 4s2a2o -4
)1/2
exp
__0.2
)
1 + 4a 2s40.4 ( r / - 2asu) 2
.
As long as 4a2s40- 4 ~< l, at a fixed time u the renormalized scalogram rl-l~Pwf(u,~) is a Gaussian function of s that reaches its maximum at
~(u) =
rl = eft(u) = 2au.
s(u)
(4.63)
Section 4.4.2 explains why the amplitude is maximum at the instantaneous frequency q$'(u).
Example 4.11 Figure 4.11 displays the normalized scalogram ~7-1~pwf(u,(), and the complex phase ~ w ( u , ( ) of Wf(u,s), for the signal f of Figure 4.3. The frequency bandwidth of wavelet atoms is proportional to 1/s = ~/r/. The frequency resolution of the scalogram is therefore finer than the spectrogram at low frequencies but coarser than the spectrogram at higher frequencies. This explains why the wavelet transform produces interference patterns between the high frequency Gabor function at the abscissa t - 0.87 and the quadratic chirp at the same location, whereas the spectrogram in Figure 4.3 separates them well.
4.3 WAVELETTRANSFORMS
FIGURE 4.11
89
(a) Normalizedscalogram~7-1(Pwf (u,() computed from the sig -
nal in Figure 4.3. Dark points indicate large amplitude coefficients. (b) Complex phase ~bw(u,~) of Wf(u,~7/(), where the modulus is non-zero. 4.3.3
Discrete Wavelets z
Let )~(t) be a continuous time signal that is uniformly sampled at intervals N -1 over [0, 1]. Its wavelet transform can only be calculated at scales N -1 < s < 1, as shown in Figure 4.7. In discrete computations, it is easier to normalize the sampling distance to 1 and thus consider the dilated signal f ( t ) - )~(N-lt). A change of variable in the wavelet transform integral (4.31) proves that
Wje(u,s) - N -1/2 W f ( N u , N s ) . To simplify notation, we concentrate on f and denote f [ n ] - f ( n ) the discrete signal of size N. Its discrete wavelet transform is computed at scales s - a J, with a - 2 l/v, which provides v intermediate scales in each octave [U, 2 j+l ). Let ~h(t) be a wavelet whose support is included in [ - K / 2 , K / 2 ] . For 2 _< aJ <_ N K -1, a discrete wavelet scaled by a j is defined by
Inl-
1
n
90
CHAPTERIV TIMEMEETSFREQUENCY
This discrete wavelet has Ka j non-zero values on [-N/2,N/2]. The scale a j is larger than 2 otherwise the sampling interval may be larger than the wavelet support. Fast Transform To avoid border problems, we treat f[n] and the wavelets ~j[n] as periodic signals of period N. The discrete wavelet transform can then be written as a circular convolution ~j[n] - ~ [-n]" N-1
Wf[n,a j] - Z f [ m ] ~ b ~ [ m - n ] - f | ~j[n].
(4.64)
m--0
This circular convolution is calculated with the fast Fourier transform algorithm, which requires O(Nlog2N ) operations. If a = 21/v, there are vlog2(N/(2K)) scales a j E [2N -1 , K-l]. The total number of operations to compute the wavelet transform over all scales is therefore O(vN(log2N) 2) [291]. To compute the scalogram Pw[n,~] - I W f [ n , ~]l 2 we calculate Wf[n,s] at any scale s with a parabola interpolation. Let j be the closest integer to log2 s/log2 a, and p(x) be the parabola such that
p ( j - 1 ) - Wf[n,a j-l] , p(j) - Wf[n,a j] , p(j + 1 ) - Wf[n, aJ+l]. A second order interpolation computes
Wf[n,s]--p
log2 s ) log 2a
"
Parabolic interpolations are used instead of linear interpolations in order to locate more precisely the ridges defined in Section 4.4.2. Discrete Scaling Filter A wavelet transform computed up to a scale a J is not a complete signal representation. It is necessary to add the low frequencies Lf[n, a J] corresponding to scales larger than a J. A discrete and periodic scaling filter is computed by sampling the scaling function O(t) defined in (4.42): 1
n
for n C [-N/2,N/2].
Let dpj[n] - Oj[-n]. The low frequencies are carried by N-1
f[m] q~[m - n] -- f | ~, In].
Lf[n,a'] -- Z
(4.65)
m--O
Reconstruction An inverse wavelet transform is implemented by discretizing the integral (4.45). Suppose that a I 2 is the finest scale. Since ds/s 2 - d log e sis and -
-
4.4 INSTANTANEOUSFREQUENCY
9 l
the discrete wavelet transform is computed along an exponential scale sequence {a j } j with a logarithmic increment d log e s - log e a, we obtain
f [n] "~
logea
J
1
C~ Zj=I-a-]w f
1
[. , a j] | ~,j [n] + C~ aJ
Lf[.,aj] ~)fbj[n]
(4.66)
The "." indicates the variable over which the convolution is calculated. These circular convolutions are calculated using the FFT, with O(vN(log 2 N) 2) operations. Analytic wavelet transforms are often computed over real signals fin] that have no energy at low frequencies. In this case do not use a scaling filter dpj[n]. Theorem 4.4 shows that
'~C~
j=I
'
--a] w f [ . , a j] ~ j [ n ]
).
(4.67)
The error introduced by the discretization of scales decreases when the number v of voices per octave increases. However, the approximation of continuous time convolutions with discrete convolutions also creates high frequency errors. Perfect reconstructions can be obtained with a more careful design of the reconstruction filters. Section 5.5.2 describes an exact inverse wavelet transform computed at dyadic scales a j = 2 j.
4.4
INSTANTANEOUS FREQUENCYZ
When listening to music, we perceive several frequencies that change with time. This notion of instantaneous frequency remains to be defined. The time variation of several instantaneous frequencies can be measured with time-frequency decompositions, and in particular with windowed Fourier transforms and wavelet transforms.
Analytic Instantaneous Frequency A cosine modulation f ( t ) -- a cos(c~ot + ~bo) -- acos f$(t) has a frequency a~0 that is the derivative of the phase ~(t) = a30t+ q$0. To generalize this notion, real signals f are written as an amplitude a modulated with a time varying phase q$: f (t) = a(t) cosO(t) with a(t) >_ O . (4.68) The instantaneous frequency is defined as a positive derivative of the phase: -
>_ o .
The derivative can be chosen to be positive by adapting the sign of 4>(t). One must be careful because there are many possible choices of a(t) and ~b(t), which implies that aJ(t) is not uniquely defined relative to f .
92
CHAPTER IV TIME MEETS FREQUENCY
A particular decomposition (4.68) is obtained from the analytic part fa of f, whose Fourier transform is defined in (4.47) by 2f(co)
Jea(co)--
0
if c o > 0 ifw<0
"
(4.69)
This complex signal is represented by separating the modulus and the complex phase: f a(t) = a(t) exp[ifS(t)] . (4.70) Since f = Real[fa], it follows that
f (t) = a(t) cos~b(t). We call a(t) the analytic amplitude of f(t) and ~b'(t) its instantaneous frequency; they are uniquely defined.
Example 4.12 If f ( t ) = a(t) cos(co0t + ~b0), then j?(w) - ~1(exp(i~bo) a(w - w o ) + exp(-iqSo) a(w +wo)) If the variations of a(t) are slow compared to the period 2rr/coo, which is achieved by requiring that the support of a be included in [-coo, coo], then
f a(W) -- ~l(co- WO) exp(iqSo) SO f a(t) = a(t) exp[i(coot + 050)]. If a signal f is the sum of two sinusoidal waves:
f (t) = a cos(wl t) + a cos(w2t), then
fa(t)--aexp(icolt)+aexp(iw2t)--acos
( l~( w 1- w 2 ) t ) e x p ( ~(COl i +co2)t ) .
The instantaneous frequency is ~b'(t) = (co, +co2)/2 and the amplitude is
a(t)--a cos(~(col-co2)t)
.
This result is not satisfying because it does not reveal that the signal includes two sinusoidal waves of the same amplitude. It measures an average frequency value. The next sections explain how to measure the instantaneous frequencies of several spectral components by separating them with a windowed Fourier transform or a wavelet transform. We first describe two important applications of instantaneous frequencies.
4.4
INSTANTANEOUSFREQUENCY
93
Frequency' Modulation In signal communications, information can be transmitted through the amplitude a(t) (amplitude modulation) or the instantaneous frequency ~b'(t) (frequency modulation) [65]. Frequency modulation is more robust in the presence of additive Gaussian white noise. In addition, it better resists multi-path interferences, which destroy the amplitude information. A frequency modulation sends a message m(t) through a signal
f(t) - acos~b(t) with q~'(t) - ~0 § The frequency bandwidth of f is proportional to k. This constant is adjusted depending on the transmission noise and the available bandwidth. At the reception, the message m(t) is restored with a frequency demodulation that computes the instantaneous frequency ~b'(t) [101]. Additive Sound Models
Musical sounds and voiced speech segments can be modeled with sums of sinusoidal partials: K
K
f (t) - ~ f k(t) - Z ak(t) coSC~k(t) , k--1
(4.71)
k--1
where ak and ~b~vary slowly [296,297]. Such decompositions are useful for pattern recognition and for modifying sound properties [245]. Sections 4.4.1 and 4.4.2 explain how to compute ak and the instantaneous frequency ~b~ of each partial, from which the phase ~b~ is derived by integration. To compress the sound f by a factor c~ in time, without modifying the values of ~b~ and ak, we synthesize K
g(t)--Zak(c~t)cos(l~k(c~t)).
(4.72)
O~
k=l
The partials of g at t = ~ to and the partials of f at t = to have the same amplitudes and instantaneous frequencies. If c~ > 1, the sound g is shorter but it is perceived as having the same "frequency content" as f. A frequency transposition is calculated by multiplying each phase by a constant OL" K
(4.73) k--1
The instantaneous frequency of each partial is now c ~ ( t ) . To compute new amplitudes bk (t), we use a resonance model, which supposes that these amplitudes are samples of a smooth frequency envelope F (t, ~):
94
CHAPTERIV TIME MEETS FREQUENCY
This envelope is called a formant in speech processing. It depends on the type of phoneme that is pronounced. Since F(t, co) is a regular function of co, its amplitude at co - a O'k(t) is calculated by interpolating the values ak(t) corresponding to CO -- 0 I
4.4. I
Windowed Fourier Ridges
The spectrogram Psf(u,~) - I S f ( u , ~ ) l 2 measures the energy of f in a timefrequency neighborhood of (u,~). The ridge algorithm computes instantaneous frequencies from the local maxima of Psf(u,{). This approach was introduced by Delprat, Escudi6, Guillemain, Kronland-Martinet, Tchamitchian and TorrEsani [154, 71] to analyze musical sounds. Since then it has found applications for a wide range of signals [201, 71 ] that have time varying frequency tones. The windowed Fourier transform is computed with a symmetric window g ( t ) - g ( - t ) whose support is equal to [ - 1 / 2 , 1/2]. The Fourier transform is a real symmetric function and Ig(co)l < ~(0) for all co C R. The maximum
~(0)- f1_/2 1/2g(t)dt
is on the order of 1. Table 4.1 gives several examples of such windows. The window g is normalized so that Ilgl[- 1. For a fixed scale s, gs(t) - s-1/2g(t/s) has a support of size s and a unit norm. The corresponding windowed Fourier atoms are
gs,u,~(t) -- gs(t - u)e i~t, and the windowed Fourier transform is defined by
Sf(u,~) -- (f, gs,u,~) --
f
+~
f(t) g s ( t - u)e -i~t dt.
(4.74)
(X3
The following theorem relates S f ( u , { ) to the instantaneous frequency of f. Theorem
4.5 Let f (t) -- a(t) cos0(t). If { >_ 0 then
( f , gs,u,{) -- -~- a(u) exp(i[0(u) - {u])/~(s[{ - 05'(u)]) + e(u, ~)) .
(4.75)
The corrective term satisfies I~(u,~)l
~a,1 -J-~a,2 --F-~#5,2-~-
sup
I~l_>s~'(u)
with Ca,1 ~
and if sla'(u)l la(u)l-'
sla'(u)l
la(u) l
, {a,2 ~
sup I,-ul<_s/2
s2
I~(~)1
la"(t)l a(u) l
(4.76)
(4.77)
1, then Qb,2 <_ sup s 2 1 0 " ( t ) l It-ul<s/2
.
(4.78)
4.4
9~
INSTANTANEOUSFREQUENCY
If ~ - O' ( u ) then ~a,1-~
sla'(u)l la(u)l
Ig'(20' s (u)) I .
(4.79)
Proof 2. Observe that
f1/;
}~ a(t) cos @(t) gs(t- u) exp(-i~t)dt
(f ,g ....~) =
-
2
a(t) (exp[i@(t)] + exp[-i@(t)]) gs(t - u) exp[-i~t] dt
I(@)+I(-@). We first concentrate on
I(@)
=
1_2f+~a(,)exp[i+(t)]gs(t-u)exp(-i~t)dt
1-S~~176
This integral is computed by using second order Taylor expansions:
a(t+u)
t2
a(u)+ta'(u)+ ~c~(t) with Ic~(t)l < sup la"(h)l
--
hc[u,t+u]
@(t+u)
t2
-
~(u)+tO'(u)+~/3(t)
with ]/3(t)]<_ sup
hc[u,t+u]
I~"(h)l 9
We get 2
exp(-i(@(u)-{u))I(@)--
()(,2)
g=(t) e x p ( - i t ( { - @ ' ( u ) ) ) e x p ( i -t2~ ( t ) ) dt
f+~
a'(u)tgs(t) exp --it({-O'(u))
+
exp i-~/3(t) dt
~X3
if{ o~(')'~gs(t) exp ( -i(tf +@(u)-@(t+u)) ) dt.
+-~
A first order Taylor expansion of exp(ix) gives exp i~/3(t)
--l+~-/3(t)7(t)
with iT(t)I_< 1.
(4.80)
Since
f +~gs(t) exp[-it(~-df(u))]dt
x/~(s[~ - 41(u)]),
oc
inserting (4.80) in the expression of I(~) yields
@
I ( 0 ) - --~-a(u) exp[i(@(u)-~u)]~(~-@'(u))
<_
@ la(.)l (~a+, +~a= + ~+,2) 4
(4.81)
~
CHAPTERIV TIMEMEETSFREQUENCY
with ~+ a,1
21a'(u)l la(u)[
f + ~ t --~ 1 gs(t) e x p [ - i t ( { - 4r (u))]dt
(4.82)
1
s
s
/ +~
=
+
t 2 Io~(t)l---~ Igs(t)ldt,
(4.83)
1
(4.84)
ta 13(t)l ~
Igs(t)l dt
la'(u)l 1 la(u)l f + ~~ 1/3113(/)1~
[gs(t)ldt.
Applying (4.81) to I (-~b) gives
II(-~)1 <-----5----Ola(u)l 1~(~+4,'(u))l+ -v~la(u)l (~, 1.q_~a,2_qt_~qS,2 ) --W-with f'a,l-"
2la'(u)l ]a(u)l
t -~ gs(t) e x p [ - i t ( { +
(u))]dt .
(4.85)
Since ~ _> 0 and ~b'(u) > O, we derive that [~(s[~+~b'(u)])[ <
sup I~(~)1, i~l_>_s4(u)
and hence
1((9) + I(-~) = TVG a(u) exp[i(dp(u) -~u)] (~, (s[~- ~b'(u)]) + e(u, ~)) with ~ ( U , ~ ) "-- ~Ca'l + ~a,1 + {a,2 + g~b,2 "q"
2
Let us now verify the upper bound (4.77) for
s
sup
la~(~)l
- - (s
+ Q1)/2. Since
I~i>_sl4(,)l
9
gs(t) -
s-l/2g(t/s), a simple calculation shows that for n _> 0 f + ~ ltl, -~1 ]gs(t)ldt-
sn
fl/2
Sn
Sn
-1/2 Itl" Ig(t)] dt -< ~ Itgll2 = -2"
(4.86)
Inserting this for n - 1 in (4.82) and (4.85) gives ~a, 1 - -
e a,l + +QI
2
< sla'(u)l -la(u)l
The upper bounds (4.77) and (4.78) of the second order terms Ea,2 and e~b,2are obtained by observing that the remainder a(t) and 3(t) of the Taylor expansion of a(t + u) and qS(t+ u) satisfy sup la(t)l_< Itl <_s/ 2
sup tt-ul <_s/ 2
la"(t)],
sup [/3(t)]_< sup [t[<s / 2
tt-ul <_s/ 2
[~"(t)l.
(4.87)
97
4.4 INSTANTANEOUSFREQUENCY
Inserting this in (4.83) yields lea,2 ~
sup
S2 [a"(t)l
[t-ul<_s/2 la(u)[
When sla'(u)lla(u)1-1 ___1, replacing 13(t)l by its upper bound in (4.84) gives sup s21r
It-ul<_s/2
sup s2lqS"(t)l.
It-ul<s/2
Let us finally compute s when ~ = qS'(u). Since g(t) = g(-t), we derive from (4.82) that + 2la'(u) I lEa,l---[a(u)[
t - ~ gs(t)dt
=0 "
1 We also derive from (2.22) that the Fourier transform of t-~gs(t) is is ao,(sw), so (4.85) gives
1 _ tea "-- 2lEa,1-
sla'(u)l [a(u)[ 1~'(2sr
9 II
Delprat et al. [ 154] give a different proof of a similar result when g(t) is a Gaussian, using a stationary phase approximation. If we can neglect the corrective term e(u, ~) we shall see that (4.75) enables us to measure a(u) and ~5'(u) from S f (u, (). This implies that the decomposition f ( t ) -- a(t) cosqS(t) is uniquely defined. By reviewing the proof of Theorem 4.5, one can verify that a and 05' are the analytic amplitude and instantaneous frequencies of f . The expressions (4.77, 4.78) show that the three corrective terms Ca,l, Ca,2 and er are small if a(t) and ~b'(t) have small relative variations over the support of the window gs. Let Aco be the bandwidth of ~ defined by
I ( o)1 << 1 for [coI >__Aco. The term
(4.88)
sup I~(~)1 of e(u,{) is negligible if I~ol>__sl~'(u)I
4(u)_
Aw
Ridge Points Let us suppose that a(t) and 05'(t) have small variations over intervals of size s and that ~b'(t) >_ A w / s so that the corrective term e(u,~) in (4.75) can be neglected. Since I&(~o)l is maximum at co -- 0, (4.75) shows that for each u the spectrogram [Sf(u,~)[ 2 -[(f,g,,u,e)[ 2 is maximum at ~(u) -- ~b'(u). The corresponding time-frequency points (u,{(u)) are called ridges. At ridge points, (4.75) becomes
S f (u,{) - --~x/-j a(u) exp(i[qS(u) - {u]) ( ~ ( 0 ) + e(u,{))
(4.89)
98
CHAPTERIV TIMEMEETSFREQUENCY
Theorem 4.5 proves that the e(u,~) is smaller at a ridge point because the first order term Ca,1 becomes negligible in (4.79). This is shown by verifying that ID'(2s~'(u))l is negligible when s~'(u) >_ Aaj. At ridge points, the second order terms Ca,2 and %2 are predominant in e(u,~). The ridge frequency gives the instantaneous frequency ~(u) = q$'(u) and the amplitude is calculated by a(u) -
Is f
2
l.
v l (0)l
(4.90)
Let ~s(u,{) be the complex phase of Sf(u, Cs). If we neglect the corrective term, then (4.89) proves that ridges are also points of stationary phase: =
Ou Testing the stationarity of the phase locates the ridges more precisely.
Multiple Frequencies When the signal contains several spectral lines whose frequencies are sufficiently apart, the windowed Fourier transform separates each of these components and the ridges detect the evolution in time of each spectral component. Let us consider
f(t)
= al (t)cos~l (l) + a2(t)cos ~2(t),
where ak (t) and ~b'k(t) have small variations over intervals of size s and s~'k(t ) >_ Aco. Since the windowed Fourier transform is linear, we apply (4.75) to each spectral component and neglect the corrective terms:
Sf(u,~)
=
v - al (u) ~(s[{ -- qSPl(u)]) exp(i[~bl (u) -- ~u]) 2 +--~- a2(u) g(s[~ -- q52(u)] ) exp(i[q52 (u) -- ~u]).
(4.91)
The two spectral components are discriminated if for all u ~(slqS'l(u) - qS~(u) I) << 1,
(4.92)
which means that the frequency difference is larger than the bandwidth of ~(saJ)"
Z2k~
105'1(u) - qS~(u) l ___~ .
s
(4.93)
In this case, when ( - q$~(u), the second term of (4.91) can be neglected and the first term generates a ridge point from which we may recover q$~(u) and al (u), using (4.90). Similarly, if ~ - q$~(u) the first term can be neglected and we have a second ridge point that characterizes q$~(u) and a2(u). The ridge points are
4.4 INSTANTANEOUSFREQUENCY
99
FIGURE 4.12 Larger amplitude ridges calculated from the spectrogram in Figure 4.3. These ridges give the instantaneous frequencies of the linear and quadratic chirps, and of the low and high frequency transients at t = 0.5 and t = 0.87. distributed along two time-frequency lines ~(u) - qS'1(u) and ~(u) - qS~(u). This result is valid for any number of time varying spectral components, as long as the distance between any two instantaneous frequencies satisfies (4.93). If two spectral lines are too close, they interfere, which destroys the ridge pattern. Generally, the number of instantaneous frequencies is unknown. We thus detect all local maxima of ]Sf(u,~)l 2 which are also points of stationary phase o~(u,~) ~, ou -- (u) - ~ - 0. These points define curves in the (u ~) planes that are the ridges of the windowed Fourier transform. Ridges corresponding to a small amplitude a(u) are often removed because they can be artifacts of noise variations, or "shadows" of other instantaneous frequencies created by the side-lobes of ~(~). Figure 4.12 displays the ridges computed from the modulus and phase of the windowed Fourier transform shown in Figure 4.3. For t E [0.4,0.5], the instantaneous frequencies of the linear chirp and the quadratic chirps are close and the frequency resolution of the window is not sufficient to discriminate them. As a result, the ridges detect a single average instantaneous frequency. Choice of Window The measurement of instantaneous frequencies at ridge points is valid only if the size s of the window gs is sufficiently small so that the second order terms Ca,2 and ee,2 in (4.77,4.78) are small: sup
s 2 la~(t) l
It-ul<_s/2 lak.(u)l
<< 1 and
sup
s2lqS~(t)1%< 1.
It-uJ<_s/2
(4.94)
On the other hand, the frequency bandwidth A ~ / s must also be sufficiently small to discriminate consecutive spectral components in (4.93). The window scale s must therefore be adjusted as a trade-off between both constraints. Table 4.1 gives the spectral parameters of several windows of compact support. For instantaneous frequency detection, it is particularly important to ensure that has negligible side-lobes at +~0, as illustrated by Figure 4.4. The reader can verify
100
CHAPTER IV TIMEMEETSFREQUENCY
FIGURE 4.13 Sum of two parallel linear chirps. (a): Spectrogram P s f ( u , ~ ) = I S f ( u , ~)12. (b): Ridges calculated from the spectrogram.
with (4.75) that these side-lobes "react" to an instantaneous frequency ~b~(u) by creating shadow maxima of ISf(u,~)l 2 at frequencies ~ --- qr q-w0. The ratio of the amplitude of these shadow maxima to the amplitude of the main local maxima at ~ = ~b'(u) is I ( 0)12 They can be removed by thresholding or by testing the stationarity of the phase.
Example 4.13 The sum of two parallel linear chirps f (t) - al cos(bt 2 + ct) + a2 cos(bt 2)
(4.95)
has two instantaneous frequencies qS~(t) - 2bt § c and qS~(t) - 2bt. Figure 4.13 gives a numerical example.
I 01
4.4 INSTANTANEOUSFREQUENCY
The window gs has enough frequency resolution to discriminate both chirps if A~ - Ic[ _ ~ . s
I~'~ (t) - ~ ( t ) [
(4.96)
its time support is small enough compared to their time variation if s 2 I~'/(u)l = s 2 I ~ ( u ) l -
2 b s 2 << 1.
(4.97)
Conditions (4.96) and (4.97) prove that we can find an appropriate window g if and only if C >> Aa;. (4.98) v~ Since g is a smooth window with a support [ - 1 / 2 , 1 / 2 ] , its frequency bandwidth A ~ is on the order of 1. The linear chirps in Figure 4.13 satisfy (4.98). Their ridges are computed with the truncated Gaussian window of Table 4.1, with s - 0.5.
Example 4.14 The hyperbolic chirp / ( t ) -- cos
(~ /3-t
for 0 < t 3 has an instantaneous frequency ~'(t) -
OL (9-t)~'
which varies quickly when t is close to/3. The instantaneous frequency of hyperbolic chirps goes from 0 to +c~ in a finite time interval. This is particularly useful for radars. These chirps are also emitted by the cruise sonars of bats [ 154]. The instantaneous frequency of hyperbolic chirps cannot be estimated with a windowed Fourier transform because for any fixed window size the instantaneous frequency varies too quickly at high frequencies. When u is close enough to/3 then (4.94) is not satisfied because S2OL S21(gt(u)[- (/~__U) 3 > 1. Figure 4.14 shows a signal that is a sum of two hyperbolic chirps: f ( t ) - alcos
(o,) /3i-t
+ a2 cos
/~2-t
'
(4.99)
with/31 - 0.68 and/32 - 0.72. At the beginning of the signal, the two chirps have close instantaneous frequencies that are discriminated by the windowed Fourier ridge computed with a large size window. When getting close to /31 and/32, the instantaneous frequency varies too quickly relative to the window size. The resulting ridges cannot follow these instantaneous frequencies.
102
CHAPTER IV TIME MEETS FREQUENCY
FIGURE 4.14 Sum of two hyperbolic chirps. (a): Spectrogram P s f ( u , ( ) . (b): Ridges calculated from the spectrogram
4.4.2
Wavelet Ridges
Windowed Fourier atoms have a fixed scale and thus cannot follow the instantaneous frequency of rapidly varying events such as hyperbolic chirps. In contrast, an analytic wavelet transform modifies the scale of its time-frequency atoms. The ridge algorithm ofDelprat et al. [ 154] is extended to analytic wavelet transforms to accurately measure frequency tones that are rapidly changing at high frequencies. An approximately analytic wavelet is constructed in (4.60) by multiplying a window g with a sinusoidal wave:
~(t) = g(t) exp(ir/t). As in the previous section, g is a symmetric window with a support equal to [ - 1 / 2 , 1 / 2 ] , and a unit norm Ilgll - 1. Let Aw be the bandwidth of ~ defined in
4.4
103
INSTANTANEOUSFREQUENCY
(4.88). If ~7 > Aaj then Vco < 0 , ~(co) - ~ ( c o - r/) << 1. The wavelet ~b is not strictly analytic because its Fourier transform is not exactly equal to zero at negative frequencies. Dilated and translated wavelets can be rewritten
1 (tu) ~s
~2u,s(t) - - ~ ~
-- gs,u,~(t)exp(-i~u) ,
with ~ = rl/s and
The resulting wavelet transform uses time-frequency atoms similar to those of a windowed Fourier transform (4.74) but in this case the scale s varies over R + while
Wf(u,s) = (f ,~u,s)= (f ,g,,u,~)exp(i~u). Theorem 4.5 computes (f, gs,u,~) when f(t) = a(t)cos~b(t), which gives
Wf(u,s) - ~v~ a(u) exp[ifD(u)](~(s[~-~'(u)])+e(u,~))
.
(4.100)
The corrective term e(u, ~)is negligible if a(t) and q$'(t) have small variations over the support of ~u,s and if ~' (u) >_ Aa~/s.
Wavelet Ridges The instantaneous frequency is measured from ridges defined over the wavelet transform. The normalized scalogram defined by - P w f ( , , ~) - ]Wr( ~7
Sz, 2 f o r { - r # / s
is calculated with (4.100): _
rl
Pwf(u,~)-
1
a2
-~ (u)
Since ]~(a~)[ is maximum at aJ - 0, if we neglect e(u,~), this expression shows that the scalogram is maximum at
s(u)
= ~(u) - q$'(u).
(4.101)
The corresponding points (u, ~(u)) are called wavelet ridges. The analytic amplitude is given by
a(u) - 2 --
I (0)1
"
"Vr'l-~Pwflu~,).
(4.102)
104
CHAPTER IV TIME MEETS FREQUENCY
The complex phase of W f ( u , s )
in (4.100) is ~ w ( u , ~ ) = q~(u). At ridge points,
O,~w(u,~) = Ou
~b'(u)--~.
(4.103)
When ~ = ~b'(u), the first order term s calculated in (4.79) becomes negligible. The corrective term is then dominated by Ca,2 and e~,2. To simplify their expression we approximate the sup of a" and ~b" in the neighborhood of u by their value at u. Since s -- ~7/~ = rl/(9'(u), (4.77,4.78) imply that these second order terms become negligible if
r/2
la"(u)l << 1 and r/2 [fS"(u)l
I#(u)[ 2 la(u)l
[#(u)l 2 << 1.
(4.104)
The presence of ~b' in the denominator proves that a' and 4r must have slow variations if ~b' is small but may vary much more quickly for large instantaneous frequencies.
Multispectral Estimation
Suppose that f is a sum of two spectral components:
f ( t ) -- al ( t ) c o s q~l (t) + a2(t)cos q~2(t).
As in (4.92), we verify that the second instantaneous frequency q~ does not interfere with the ridge of q~] if the dilated window has a sufficient spectral resolution at the ridge scale s - r//~ - ~/4~] (u)"
~(sl+~ (u) - 4(~)1) << 1.
(4.105)
Since the bandwidth of ~(~) is A~, this means that IqS~(u) - q~(u)[ > A__~. ~ (u) -
(4.106)
Similarly, the first spectral component does not interfere with the second ridge located at s - rl/~ - ~7/~'2(u) if I~b~(u) - ~b~(u)l > A___~. ~(u) -
(4.107)
To separate spectral lines whose instantaneous frequencies are close, these conditions prove that the wavelet must have a small octave bandwidth A~/r/. The bandwidth Aw is a fixed constant, which is on the order of 1. The frequency r/is a free parameter whose value is chosen as a trade-off between the time-resolution condition (4.104) and the frequency bandwidth conditions (4.106) and (4.107). Figure 4.15 displays the ridges computed from the normalized scalogram and the wavelet phase shown in Figure 4.11. The ridges of the high frequency transient located at t - 0.87 have oscillations because of the interferences with the linear chirp above. The frequency separation condition (4.106) is not satisfied. This is also the case in the time interval [0.35,0.55], where the instantaneous frequencies of the linear and quadratic chirps are too close.
4.4
INSTANTANEOUSFREQUENCY
105
FIGURE 4.15 Ridges calculated from the scalogram shown in Figure 4.11, Compare with the windowed Fourier ridges in Figure 4.12.
FIGURE 4.16 (a): Normalized scalogram r/-l~pwf(u,~) of two parallel lineal chirps shown in Figure 4.13. (b): Wavelet ridges.
106
CHAPTER IV TIME MEETS FREQUENCY
FIGURE 4.17 (a): Normalized scalogram r]-l~pwf(u,~) of two hyperbolic chirps shown in Figure 4.14. (b): Wavelet ridges. Example 4.15 The instantaneous frequencies of two linear chirps
f(t) -- al cos(bt 2 +ct) §
2)
are not well measured by wavelet ridges. Indeed c
~](u)
bt
converges to zero when t increases. When it is smaller than A ~ / r / t h e two chirps interact and create interference patterns like those in Figure 4.16. The ridges follow these interferences and do not estimate properly the two instantaneous frequencies, as opposed to the windowed Fourier ridges shown in Figure 4.13.
Example 4.16 The instantaneous frequency of a hyperbolic chirp
f(t)-cos
(~ /3-t
107
4.5 QUADRATICTIME-FREQUENCY ENERGY
is r (t) - c~(1 - t) -2. Wavelet ridges can measure this instantaneous frequency if the time resolution condition (4.104) is satisfied: 1.]2 <<
r Ir
=
It-3l"
This is the case if I t - 31 is not too large. Figure 4.17 displays the scalogram and the ridges of two hyperbolic chirps
f(t)
-
-
alcos
(o,) /31-t
-Jr- a2 c o s
(~
/32-t
'
with/31 = 0.68 and/32 = 0.72. As opposed to the windowed Fourier ridges shown in Figure 4.14, the wavelet ridges follow the rapid time modification of both instantaneous frequencies. This is particularly useful in analyzing the returns of hyperbolic chirps emitted by radars or sonars. Several techniques have been developed to detect chirps with wavelet ridges in presence of noise [ 117, 328].
4.5
Q U A D R A T I C TIME-FREQUENCY ENERGY 1
The wavelet and windowed Fourier transforms are computed by correlating the signal with families of time-frequency atoms. The time and frequency resolution of these transforms is thus limited by the time-frequency resolution of the corresponding atoms. Ideally, one would like to define a density of energy in a time-frequency plane, with no loss of resolution. The Wigner-Ville distribution is a time-frequency energy density computed by correlating f with a time and frequency translation of itself. Despite its remarkable properties, the application of Wigner-Ville distributions is limited by the existence of interference terms. These interferences can be attenuated by a time-frequency averaging, but this results in a loss of resolution. It is proved that the spectrogram, the scalogram and all squared time-frequency decompositions can be written as a time-frequency averaging of the Wigner-Ville distribution.
4.5. I
Wigner-Ville Distribution
To analyze time-frequency structures, in 1948 Ville [342] introduced in signal processing a quadratic form that had been studied by Wigner [351] in a 1932 article on quantum thermodynamics:
Pvf(u,~) -
/~+~f (u+ -~7-)f*(u--7)e-i'r~dT. -~
(4.108)
0(3
The Wigner-Ville distribution remains real because it is the Fourier transform of f(u + r / 2 ) f * ( u - r/2), which has a Hermitian symmetry in 7-. Time and
]
08
CHAPTER IV TIME MEETS FREQUENCY
frequency have a symmetrical role. This distribution can also be rewritten as a frequency integration by applying the Parseval formula:
1 f+oo
P v f ( u , { ) - ~ J-
,7
?
[f @ + ~) [f* @ - -~) e i'rud?.
(4.109)
O0
Time-Frequen~ Support The Wigner-Ville transform localizes the timefrequency structures of f . If the energy of f is well concentrated in time around u0 and in frequency around ~0 then P v f has its energy centered at (u0, ~0), with a spread equal to the time and frequency spread of f . This property is illustrated by the following proposition, which relates the time and frequency support of P v f to the support of f and f . Proposition 4.2
9 If the support o f f is [ u 0 - T/2,uo + T/2], then for all ~ the support in u of P v f (u,~) is included in this interval. 9 If the support of ~c is [~0- A / 2 , ~0 + A/2], then for all u the support in ~ of P v f (u,() is included in this interval. Proof 2. Let f(t) = f(-t). The Wigner-Ville distribution is rewritten Pvf(u,~)--f_+~f(
r
~2u)f*(
r - 2u 2 )e-i~'~dr.
(4.110)
Suppose that f has a support equal to [u0 - T/2, uo + T/2]. The supports of f(-r/2 + u) and f (r/2 - u) are then respectively [2(u0 - u) - T, 2(u0 - u) + T] and [-2(u0 + u) - T,-2(u0 + u) + T]. The Wigner-Ville integral (4.110) shows that Pvf(u,~) is non-zero if these two intervals overlap, which is the case only if lu0 - u I < T. The support of Pvf (u, ~) along u is therefore included in the support of f. If the support of f is an interval, then the same derivation based on (4.109) shows that the support of Pvf(u,() along ~ is included in the support of f. m E x a m p l e 4.17 Proposition 4.2 proves that the Wigner-Ville distribution does not spread the time or frequency support of Diracs or sinusoids, unlike windowed Fourier and wavelet transforms. Direct calculations yield
P v f (u,~) - 6 ( t - uo) ,
f(t)--6(u-uo)
1
f (t) -- exp(i~ot)
P v f (u,{) -- ~ 6(~ - ~o) .
(4.111) (4.112)
E x a m p l e 4.18 If f is a smooth and symmetric window then its Wigner-Ville distribution Pvf(u, ~) is concentrated in a neighborhood of u - ~ - 0. A Gaussian f (t) - (a 27r) - 1/4 e x p ( - t 2/ (2a 2) ) is transformed into a two-dimensional Gaussian because its Fourier transform is also a Gaussian (2.32) and one can verify that 1 exp ( - u 2-
Pvf(u,{)- 7
-fi --0"2~ 2) .
(4.113)
4.5
109
QUADRATICTIME-FREQUENCY ENERGY
In this particular case P v f ( u , { ) - I f ( u ) 1 2 l f ( { ) l 2. The Wigner-Ville distribution has important invariance properties. A phase shift does not modify its value: (4.114)
g(t) = e ir g(t) ==> P v f ( u , ~ ) = Pvg(u,~) .
When f is translated in time or frequency, its Wigner-Ville transform is also translated: f ( t ) = g ( t - uo)
--->
P v f ( u , { ) = P v g ( u - uo,{) ,
(4.115)
f ( t ) = exp(i{ot)g(t)
>
P v f ( u , { ) = P v g ( u , { - {o).
(4.116)
If f is scaled by s and thus f is scaled by 1/s then the time and frequency parameters of P v f are also scaled respectively by s and 1/s
1 (t)
f(t) = -~ g s
==~ n v f ( u , ~ ) -- n v f
(
)
Us'~s
"
(4.117)
Example 4.19
If g is a smooth and symmetric window then Pvg(u,~) has its energy concentrated in the neighborhood of (0, 0). The time-frequency atom a
fo(t) -- ~
exp(iqSo) f (t-sUO) exp(i{ot) .
has a Wigner-Ville distribution that is calculated with (4.114), (4.115) and (4.116): P v f o(u,~) -- la[ 2Pvg u - us o ' s(~-~o))
9
(4.118)
Its energy is thus concentrated in the neighborhood of (u0, ~0), on an ellipse whose axes are proportional to s in time and 1/s in frequency. Instantaneous Frequency Ville's original motivation for studying time-frequency decompositions was to compute the instantaneous frequency of a signal [342]. Let fa be the analytic part of f obtained in (4.69) by setting to zero f(c~) for co < 0. We write fa(t) = a(t) exp[i~b(t)] to define the instantaneous frequency w(t) = dJ(t). The following proposition proves that ~b'(t) is the "average" frequency computed relative to the Wigner-Ville distribution P v f a .
Proposition 4.3
If f a(t)
:
a(t) exp[i~b(t)] then f+~.c ~Pvfa(U,~)d~
(4.119)
I I0
CHAPTER IV TIME MEETSFREQUENCY
Proof 2. To prove this result, we verify that any function g satisfies
f fg(u+2)g* ( u - 2 ) exp(-ir~)d~dr= -Tri [g'(u)g*(u)-g(u)g*'(u)]. (4.120) This identity is obtained by observing that the Fourier transform of i( is the derivative of a Dirac, which gives an equality in the sense of distributions:
f T ~ exp(--ir~)d~ -- --i2rc6'(r). Since f+~ a'(r)h(r) -- -h'(O), inserting h(r) -- g(u + r/2) g*(u - r/2) proves (4.120). If g(u) = fa(U) = a(u) exp[ir then (4.120) gives
f7
~Pvf a(U'~)d~ = 27ra2(u)dp'(u).
We will see in (4.124) that Ifa(u)l 2 - f+~ Pvfa(U,~)d~, and since Ifa(u)l 2 -- a(u) 2 we derive (4.119). I This proposition shows that for a fixed u the mass of Pvfa(U,~) is typically concentrated in the neighborhood of the instantaneous frequency ~ = d?'(u). For example, a linear chirp f(t) = exp(iat 2) is transformed into a Dirac located along the instantaneous frequency ~ -- ~b'(u) = 2au:
P v f (u,~) = 6(~ - 2au). Similarly, the multiplication of f by a linear chirp exp(iat 2) makes a frequency translation of P v f by the instantaneous frequency 2au:
f(t) -- exp(iat 2) g(t) ~
(4.121)
Pvf(u,~) -- P v g ( u , ~ - 2au) .
Energy Density The Moyal [275] formula proves that the Wigner-Ville transform is unitary, which implies energy conservation properties. T h e o r e m 4.6 (MOYAL) For any f and g in L 2 (N)
f(t) g*(t)dt
- ~
(4.122)
Pvf(u,~)Pvg(u,~)dud~.
Proof 1. Let us compute the integral
f f Pv (u, ~) f
Pv g(u, ~) dud~ \
~xp [-/r
/
+ .')] d. d.' dude.
4.5 QUADRATIC TIME-FREQUENCY ENERGY
I I I
The Fourier transform of h(t) = 1 is h(~) = 27r6(~), which means that we have a distribution equality f exp[-i~(r + r')]d~ = 27rr(-r + "r'). As a result, I
=
2rr
/IS( "),*( f
u+~
( "),( ")
u-~
g u+-~
u--~
5('r+'r')drdr'du
_ 2,iS.(,+7).,(,_7),(,_7),,(u+7),,,u. The change of variable t = u + 7-/2 and t' = u - r / 2 yields (4.122).
m
One can consider }f(t)l 2 and Ij?(co)12/(27r) as energy densities in time and frequency that satisfy a conservation equation: L/(t)l 2 dt - ~
II/112 -
Ij?(~)l ~ d~. O(3
(3O
The following proposition shows that these time and frequency densities are recovered with marginal integrals over the Wigner-Ville distribution. Proposition 4.4 For any f E L2(R)
f and
If(~)l 2,
+~Pvf(u,~)du-
(4.123)
CX3
1 ~_+oo 27r
Pvf(u,~)d~-
L/(u)l 2.
(4.124)
OO
Proof 1. The frequency integral (4.109) proves that the one-dimensional Fourier transform of g~(u) = Puf(u,~) with respect to u is
3' We derive (4.123) from the fact that is ~,~(0) =
g~(u)du. oo
Similarly, (4.108) shows that P v f ( u , { ) is the one-dimensional Fourier transform of f (u + r/2)f* (u- r/2) with respect to r, where { is the Fourier variable. Its integral in ~ thus gives the value for r = 0, which is the identity (4.124). II This proposition suggests interpreting the Wigner-Ville distribution as a joint timefrequency energy density. However, the Wigner-Ville distribution misses one fundamental property of an energy density: positivity. Let us compute for example the Wigner-Ville distribution of f = l[-r,r] with the integral (4.108):
P v f ( u , ~ ) --
2sin(2(T~
]ul)~) l[_r,r] (U).
I 12
CHAPTER IV TIME MEETSFREQUENCY
It is an oscillating function that takes negative values. In fact, one can prove that translated and frequency modulated Gaussians are the only functions whose Wigner-Ville distributions remain positive. As we will see in the next section, to obtain positive energy distributions for all signals, it is necessary to average the Wigner-Ville transform and thus lose some time-frequency resolution.
4.5.2
Interferences and Positivity
At this point, the Wigner-Ville distribution may seem to be an ideal tool for analyzing the time-frequency structures of a signal. This is however not the case because of interferences created by the quadratic properties of this transform. These interferences can be removed by averaging the Wigner-Ville distribution with appropriate kernels which yield positive time-frequency densities. However, this reduces the time-frequency resolution. Spectrograms and scalograms are examples of positive quadratic distributions obtained by smoothing the Wigner-Ville distribution. Cross Terms Let f = f l + f2 be a composite signal. Since the Wigner-Ville distribution is a quadratic form,
Pvf = Pvf l + P v f 2 +Pv[f l , f 2] +Pv[f 2,f l], where
(4.125)
Pv[h, g] is the cross Wigner-Ville distribution of two signals ev[h,g](u,~) -
h (u + -~) g* (U- -~) e -i~-~dT-.
(4.126)
The interference term
l[fl, f2] = Pg[fl, f2] + Pv[f2, fl] is a real function that creates non-zero values at unexpected locations of the (u, ~) plane. Let us consider two time-frequency atoms defined by f l ( t ) = a l e ir
g(t--ul)e i(lt and f e ( t ) = a 2 e ir g(t-u2)e i&t,
where g is a time window centered at t = 0. Their Wigner-Ville distributions computed in (4.118) are
Pvf l(u,~) - a2pvg(u--ul,~--~l) and Pvf 2(u,~) -- a2pvg(u-u2,~-~2). Since the energy of Pvg is centered at (0, 0), the energy of Pvfl and Pvf2 is concentrated in the neighborhoods of (u1,~1) and (u2,~2) respectively. A direct calculation verifies that the interference term is
I[fl, f2] (u, ~) -- 2ala2 Pvg(u - uo,~ - ~0)cos ((u - uo)A~ - (~ - ~o)Au + AqS)
4.5
I 13
QUADRATICTIME-FREQUENCY ENERGY
FIGURE 4.18 Wigner-Ville distribution P v f ( u , ~ ) of two Gabor atoms shown at the top. The oscillating interferences are centered at the middle time-frequency location.
with
Ul + U2 ~1 "q-~2 ~ ~0-2 2 AU--Ul--U2 , A ~ - - ~ l - ~ 2 U0--
It is an oscillatory waveform centered at the middle point (uo,~o). This is quite counter-intuitive since f and f have very little energy in the neighborhood of u0 and ~0. The frequency of the oscillations is proportional to the Euclidean distance v/A~ 2 + Au 2 of (Ul ,~1) and (U2,~2). The direction of these oscillations is perpendicular to the line that joins (ul ,~1) and (u2, ~2). Figure 4.18 displays the Wigner-Ville distribution of two atoms obtained with a Gaussian window g. The oscillating interference appears at the middle time-frequency point. This example shows that the interference I [ f l , f z ] ( u , ~ ) has some energy in regions where If(u)l 2 ~ 0 and If(~) ]2 ~ 0. These interferences can have a complicated structure [26, 211 ] but they are necessarily oscillatory because the marginal integrals (4.123) and (4.124) vanish:
P v f ( u , ~ ) d ~ - 27r]f(u)l 2 ,
Pvf(u, )du
2.
O(3
Analytic Part Interference terms also exist in a real signal f with a single instantaneous frequency component. Let fa(t) - a(t) exp[iq~(t)] be its analytic part: 1 f - Real[fa] - ~ (fa -k- fa)"
I 14
CHAPTER IV TIME MEETSFREQUENCY
FIGURE 4.19 The bottom displays the Wigner-Ville distribution the analytic part of the top signal.
Pvfa(U,~) of
Proposition 4.3 proves that for fixed u, Pvfa(U,~) and Pvfa(U,~) have an energy concentrated respectively in the neighborhood of ~1 = 4r and ~2 = -~'(u). Both components create an interference term at the intermediate zero frequency ~0 = (~1 + ~2)/2 = 0. To avoid this low frequency interference, we often compute Pvfa as opposed to Pvf. Figure 4.19 displays Pvfa for a real signal f that includes a linear chirp, a quadratic chirp and two isolated time-frequency atoms. The linear and quadratic chirps are localized along narrow time frequency lines, which are spread on wider bands by the scalogram and the scalogram shown in Figure 4.3 and 4.11. However, the interference terms create complex oscillatory patterns that make it difficult to detect the existence of the two time-frequency transients at t = 0.5 and t = 0.87, which clearly appear in the spectrogram and the scalogram. Pasitivity Since the interference terms include positive and negative oscillations, they can be partly removed by smoothing Pvf with a kernel 0:
Pof (u, ~) --
iTJ +- Pv f (u', ~') O(u, u', ~, ~') du' d~'.
(4.127)
(X)
The time-frequency resolution of this distribution depends on the spread of the kernel 0 in the neighborhood of (u, (). Since the interferences take negative values, one can guarantee that all interferences are removed by imposing that this timefrequency distribution remain positive Pof(u,() >_0 for all (u,() C ]t~2. The spectrogram (4.12) and scalogram (4.55) are examples of positive timefrequency energy distributions. In general, let us consider a family of timefrequency atoms {4~7}7~v. Suppose that for any (u,() there exists a unique atom
I 15
4.5 QUADRATICTIME-FREQUENCYENERGY
r centered in time-frequency at (u,~). The resulting time-frequency energy density is P f ( u , ~ ) - [(f,r 2. The Moyal formula (4.122) proves that this energy density can be written as a time-frequency averaging of the Wigner-Ville distribution 1
Pf( u,~) - - ~--~ The smoothing kernel is the Wigner-Ville distribution of the atoms 1
O(u, u', ~, ~') = -~ PvO.y(u,~) (u', ~'). The loss of time-frequency resolution depends on the spread of the distribution PvC~(u,~) (u', ~') in the neighborhood of (u, v). Example 4.20 A spectrogram is computed with windowed Fourier atoms r
(t) - g(t - u)e i s
.
The Wigner-Ville distribution calculated in (4.118) yields 1
1
O(u,u',~,~')- -}-~Pvr
~--~Pvg(u'-u,~'-~).
(4.129)
For a spectrogram, the Wigner-Ville averaging (4.128) is therefore a twodimensional convolution with Pvg. If g is a Gaussian window, then Pvg is a twodimensional Gaussian. This proves that averaging P v f with a sufficiently wide Gaussian defines a positive energy density. The general class of time-frequency distributions obtained by convolving P v f with an arbitrary kernel 0 is studied in Section 4.5.3. Example 4.21 Let r be an analytic wavelet whose center frequency is rl. The wavelet atom ~2u,s(t) = s-1/2~((t- u)/s) is centered at (u,~ = ~7/s) and the scalogram is defined by
Pwf(u,~) = I(f ,~u,s)l 2 for ~ = ~/s. Properties (4.115, 4.117) prove that the averaging kernel is
O(u, u', ~, ~') -- ~ Pvr
s
'
-- ~ Pv~2
(u' - u),
Positive time-frequency distributions totally remove the interference terms but produce a loss of resolution. This is emphasized by the following theorem, due to Wigner [352].
| 16
CHAPTER IV TIME MEETSFREQUENCY
T h e o r e m 4.7 (~IGNER) There is no positive quadratic energy distribution P f that
satisfies Pf(u,C~)dC~- 27r If(u)l 2 and O(3
Pf(u,{)du-
I)c(~)[ 2.
(4.130)
O0
Proof z. Suppose that P f is a positive quadratic distribution that satisfies these marginals. Since Pf(u,{) >_O, the integrals (4.130) imply that if the support of f is included in an interval I then Pf(u,{) = 0 for u ~ I. We can associate to the quadratic form P f a bilinear distribution defined for any f and g by P[I, g] = ~ P ( I + g) - P ( f - g) . Let f l and f2 be two non-zero signals whose supports are two intervals I~ and/2 that do not intersect, so that fl f2 = 0. Let f = a fl nt- b f2:
e f = lalZPf l +ab*P[f l,f2] +a*bP[fz,f l] + Ibl2pf2. Since/1 does not intersect h, Pfl (u,~) = 0 for u E/2. Remember that Pf(u,~) >_0 for all a and b so necessarily e[fl, f2] (u, ~) = e[f2, f~](u, ~) = 0 for u C/2. Similarly we prove that these cross terms are zero for u E ll and hence
P f (u,~) = lal 2 P f l (u,~) + Ibl 2 P f 2(u,~). Integrating this equation and inserting (4.130) yields 1~(~)12 =
a[2 [~c 1 (~)12
nt-
[b[21~2(~)12.
Since )~(~) = a f l (~) + b f2(~) it follows that f l (~) f2(~) = 0. But this is not possible because f l and f2 have a compact support in time and Theorem 2.6 proves that f l and f2 are C ~ functions that cannot vanish on a whole interval. We thus conclude that one cannot construct a positive quadratic distribution P f that satisfies the marginals (4.130). II
4.5.3
Cohen's Class z
While attenuating the interference terms with a smoothing kernel 0, we may want to retain certain important properties. Cohen [135] introduced a general class of quadratic time-frequency distributions that satisfy the time translation and frequency modulation invariance properties (4.115) and (4.116). If a signal is translated in time or frequency, its energy distribution is just translated by the corresponding amount. This was the beginning of a systematic study of quadratic time-frequency distributions obtained as a weighted average of a Wigner-Ville distribution [ 10, 26, 136, 210]. Section 2.1 proves that linear translation invariant operators are convolution products. The translation invariance properties (4.115, 4.116) are thus equivalent to imposing that the smoothing kernel in (4.127) be a convolution kernel
O(u,u',~,~') = O(u - u',~ - ~'),
(4.131)
4.5
I 17
QUADRATICTIME-FREQUENCYENERGY
and hence
Pof(u,~) = Pvf *O(u,~) - f /O(u - u',~ - ~')Pvf(u',~')du' d~'.
(4.132)
The spectrogram is an example of Cohen's class distribution, whose kernel in (4.129) is the Wigner-Ville distribution of the window
O(u,{) -- ~ Pvg(u,{) -- ~
g
-~
-~) e -ire dT-.
(4.133)
Ambiguity Function The properties of the convolution (4.132) are more easily studied by calculating the two-dimensional Fourier transform of Pvf(u,~) with respect to u and ~. We denote by Af(r,"7) this Fourier transform
A f (r, "7) --
f+oof+ooPv f (u, ~) O0
exp[-i(u"7 +
~r)] dud~.
OO
Note that the Fourier variables "r and "7are inverted with respect to the usual Fourier notation. Since the one-dimensional Fourier transform of Pvf(u, Cs)with respect to u is f(~ +"7/2)0f*(~-"7/2), applying the one-dimensional Fourier transform with respect to ~ gives '7 ]fi* @_ _~)e '7 -ir~ d~. Af(T,'7) - f+c~ @ + _~)
(4.134)
The Parseval formula yields
Af(T,'7)-
f (u-+--~) f* (u-- -~)e-i'yUdu.
(4.135)
We recognize the ambiguityfunction encountered in (4.24) when studying the timefrequency resolution of a windowed Fourier transform. It measures the energy concentration of f in time and in frequency.
Kernel Properties
The Fourier transform of
O(T,"7) --
J+L7O(U,Cs)
O(u,~) is
exp[--i(u7 +
csr)] dud{.
O0
As in the definition of the ambiguity function (4.134), the Fourier parameters 7and 3, of 0 are inverted. The following proposition gives necessary and sufficient conditions to ensure that Po satisfies marginal energy properties like those of the Wigner-Ville distribution. The Wigner Theorem 4.7 proves that in this case Pof (u, ~) takes negative values.
| I~
CHAPTER IV TIME MEETSFREQUENCY
P r o p o s i t i o n 4.5
For all f E L 2 (]~)
f+oo P o f ( u , { ) d { -
2rr If(u)l 2 ,
OO
.~_+~ Pof(u,{)du-
Ij?(~)l 2 ,
(4.136)
0(3
if and only if
V(T, ")/) E ]1~2 , O(T, O) -- 0(0, ")') -- |.
Proof 2.
Let Aof (r, "3')be the two-dimensional Fourier transform of Fourier integral at (0, q,) gives
(4.137)
Pof (u, ~).
f + ~ f ~~Pof(u,~)e-iu~d~du-Aof(O,~/).
The
(4.138)
Since the ambiguity functionAf(r, 3') is the Fourier transform of Pvf(u,(), the twodimensional convolution (4.132) gives
Ao(r, ")') = A f (r, "7)O(r,"Y).
(4.139)
The Fourier transform of 2rrlf(u)l 2 is f - f ( 7 ) , with 5?(-y)- f*(-3'). The relation (4.138) shows that (4.136) is satisfied if and only if
Aof(O,')')Since
Pvf
Af(O,")') 0(0,'7) -- j r , ~ ( 7 ) .
(4.140)
satisfies the marginal property (4.123), we similarly prove that
A f (O,'T) -- ]f *-~('T). Requiring that (4.140) be valid for any j?(-),), is equivalent to requiting that 0(0, 3') ---- 1 for all 3' E Ii~. The same derivation applied to the other marginal integration yields 0(~,0) = 1. m In addition to requiring time-frequency translation invariance, it may be useful to guarantee that Po satisfies the same scaling property as a Wigner-Ville distribution: 1
t
--->, Pog(u,~) - Pof (U,s~) . s
Such a distribution Po is affine invariant. One can verify (Problem 4.15) that affine invariance is equivalent to imposing that VsEIR + ,
O(su,~)-O(u,~),
and hence
o(~,~) = o ( ~ , 1) = 9(u~).
(4.141)
4.5 QUADRATICTIME-FREQUENCY ENERGY
I 19
FIGURE 4.20 Choi-William distribution Pof(u,~) of the two Gabor atoms shown at the top. The interference term that appears in the Wigner-Ville distribution of Figure 4.18 has nearly disappeared.
FIGURE 4.21 Choi-William distribution Pofa(U,~) of the analytic part of the signal shown at the top. The interferences remain visible.
120
CHAPTER IV TIME MEETS FREQUENCY
Example 4.22 The Rihaczek distribution is an affine invariant distribution whose convolution kernel is 0(7", 7 ) - exp ( V )
9
(4.142)
A direct calculation shows that
Pof(u,{) - f(u) ~*(~c)exp(_iu~C). Example 4.23 The kernel of the 0(7-, 7)
(4.143)
Choi-Williamdistribution is [122] -
exp( - a 2 7-2,),2).
(4.144)
It is symmetric and thus corresponds to a real function O(u,(). This distribution satisfies the marginal conditions (4.137). Since limos0 0(7-, 7) -- 1, when a is small the Choi-William distribution is close to a Wigner-Ville distribution. Increasing cr attenuates the interference terms, but spreads O(u,(), which reduces the timefrequency resolution of the distribution. Figure 4.20 shows that the interference terms of two modulated Gaussians nearly disappear when the Wigner-Ville distribution of Figure 4.18 is averaged by a Choi-William kernel having a sufficiently large a. Figure 4.21 gives the Choi-William distribution of the analytic signal whose Wigner-Ville distribution is in Figure 4.19. The energy of the linear and quadratic chirps are spread over wider time-frequency bands but the interference terms are attenuated, although not totally removed. It remains difficult to isolate the two modulated Gaussians at t = 0.5 and t = 0.87, which clearly appear in the spectrogram of Figure 4.3. 4.5.4
Discrete Wigner-Ville Computations 2
The Wigner integral (4.108) is the Fourier transform of f(u
Pvf(u,~)--
f+c~f (U+-~) f* (u T
_
+ 7./2)f*(u- 7-/2)"
-~) e-ir(dT. T
(4.145)
O0
For a discrete signal discrete sum:
f[n] defined over 0 ___n <
N-1 Pvf[n,k]- E f[n p---N
N, the integral is replaced by a
+ P] f* [ n - P] exp
(-i27rkp) N
(4.146)
When p is odd, this calculation requires knowing the value of f at half integers. These values are computed by interpolating f , with an addition of zeroes to its Fourier transform. This is necessary to avoid the aliasing produced by the discretization of the Wigner-Ville integral [ 126].
4.6 PROBLEMS
12 1
The interpolation f of f is a signal of size 2N whose discrete Fourier transform f is defined from the discrete Fourier transform f of f by 2f[k]
if 0 <_ k < N / 2
-'-
0
if N / 2 < k < 3N/2
f[k]-
2of[k-N]
if 3N/2 < k < 2N
fiN/2]
if k - N / 2 , 3N/2
Computing the inverse discrete Fourier transform shows that f [ 2 n ] - f[n] for n E [ 0 , N - 1]. When n ~ [O,2N- 1], we set f[n] - O. The Wigner summation (4.146) is calculated from f" .,
Pvf[n,~]
-
j?[2n + p] y*[2n- p] exp
~
N
p=-N 2N-1
=
Z
f[2n 4- p - N] f* [2n - p 4- N] exp
(-i27r(2k)p) 2N
"
p--0
For 0 < n < N fixed, Pvf[n,k] is the discrete Fourier transform of size 2N of g[p] - f[2n 4- p - N] f* [2n - p 4- N] at the frequency 2k. The discrete WignerVille distribution is thus calculated with N FFT procedures of size 2N, which requires O(N 2 logN) operations. To compute the Wigner-Ville distribution of the analytic part fa of f , we use (4.48). Cohen's Class A Cohen's class distribution is calculated with a circular convolution of the discrete Wigner-Ville distribution with a kernel O[p, q]"
Po[n,k] -Pv|
(4.147)
Its two-dimensional discrete Fourier transform is therefore
Ao[p,q] - A f[p,q] 0[p,q].
(4.148)
The signal Af[p,q] is the discrete ambiguity function, calculated with a twodimensional FFT of the discrete Wigner-Ville distribution Pvf[n,k]. As in the case of continuous time, we have inverted the index p and q of the usual twodimensional Fourier transform. The Cohen's class distribution (4.147) is obtained by calculating the inverse Fourier transform of (4.148). This also requires a total of O(N 2 logN) operations. 4.6
PROBLEMS 4.1. 1 Instantaneous frequency Let f(t) = exp[iq~(t)]. (a) Prove that f+~ ISf(u,~)l 2d~ - 27r. Hint: Sf(u,~) is a Fourier transform; use the Parseval formula.
122
CHAPTER IV TIME MEETS FREQUENCY
(b) Similarly, show that
f+~lSf(u,~).2d~-
27r f+~cff (t) lg(t-u),2dt,
and interpret this result. 4.2.
1 Write a reproducing kernel equation for the discrete windowed Fourier transform Sf[m, I] defined in (4.27).
4.3.
1 When g(t)= Ag('r,"g). 1 Let g[n] be a
4.4.
4.5.
(Tra2) -1/4 exp(-t2/(2cr2)), compute the ambiguity function
window with L non-zero coefficients. For signals of size N, describe a fast algorithm that computes the discrete windowed Fourier transform (4.27) with O(Nlog2 L) operations. Implement this algorithm in WAVELAB. Hint: Use a fast overlap-add convolution algorithm. 1 Let K be the reproducing kernel (4.21) of a windowed Fourier transform. (a) For any (I, E L2(It{2) we define:
T~b(Uo,~o) - -~l f Y f 7
~(u, { ) K (uo, U,~o, { ) dud{.
Prove that T is an orthogonal projector on the space of functions ~b(u,{) that are windowed Fourier transforms of functions in Lz(R). /
(b) Suppose that for all (u,{) E R 2 we are given
\
Sf(u,{)- Q(Sf(u,{)), \
/
which is a quantization of the windowed Fourier coefficients. How can we reduce the norm L2(/R 2) of the quantification error e(u, {) = S f ( u , { ) -
Q(Sf(u,~)) ? 4.6.
1 Prove that a scaling function q$ defined by (4.42) satisfies I1~11 - 1,
4.7. 2 Let ~ be a real and even wavelet such that C = f + ~ Prove that vZ E Lz(N) 4.8.
-1 +(co) d ~
ds . , f(t) -- ~1 f0 +~ Wf(t , s) s3/2
< +oo.
(4.149)
1 Analytic Continuation Let f E Lz(N) be a function such that f(co) = 0 for co < 0. For any complex z C C such that Im(z) _> 0, we define
f(P) (z) -- --7r 1 J0"+~ (i~) p f(aJ)e iz~daJ. (a) Verify that if f is C p then f(P)(t) is the derivative of order p of f(t). (b) Prove that iflm(z) > 0, then f(P) (z) is differentiable relative to the complex variable z. Such a function is said to be analytic on the upper half complex plane. (c) Prove that this analytic extension can be written as a wavelet transform
f(P) (x + iy)
= y-p-l~2
Wf(x, y) ,
calculated with an analytic wavelet ~ that you will specify.
4.6 PROBLEMS
4.9.
12]
1 Let f(t) = cos(acosbt). We want to compute precisely the instantaneous frequency of f from the ridges of its windowed Fourier transform. Find a necessary condition on the window support as a function of a and b. If f(t) = cos(acosbt) -t-cos(acosbt +ct), find a condition on a, b and c in order to measure both instantaneous frequencies with the ridges of a windowed Fourier transform. Verify your calculations with a numerical implementation in WAVELAB.
4.10. 1 Sound manipulation (a) Make a program that synthesizes sounds with the model (4.71) where the amplitudes ak and phase qSk are calculated from the ridges of a windowed Fourier transform or of a wavelet transform. Test your results on the Tweet and Greasy signals in WAVELAB. (b) Make a program that modifies the sound duration with the formula (4.72) or which transposes the sound frequency with (4.73). 4.11.
1 Prove that Pf(u,~) = Ilfl1-2 If(u)l z I~(~)12 satisfies the marginal properties (4.123,4.124). Why can't we apply the Wigner Theorem 4.7?
4.12.
1 Let g~ be a Gaussian of variance cr2. Prove that eof(u,~) = evf*O(u,() is a positive distribution if O(u,~) = go(u)g~(~) with or/3 >_ 1/2. Hint: consider a spectrogram calculated with a Gaussian window.
4.13.
2 Let {gn(t)}neN be an orthonormal basis of L2(IR). Prove that -q-oo
V(t,w) E I~2 , E P v g n ( t , w ) I
1.
n--~O
4.14.
2 Let fa(t)
-
-
a(t) exp[iqS(t)] be the analytic part of f(t). Prove that
fT( 4.15.
(-~'(t)
P v f a(t,()d( = -Tra2(t)
d21oga(t) dt 2
2 Quadratic affine time-frequency distributions satisfy time shift (4.115), scaling invariance (4.117), and phase invariance (4.114). Prove that any such distribution can be written as an affine smoothing of the Wigner-Ville distribution
Po(u,~) =
0 ~(u-r), QO
Pv(r,'y)drd'y,
(4.150)
CO
where O(a,b) depends upon dimensionless variables. 4.16.
3 To avoid the time-frequency resolution limitations of a windowed Fourier transform, we want to adapt the window size to the signal content. Let g(t) be a window of variance 1. We denote by Sjf(u,() the windowed Fourier transform calculated with the dilated window gj(t) -- 2-J/2g(2-Jt). Find a procedure that computes a single map of ridges by choosing a "best" window size at each (u,~). One approach is to choose the scale 21 for each (u,~) such that ISlf(u,s 2 - supj Isjf(u,~)l 2. Test your algorithm on the linear and hyperbolic chirp signals (4.95,4.99). Test it on the Tweet and Greasy signals in WAVELAB.
| 24
CHAPTER IV TIMEMEETSFREQUENCY
4.17. 3 The sinusoidal model (4.71) is improved for speech signals by adding a "noise component" B(t) to the partials [245]" K
F(t) = ~ ak(t) cos ~bk(t) + B(t).
(4.151)
k--1
Given a signal f(t) that is considered to be a realization of F(t), compute the ridges of a windowed Fourier transform, find the "main" partials and compute their amplitude ak and phase ~bk. These partials are subtracted from the signal. Over intervals of fixed size, the residue is modeled as the realization of an autoregressive process B(t), of order 10 to 15. Use a standard algorithm to compute the parameters of this autoregressive process [60]. Evaluate the audio quality of the sound restored from the calculated model (4.151). Study an application to audio compression by quantizing and coding the parameters of the model.
V FRAMES
rame theory analyzes the completeness, stability and redundancy of linear discrete signal representations. A frame is a family of vectors {~bn}n~r that characterizes any signal f from its inner products { (f, c~n)}n~r. Signal reconstructions from regular and irregular samplings are examples of applications. Discrete windowed Fourier transforms and discrete wavelet transforms are studied through the frame formalism. These transforms generate signal representations that are not translation invariant, which raises difficulties for pattern recognition applications. Dyadic wavelet transforms maintain translation invariance by sampling only the scale parameter of a continuous wavelet transform. A fast dyadic wavelet transform is calculated with a filter bank algorithm. In computer vision, dyadic wavelet transforms are used for texture discrimination and edge detection.
F
5. I 5. I. I
FRAME T H E O R Y 2 Frame Definition and Sampling
The frame theory was originally developed by Duffin and Schaeffer [175] to reconstruct band-limited signals f from irregularly spaced samples {f(tn)}ncz. If f has a Fourier transform included in [-Tr/T, 7r/T], we prove as in (3.13) that
f(tn) - ~1 (f(t) h r ( t - t n ) ) '
with hT(t) - sin(Trt/T)
7rt/T
125
(5.1)
126
CHAPTER V
FRAMES
This motivated Duffin and Schaeffer to establish general conditions under which one can recover a vector f in a Hilbert space H from its inner products with a family of vectors {~b,}nzV. The index set F might be finite or infinite. The following frame definition gives an energy equivalence to invert the operator U defined by Vn C V
,
(5.2)
Uf[n] - ( f , qhn).
Definition 5.1 The sequence { ~ n } n E I ~ is a frame o f H if there exist two constants A > 0 and B > 0 such that f o r any f C I-I A
Ilfl[ 2 ~ ~--~ I12 ~ n Ilfll 2.
(5,3)
nEl-'
When A - B the frame is said to be tight.
If the frame condition is satisfied then U is called a frame operator. Section 5.1.2 proves that (5.3) is a necessary and sufficient condition guaranteeing that U is invertible on its image, with a bounded inverse. A frame thus defines a complete and stable signal representation, which may also be redundant. When the frame vectors are normalized II~n II = 1, this redundancy is measured by the frame bounds A and B. If the {~n}ncr are linearly independent then it is proved in (5.23) that A
The frame is an orthonormal basis if and only if A - B - 1. This is verified by inserting f - - ~ n in (5.3). If A > 1 then the frame is redundant and A can be interpreted as a minimum redundancy factor. Example 5.1 Let (el, e2) be an orthonormal basis of a two-dimensional plane H. The three vectors qSl--el,
el V~ ~b2---~+--~-e2,
q~3-
el 2
2 e2
have equal angles of 27r/3 between themselves. For any f C H 3
~--~ I(f, G)I 2 - 3
~ Ilfll =
n--1
These three vectors thus define a tight frame with A - B - 3/2. The frame bound 3/2 measures their redundancy in a space of dimension 2. Example 5.2 For any 0 _< k < K, suppose that {ek,n}n~Z is an orthonormal basis of H. The union of these K orthonormal bases {e~,n}n~z,0___k~ is a tight frame with A - B - K. Indeed, the energy conservation in an orthonormal basis implies that for any f C H,
Zl(f, ek,n)12--11fll 2, ncZ
5.1 FRAMETHEORY
127
hence K-1
ZZl(f
, ek,n)l 2 - K l l f l l 2.
k=0 nEZ
Example 5.3 One can verify (Problem 5.8) that a finite set of N vectors { ~n }1
Irregular Sampling Let Ur be the space of L 2 (JR) functions whose Fourier transforms have a support included in [-Tr/T, 7r/T]. For a uniform sampling, tn -- nT, Proposition 3.2 proves that {T -1/2 h r ( t - nT)}ncz is an orthonormal basis of Ur. The reconstruction of f from its samples is then given by the sampling Theorem 3.1. The irregular sampling conditions of Duffin and Schaeffer [ 175] for constructing a frame were later refined by several researchers [91,360, 74]. Grochenig proved [197] that if lim tn +oo and lim tn = - o c , and if the maximum n--+-k-c~
-
-
n--+-~
sampling distance 3 satisfies --
sup Itn+l - tn[ < T ,
(5.4)
nEZ
then
nCZ
is a frame with frame bounds A >_ (1 - ~/T) 2 and B < (1 + ~ / r ) 2. The amplitude factor 2-1/2 (t,,+ 1 - tn- 1) 1/2 compensates for the non-uniformity of the density of samples. It attenuates the amplitude of frame vectors where there is a high density of samples. The reconstruction of f requires inverting the frame operator
U f[n] -- ( f (t),hr(t - tn)). 5.1.2
Pseudo Inverse
The reconstruction of f from its flame coefficients Uf[n] is calculated with a pseudo inverse. This pseudo inverse is a bounded operator that is expressed with a dual frame. We denote
lz(r) = {x 9 I l x L I 2 - ~
Ix[n]l 2 <
nCl-'
and by ImU the image space of all U f with f E H.
+00),
128
CHAPTERV FRANES
P r o p o s i t i o n 5.1 If { On}n~V is a frame whose vectors are linearly dependent, then l m U is strictly included in 12(F), and U admits an infinite number of left inverses
(j-1.
(5.5)
Vf E H , (]-luf - f . Proof 2. The frame inequality (5.3) guarantees that ImU C 12(1-') since IIUf[ 2 -- Z
I(f, Cn)12 ~ B Ilfll
2.
(5.6)
nEl-'
Since {q~n}~Er is linearly dependent, there exists a non-zero vector x E 12(1-') such that -0 nEI"
For any f E I-I nEl-'
x[4 , ~.} = ~x[4 nEF
ui[4 = o.
This proves that ImU is orthogonal to x and hence that ImU ~= 12(F). A frame operator U is injective (one to one). Indeed, the frame inequality (5.3) guarantees that Uf - 0 implies f = 0. Its restriction to ImU is thus invertible. Let ImU • be the orthogonal complement of lmU in 12(1-'). If {C~n}n~V are linearly dependent then ImU • ~ {0} and the restriction of 0 -1 to ImU j- may be any arbitrary linear operator. I The more redundant the frame {q~n}~r, the larger the orthogonal complement I m U -L of the image I m U . The pseudo inverse ~r-1 is the left inverse that is zero on I m U • Vx E I m U • , ~ ] - l x - - 0 . In infinite dimensional spaces, the pseudo inverse (j-1 of an injective operator is not necessarily bounded. This induces numerical instabilities when trying to reconstruct f from Uf. The following theorem proves that a frame operator has a pseudo inverse that is always bounded. We denote by U* the adjoint of U:
( U f ,x) = ( f , V'x). T h e o r e m 5.1 (PSEUDO INVERSE) The pseudo inverse satisfies ~]-1 = ( W , W ) - l w , .
(5.7)
It is the left inverse of minimum sup norm. If U is a frame operator with frame bounds A and B then 1
IIu-111s <-- v~
(5.8)
Proof 2. To prove that (/-1 has a minimum sup norm, let us decompose any x E 12(1-') as a sum x = Xl + x2 with x2 E ImU • and Xl E ImU. Let 0 -1 be an arbitrary left inverse of U. Then I I 0 - ' x l l - I l U - l x l l l - IlO-'x~ll < IlO-'xlll Ilxll Ilxll Ilxll Ilxlll "
5.1 FRAMETHEORY
129
We thus derive that
IIu-'lls
=
sup
IIU-'xll <
sup
IlO-~xll = II~r-~lls,
Since Xl E ImU, there exists f E H such that Xl = Uf. The inequality (5.8) is derived from the frame inequality (5.3) which shows that
II(:-lxll- Ilfll _< ~
1
IIufll _< ~
1
Ilxll,
To verify (5.7), we first prove that the self-adjoint operator U*U is invertible by showing that it is injective and surjective (onto). If U*Uf = 0 then (U* Uf, f) = 0 and hence (Uf, Uf) = 0. Since U is injective then f = 0, which proves that U* U is injective. To prove that the image of U*U is equal to H we prove that no non-zero vector can be orthogonal to this image. Suppose that g E H is orthogonal to the image of U* U. In particular (g, U* Ug) -- 0, so (Ug, Ug) -- 0, which implies that g -- 0. This proves that U*U is surjective. Since U* U is invertible, proving (5.7) is equivalent to showing that for any x the pseudo inverse satisfies (U*U)(J-~x= U*x. (5.9) Ifx E ImU • then (U*U)U-lx = 0 because ~]-lx = 0 , and U*x = 0 because
Vf E H , (f ,U*x} = (Uf ,x) =O. It thus verifies (5.9) for x E ImU I. If x E ImU, then UU-lx = x so (5.9) remains valid. We thus derive that (5.9) is satisfied for all x E H. I Dual Frame T h e p s e u d o inverse of a frame operator is related to a dual frame family, which is specified by the following theorem.
T h e o r e m 5.2 Let {r
be a frame with bounds A,B. The dual frame defined
by Sn--(U*U)-IOn satisfies 1 Vf E H , ~
1
Ilfll 2 ~ ~-~[
(5.10)
nEF
and f-
~I-IUf - ~
( f ,c~,l~, - ~
nEF
( f , Sn}~hn.
nEF
(:5.11)
If the frame is tight (i.e., A = B), then ~n - A -1 ff)n. Proof 2. To prove (5.11), we relate U* to {G},,er and use the expression (5.7) of ~]-1. For any x E l~(r) and f E It (V*x,f) = (x, Vf} = E x [ n l ( f , dP,,)*.
nEF
I ]0
CHAPTERV
FRAMES
Consequently
(x[n]On'f)'
(U*x,f) - Z nE I"
which implies that (5.12) nEI ~
The pseudo inverse formula (5.7) proves that
l_j-lx-- (U*U)-I U*x -- (U'U) -1 ~x[n]t~n, nEE'
SO
(5.13)
U-ix = Z x [ n ] qSn. nEl-'
If x[n] = Uf[n] = ( f , fS,,) then
f-
(J-1Uf = Z
(5.14)
(f , dPn)~n.
nEF
The dual family of vectors {q~,,},Er and {~,},,er play symmetrical roles. Indeed (5.14) implies that for any f and g in H, (f' g) = Z
(f' ~b,) (~,, g),
(5.15)
(g,~n)qb,,,
(5.16)
nEl"
hence
g= ~ nEl-'
which proves (5.11). The expression (5.12) of U* proves that for x[n] = Uf[n] = (f, ~n)
U*Of = Z
(5.17)
(f , ffgn)~n.
nEP
The flame condition (5.3) can thus be rewritten
allfll 2 <__ (U'Of, f)_
(5,18)
If a = B then {U*Uf, f) -- A [Ifll 2. Since U*U is symmetrical, one can show that necessarily U*U -- A ld where Id is the identity operator. It thus follows that ~, = (U*U)-l~n
--A-l~n
.
Similarly (5.10) can be rewritten 1
1
]lfll 2 < ( ( u * u ) - l f , f ) < _ ~ Ilfll a.
(5.19)
because
(U*U)-' f - ~ nEP
( f , qhn)(U*U)-'~Sn - Z
(f ,~n) ~n.
nEP
The double inequality (5.19) is derived from (5.18) by applying the following lemma t o L - - U*U.
5. I FRAME THEORY
13 1
Lemma 5.1 If L is a self-adjoint operator such that there exist A > 0 and B satisfying Vf E H ,
A llfll 2 ~ (Lf , f ) < n llfll 2
(5.20)
then L is invertible and
Vf E H , ~1 II/ll 2 <_ (g - i f , f )
<_ ~1 II/I 12 9
(5.21)
In finite dimensions, since L is self-adjoint we know that it is diagonalized in an orthonormal basis. The inequality (5.20) proves that its eigenvalues are between A and B. It is therefore invertible with eigenvalues between B-1 and A-~, which proves (5.21). In infinite dimensions, the proof is left to the reader. I This theorem proves that {~}nEr is a dual frame that recovers any f E H from its frame coefficients { (f, qSn)}nEt. If the frame is tight then ~n = z - | ~n, SO the reconstruction formula becomes 1 f -- A Z
( f ' ~n) ~n-
(5.22)
nEl-'
Biorthogonal Bases A Riesz basis is a frame of vectors that are linearly independent, which implies that ImU - 12(1-'). One can derive from (5.11) that the dual frame {qS~}ner is also linearly independent. It is called the dual Riesz basis. Inserting f - ~p in (5.11) yields
nEI"
and the linear independence implies that
(r
r
-
-,,].
Dual Riesz bases are thus biorthogonal families of vectors. If the basis is normalized (i.e., II II -- 1), then A < 1 < B. (5.23) This is proved by inserting f - qSp in the frame inequality (5.10): 1
- 1 ~ ~1
12
nEl-'
Partial Reconstruction Suppose that {qS,}.Er is a frame of a subspace V of the whole signal space. The inner products Uf[n] - (f, qS,,) give partial information on f that does not allow us to fully recover f . The best linear mean-square approximation of f computed from these inner products is the orthogonal projection
132
CHAPTERV FRAMES
of f on the space V. This orthogonal projection is computed with the dual frame {On)nEI" of (~)n}nEr' in V:
Pvf = [-]-luf - Z
( f ' Cn) ~n.
(5.24)
nEF
To prove that P v f is the orthogonal projection in V, we verify that P v f E V and that ( f - P v f , ~bp) = 0 for all p E F. Indeed, ( f - Pv f , r
- ( f , Op) - Z ( f ' On) (~n,+p>, nEF
and the dual frame property in V implies that
Z (@n,(gp)~n -- ~)p. nEr' Suppose we have a finite number of data measures { (f, $,)}0<_,
Inverse Frame Computations
We describe efficient numerical algorithms to recover a signal f from its frame coefficients Uf[n] - (f, c~,,). If possible, the dual frame vectors are precomputed:
~)n -- ( U * O ) - l ~ n , and we recover each f with the sum
f - - Z ( f ,~n)@n" nEr' In some applications, the frame vectors (~bn}hEYmay depend on the signal f , in which case the dual frame vectors ~, cannot be computed in advance. For example, the frame (5.1) associated to an irregular sampling depends on the position t, of each sample. If the sampling grid varies from signal to signal it modifies the frame vectors. It is then highly inefficient to compute the dual frame for each new signal. A more direct approach applies the pseudo inverse to U f:
f - - [_]-luf -- ( U * U ) - I ( u * u ) f - L - 1 L f ,
(5.25)
L f - U* U f - ~ (f, On) ~n. nEF
(5.26)
where
Whether we precompute the dual frame vectors or apply the pseudo inverse on the frame data, both approaches require an efficient way to compute f - L-1 g
5. I
FRAMETHEORY
133
for some g E H. Theorems 5.3 and 5.4 describe two iterative algorithms with exponential convergence 9 The extrapolated Richardson procedure is simpler but requires knowing the frame bounds A and B. Conjugate gradient iterations converge more quickly when B / A is large, and do not require knowing the values of A and B.
Theorem 5.3 (EXTRAPOLATEDRICHARDSON) Let g C H. To compute f - L - l g we initialize f o - O. Let "~ > 0 be a relaxation parameter For any n > O, define f n -- f n - 1 + 7 (g - L f n - 1 ) .
(5.27)
6 = m a x { l l - ~ A l , l l - ~ B I } < 1,
(5.28)
IIf- fnll <- 6n IIfll,
(5.29)
If then
and hence
lim f,, = f .
n--+ + c~
Proof z The induction equation (5.27) can be rewritten f - fn---- f - fn-l-TL(f
- fn-1).
Let R -- I d - T L , f - f n -=-R ( f - f n-1) -- e n ( f - f o) -- g n ( f )
9
(5.30)
We saw in (5.18) that the frame inequality can be rewritten a Ilfll 2 _< ( L f , f ) < _ B IIfll 2. This implies that R -- I - "TL satisfies I(Rf, f ) l <- ~ IIf{I2,
where 8 is given by (5.28). Since R is symmetric, this inequality proves that IIRII ~ ~. We thus derive (5.29) from (5.30). The error I I f - f~ll clearly converges to zero if ~5<1. II For frame inversion, the extrapolated Richardson algorithm is sometimes called the frame algorithm [21 ]. The convergence rate is maximized when ~ is minimum: (~--
B -A
1 -A/B
--
B+A
I+A/B'
which corresponds to the relaxation parameter ,y-
2 A+B
134
CHAPTER V
FRAMES
The algorithm converges quickly if A / B is close to 1. If A / B is small then A ~ 1 - 2 -. B
(5.31)
The inequality (5.29) proves that we obtain an error smaller than e for a number n of iterations, which satisfies:
IIf-fnll [ffll
<
6 n _ _ 6..
-
Inserting (5.31) gives log e e
-B
n ,~ loge( l _ 2 A / B ) ,~ - - ~ logee.
(5.32)
The number of iterations thus increases proportionally to the frame bound ratio
B/A. The exact values of A and B are often not known, in which case the relaxation parameter 3' must be estimated numerically by trial and error. If an upper bound B0 of B is known then we can choose 3' -- 1/Bo. The algorithm is guaranteed to converge, but the convergence rate depends on A. The conjugate gradient algorithm computes f -- L-1 g with a gradient descent along orthogonal directions with respect to the norm induced by the symmetric operator L: Ilfll~ = Ilzfll 2. (5.33) This L norm is used to estimate the error. Grochenig's [198] implementation of the conjugate gradient algorithm is given by the following theorem. T h e o r e m 5.4 (CONJUGATE GRADIENT) Let g E H. To compute f = L - l g we initialize
fo = 0 , ro = Po = g , P - 1 -- O.
(5.34)
For any n >_ 0, we define by induction
Pn+l- Lpn-
(rn,Pn) An--(pn,Lpn)
(5.35)
f n+l -- f n -+-)in Pn
(5.36)
rn+ l = rn - An Lpn
(5.37)
(Lpn,Lpn) (Lpn,Lpn-1) (pn,Lpn) P n - (Pn-l,Lpn-1) Pn-1.
I f o r - v~-v/A then v~ + v~
2ff n [ I f - fnllL < --
and hence
lim f n = f .
n~+c~
(5.38)
1 + o.2n
[If IlL
(5.39)
5.1
135
FRAMETHEORY
Proof z. We give the main steps of the proof as outlined by Grochenig [ 198]. Step 1: Let U, be the subspace generated by {LJf}l<_j<_n . By induction on n, we derive from (5.38) that pj E U~, for j < n.
Step 2: We prove by induction that {Pj}o<j
Step 4: We compute the orthogonal projection of f in embedded spaces Un of dimension n, and one can verify that lim,_++~ I l f - fn[]L = 0. The exponential convergence (5.39) is proved in [198]. II As in the extrapolated Richardson algorithm, the convergence is slower when A/B is small. In this case a--
1-4a7 l+~/~
~1-2
.
The upper bound (5.39) proves that we obtain a relative error
IIf-/nll II/ll
<e
-
for a number of iterations n~
1Oge l O g e O"
~
2V~
log e
.
Comparing this result with (5.32) shows that when A/B is small, the conjugate gradient algorithm needs many fewer iterations than the extrapolated Richardson algorithm to compute f = L - l g at a fixed precision.
5.1.4
Frame Projector and Noise Reduction
Frame redundancy is useful in reducing noise added to the frame coefficients. The vector computed with noisy frame coefficients is projected on the image of U to reduce the amplitude of the noise. This technique is used for high precision analog to digital conversion based on oversampling. The following proposition specifies the orthogonal projector on ImU.
Proposition 5.2 The orthogonal projection from
1z (F) onto l m U is
Px[n] - UfJ-'x[n] - Z x [ p ] @p, Cn) . pEF
(5.40)
136
CHAPTERV FRAMES
Proof 2. If x E ImU then x = Uf and Px = Uf] -1Uf = Uf = x. If x C ImU • then Px -- 0 because Lr-lx -- 0. This proves that P is an orthogonal projector on ImU. Since Uf[n] = (f, Cn) and (J-ix = ~perX[P] Cp, we derive (5.40). I
A vector x[n] is a sequence of frame coefficients if and only ifx - Px, which means that x satisfies the reproducing kernel equation
(~p,r
x[n] - Z x [ p ]
pEF
(5.41)
This equation generalizes the reproducing kernel properties (4.20) and (4.40) of windowed Fourier transforms and wavelet transforms. Noise Reduction Suppose that each frame coefficient Uf[n] is contaminated by an additive noise W[n], which is a random variable. Applying the projector P gives
P ( U f + W) -- U f + PW, with
PW[n] -- Z
Cn).
W[p] (r
pEF
Since P is an orthogonal projector, IlPWII _< Ilwll. This projector removes the component of W that is in I m U • Increasing the redundancy of the frame reduces the size of I m U and thus increases I m U • so a larger portion of the noise is removed. If W is a white noise, its energy is uniformly distributed in the space 12(F). The following proposition proves that its energy is reduced by at least A if the frame vectors are normalized. Proposition
5.3 Suppose that IlCnll = c, for all n E F. I f W is a zero-mean white E{IW[n]]2} = cr2, then
noise of variance
cr2 C 2 E{IPW[n]I 2) < ~ . -
(5.42)
A
If the frame is tight then this inequality is an equality. Proof 2. Let us compute
E{]PW[n]I2}=F( (p~~FW[P](r (~W*[I]((gI'~n)*) Since W is white,
e{W[p] W* [l]} = a2 ~[p - l ] , and therefore
E{IPW[n]12}-cr2~-~,l(r162
pCF
2 < ~211r -
The last inequality is an equality if the frame is tight.
A
2 = ~~2C . ~ A
I
FRAMETHEORY
5. I
137
Oversampling This noise reduction strategy is used by high precision analog to digital converters. After a low-pass filter, a band-limited analog signal f(t) is uniformly sampled and quantized. In hardware, it is often easier to increase the sampling rate rather than the quantization precision. Increasing the sampling rate introduces a redundancy betweenthe sample values of the band-limited signal. For a wide range of signals, it has been shown that the quantization error is nearly a white noise [ 194]. It can thus be significantly reduced by a frame projector. After the low-pass filtering, f belongs to the space Ur of functions whose Fourier transforms have their support included in [-Tr/T, 7r/T]. The Whittaker sampling Theorem 3.1 guarantees perfect reconstruction with a sampling interval T, but f is oversampled with an interval To = T / K that provides K times more coefficients. We verify that the frame projector is then a low-pass filter that reduces by K the energy of the quantization noise. Proposition 3.2 proves that 1
f(nTo) - ~ (f(t) hr(t-nT0)} with h r ( t ) - sin(Trt/T) ' 7rt/T and for each 1 ~ k ~ K the family {hr(t - k T / K - nT) }nEZ is an orthogonal basis of UT. As a consequence
{~n(t)--hT(t--nZO)lncZ--(hT (t-kT-nT)}g
1_ _
is a union of K orthogonal bases, with vectors having a square norm C 2 - T. It is therefore a tight frame of UT with A -- B -- K T = To. Proposition 5.3 proves that the frame projector P reduces the energy of the quantization white noise W of variance 0.2 by a factor K"
E{IPW[n]I 2} -
0.2 C 2 A
-=
0.2 K
.
(5.43)
The frame {~n(t)}nEZ is tight so ~n - ~1 b . and (5.40)implies that ]
+co
Px[n] -- -Too Z
x[p] ( h r ( t - pTo),hr(t-nTo)).
p=-oo
This orthogonal projector can thus be rewritten as the convolution
Px[n]-x,ho[n]
1
with h0[n]- To (hr(t),hr(t-nTo)).
One can verify that h0 is an ideal low-pass filter whose transfer function has a restriction to [-Tr, 7r] defined by ho - I[-~/K,,/K]. In this case ImU is simply the space of discrete signals whose Fourier transforms have a restriction to [-Tr, 7r] which is non-zero only in [-Tr/K, 7r/K].
138
CHAPTERV FRAI'4ES
The noise can be further reduced if it is not white but if its energy is better concentrated in ImU • This can be done by transforming the quantization noise into a noise whose energy is mostly concentrated at high frequencies. SigmaDelta modulators produce such quantization noises by integrating the signal before its quantization [82]. To compensate for the integration, the quantized signal is differentiated. This differentiation increases the energy of the quantized noise at high frequencies and reduces its energy at low frequencies. The low-pass filter h0 thus further reduces the energy of the quantized noise. Several levels of integration and differentiation can be used to better concentrate the quantization noise in the high frequencies, which further reduces its energy after the filtering by h0 [330]. This oversampling example is analyzed just as well without the frame formalism because the projector is a simple convolution. However, the frame approach is more general and applies to noise removal in more complicated representations such as irregularly oversampled signals or redundant windowed Fourier and wavelet frames [329]. 5.2
WINDOWED
FOURIER FRAMES z
Frame theory gives conditions for discretizing the windowed Fourier transform while retaining a complete and stable representation. The windowed Fourier transform of f C L 2 (1R) is defined in Section 4.2 by
Sf(u,~) = ( f , gu,~), with
gu,~(t) -- g ( t - u)e i~t. Setting Ilgllrepresentation
1 implies that Ilgu,~ll- a. A discrete windowed Fourier transform {Sf(Un,~k)-- (f , gu.,~k)}(n,k)~Z2
is complete and stable if {gu,,~k}(,,k)eZ2 is a frame of Lz(R). Intuitively, one can expect that the discrete windowed Fourier transform is complete if the Heisenberg boxes of all atoms {gu,,~k } (n,k)cz2 fully cover the timefrequency plane. Section 4.2 shows that the Heisenberg box of gu,,~k is centered in the time-frequency plane at (u,,~k). Its size is independent of u, and ~k. It depends on the time-frequency spread of the window g. A complete cover of the plane is thus obtained by translating these boxes over a uniform rectangular grid, as illustrated in Figure 5.1. The time and frequency parameters (u, ~) are discretized over a rectangular grid with time and frequency intervals of size u0 and ~0. Let us denote
gn,k(t) = g ( t - nuo) exp(ik~ot). The sampling intervals (u0, ~0) must be adjusted to the time-frequency spread of g.
5.2 WINDOWED FOURIERFRAMES
| 39
0)
9
.
~[gu~,
.
.
o
o
|
9
9
9
u0 0
t
Un
FIGURE 5. I A windowed Fourier frame is obtained by coveting the timefrequency plane with a regular grid of windowed Fourier atoms, translated by Un - n uo in time and by ~k -- k ~0 in frequency.
Window Scaling Suppose that {gn,k)(n,k)~Z2 is a frame of L2(R) with frame bounds A and B. Let us dilate the window gs(t)= s-1/2g(t/s). It increases by s the time width of the Heisenberg box of g and reduces by s its frequency width. We thus obtain the same cover of the time-frequency plane by increasing uo by s and reducing (0 by s. Let
gs,n,k(t) -- gs(t-- nsuo) exp ( i k ~ t )
.
(5.44)
We prove that {gs,n,k} (,,~)~Z2 satisfies the same frame inequalities as {gn,k} (,,k)cZ2, with the same frame bounds A and B, by a change of variable t ~= ts in the inner product integrals.
Necessary Conditions Daubechies [21] proved several necessary conditions on g, u0 and ~0 to guarantee that {gn,~}(n,~)cz2 is a frame of Lz(I~). We do not reproduce the proofs, but summarize the main results. TheoremS.5 (DAUBECHIES) The windowed Fourier family {gn,k}(n,k)~Z2 is a
frame only if
27r
> 1.
(5.45)
UO ~0 --
The frame bounds A and B necessarily satisfy A< --
27r
27r U0 ~0
+~
Vt E It~ , a <_ ~o ~ H-'-
< B,
(5.46)
--
]g(t- nuo)l 2 <_ B,
(5.47)
--OO
VwEIt~ ' A<_ U0 1 +~-~~ Ig(03 k---ocz
k~~ [2 ~ O.
(5.48)
140
CHAPTER V
FRAMES
The ratio 27r/(u0~0) measures the density of windowed Fourier atoms in the time-frequency plane. The first condition (5.45) ensures that this density is greater than 1 because the coveting ability of each atom is limited. The inequalities (5.47) and (5.48) are proved in full generality by Chui and Shi [124]. They show that the uniform time translations of g must completely cover the time axis, and the frequency translations of its Fourier transform ~ must similarly cover the frequency axis. Since all windowed Fourier vectors are normalized, the frame is an orthogonal basis only if A = B = 1. The frame bound condition (5.46) shows that this is possible only at the critical sampling density u0~0 = 27r. The Balian-Low Theorem [86] proves that g is then either non-smooth or has a slow time decay. Theorem 5.6 (BALIAN-LOW) If {gn,k }(n,k)EZ 2 uo~o - 27r, then
f + c ~ t 2 Ig(t)l2d t (X3
-
+c~
is
a windowed Fourier frame with
or f + c ~ ~21~(~)12 dw - + ~ .
O<3
(5.49)
This theorem proves that we cannot construct an orthogonal windowed Fourier basis with a differentiable window g of compact support. On the other hand, one can verify that the discontinuous rectangular window 1
g - - ~ o l[-uo/2,uo/2] yields an orthogonal windowed Fourier basis for u0~0 - 27r. This basis is rarely used because of the bad frequency localization of ~. Sufficient Conditions The following theorem proved by Daubechies [145] gives sufficient conditions on u0, ~0 and g for constructing a windowed Fourier frame.
Theorem 5.7 (DAUBECHIES) Let us define
-q--o(3 /3(u) -
sup
~
0
and
k=-c~ kr
I g ( t - nu0)] I g ( t - nuo + u)l
[
(
(5.50)
(5.51)
If uo and ~o satisfy
+~
27r ( i n f Z [g(t Ao - -~o ~kO
--
nu0)[ 2
) -- m
> 0
(5.52)
5.2 WINDOWED FOURIERFRAMES
141
and Bo --
-~o2rr ( -.;,,
+oo
\ ~176
~
I g ( t - nu~
+ A
)
< +cx~,
(5.53)
t h e n {gn,k}(n,k)~Z 2 is a frame. The constants Ao and Bo are respectively lower bounds and upper bounds of the frame bounds A and B.
Observe that the only difference between the sufficient conditions (5.52, 5.53) and the necessary condition (5.47) is the addition and subtraction of A. If A is small compared to info
Theorem 5.2 proves that the dual windowed frame vectors are gn,k -- ( U ' U ) -lg.,k.
(5.54)
The following proposition shows that this dual frame is also a windowed Fourier frame, which means that its vectors are time and frequency translations of a new window ~. Proposition 5.4 Dual windowed Fourier vectors can be rewritten gn,k(t) -- ~,(t - nuo) exp(ik~ot)
where ~ is the dual window ~, - (U* U) -1 g.
(5.55)
Proof z. This result is proved by showing first that L -- U*U commutes with time and frequency translations proportional to u0 and ~0. If h E Lz(R) and hm,l(t) =
h ( t - muo) exp(il~ot) we verify that Lhm,t(t) = exp(il~ot) Lh(t - muo). Indeed (5.26) shows that Lhm,l =
~
(hm,l,gn,k) gn,k
(n,k)cZ 2
and a change of variable yields
(hm,l, gn,k) --(h, gn-m,k-1). Consequently
thm,l(t)
--
Z
(h, gn-m,k-l) exp(il~ot) gn-m,k-l(t -- muo)
(n,k)EZ 2
=
exp(il~ot) Lh(t - muo).
Since L commutes with these translations and frequency modulations we verify that L -~ necessarily commutes with the same group operations. Hence gn,k(t) -- L -1 g,,k -- exp(ik~0)L -lgo,o(t- nuo) = exp(ik~0) ~ ( t - nuo). I
CHAPTERV FRANES
142
u0 0
Ao
Bo
Bo/Ao
37r/4
3.9 2.5
4.1 2.8
1.05 1.1
71"
1.6
2.4
1.5
47r/3 1.97r
0.58 0.09
2.1 2.0
326
Table 5. I Frame bounds estimated with Theorem 5.7 for the Gaussian window (5.56) and u0 -- (0.
Gaussian Window The Gaussian window g(t)
-
71- - 1 / 4
exp
t2 )
-~
(5.56)
has a Fourier transform ~ that is a Gaussian with the same variance. The time and frequency spreads of this window are identical. We therefore choose equal sampling intervals in time and frequency: u0 - ~0. For the same product u0~0 other choices would degrade the frame bounds. If g is dilated by s then the time and frequency sampling intervals must become suo and ~0/s. If the time-frequency sampling density is above the critical value: 27r/(u0~o) > 1, then Daubechies [145] proves that {gn,k}(n,k)rZ2 is a frame. When uo(0 tends to 27r, the frame bound A tends to 0. For u0~0 = 27r, the family {gn,k}(n,k)cZ2 is complete in L2(R), which means that any f C L2(~) is entirely characterized by the inner products { (f, gn,k) } (n,k)cZz. However, the Balian-Low Theorem 5.6 proves that it cannot be a frame and one can indeed verify that A - 0 [ 145]. This means that the reconstruction of f from these inner products is unstable. Table 5.1 gives the estimated frame bounds Ao and Bo calculated with Theorem 5.7, for different values of uo = ~o. For uo~0 - 7r/2, which corresponds to time and frequency sampling intervals that are half the critical sampling rate, the frame is nearly fight. As expected, A ~ B ~ 4, which verifies that the redundancy factor is 4 (2 in time and 2 in frequency). Since the frame is almost tight, the dual frame is approximately equal to the original frame, which means that ~ ~ g. When u0(0 increases we see that A decreases to zero and ~ deviates more and more from a Gaussian. In the limit uo(0 -- 27r, the dual window ~ is a discontinuous function that does not belong to L 2 (/K). These results can be extended to discrete window Fourier transforms computed with a discretized Gaussian window [361 ].
Tight Frames Tight frames are easier to manipulate numerically since the dual frame is equal to the original frame. Daubechies, Grossmann and Meyer [ 146] give two sufficient conditions for building a window of compact support that generates a tight frame.
5.3 WAVELETFRAMES
143
Theorem 5.8 (DAUBECHIES, GROSSMANN, MEYER) Let g be a window whose support is included in [-Tr/~o, 7r/~o]. If 271 +oc
Vt E IR , ~
Z
Ig(t - nu~
- A
(5.57)
then {gn,k}(n,k)~Z2 is a tight frame with a frame bound equal to A. The proof is studied in Problem 5.4. If we impose that 271
1 < uo~o -< 2, then only consecutive windows g(t - nuo) and g(t - (n + 1)u0) have supports that overlap. The design of such windows is studied in Section 8.4.2 for local cosine bases. 5.3
W A V E L E T F R A M E S :z
Wavelet frames are constructed by sampling the time and scale parameters of a continuous wavelet transform. A real continuous wavelet transform of f E L 2 (R) is defined in Section 4.3 by
W f ( u , s ) = ( f , ~u,s), where ~ is a real wavelet and
1 Imposing II%bll= 1 implies that Ilmbu,sll = 1. Intuitively, to construct a frame we need to cover the time-frequency plane with the Heisenberg boxes of the corresponding discrete wavelet family. A wavelet ~b,,s has an energy in time that is centered at u over a domain proportional to s. Over positive frequencies, its Fourier transform ~bu,shas a support centered at a frequency ~7/s, with a spread proportional to 1/s. To obtain a full cover, we sample s along an exponential sequence {a J}jEZ, with a sufficiently small dilation step a > 1. The time translation u is sampled uniformly at intervals proportional to the scale a j, a s illustrated in Figure 5.2. Let us denote ^
~bj,n(t) - ~
, ~b (,
aJ
"
We give necessary and sufficient conditions on ~, a and uo so that {~)j,n}(j,n)EZ2 is a frame of L2(R).
144
CHAPTERV FRAMES
11
aj-1 11
aJ
uoaJ o
0
nu'oaJ
:~
FIGURE 5.2 The Heisenberg box of a wavelet 2/)j,n scaled by s - aJ has a time and frequency width proportional respectively to a j and a -j. The time-frequency plane is covered by these boxes if u0 and a are sufficiently small. Necessary Conditions We suppose that ~b is real, normalized, and satisfies the admissibility condition of Theorem 4.3:
fo +~ I~(~)12 dw < +c~. w
Cr
Theorem
(5.58)
5.9 (DAUBECHIES) I f {~j,n}(j,n)CZ2 is a frame of L2(R) then the frame
bounds satisfy
A<
<_ B,
(5.59)
, a _< __1 Z [+(aJ&)[2 ~ B. U0 J .= - - c x D
(5.60)
-
Vw E R - { 0 }
Cr uo l o g e a
The condition (5.60) imposes that the Fourier axis is covered by wavelets dilated by {aJ}j~z. It is proved in [ 124, 21 ]. Section 5.5 explains that this condition is sufficient for constructing a complete and stable signal representation if the time parameter u is not sampled. The inequality (5.59), which relates the sampling density u0 loge a to the frame bounds, is proved in [21 ]. It shows that the frame is an orthonormal basis if and only if A-B-
Cr
uo loge a
=1.
Chapter 7 constructs wavelet orthonormal bases of Lz(R) with regular wavelets of compact support. Sufficient Conditions The following theorem proved by Daubechies [21] provides a lower and upper bound for the frame bounds A and B, depending on ~b, u0 and a.
5.3 WAVELETFRAMES
145
Theorem 5.10 (DAUBECHIES) Let us define --~00
/3(~) -
sup
~
I~,(aY~)[ I~,(aYw + ~)1
(5.61)
l <-[w[<-aj=_cx z
and
A--~ I/~(27t--~k)/~ (-271k)] 1/2 k=-oo UO UO kr If uo and a are such that
1( 1(
A0---
inf
~
-
j----
Uo l<[wl
and
Bo- --
sup
Z
/gO 1<__I~I___aj=-c~
[~p(aJw)12-~
)
>0,
(5.62)
< +c~,
(5.63)
c~
I~(aJw)12 +
then {d/j,n}(j,n)ez2 is a frame of L2(IR). The constants Ao and Bo are respectively lower and upper bounds of the frame bounds A and B. The sufficient conditions (5.62) and (5.63) are similar to the necessary condition +c~ (5.60). If A is small relative to infl___l~l<__a~ j = - o ~ then A0 and B0 are close to the optimal frame bounds A and B. For a fixed dilation step a, the value of A decreases when the time sampling interval u0 decreases.
Ir
Dual Frame
Theorem 5.2 gives a general formula for computing the dual wavelet
frame vectors ~)j,n - - ( U * U ) - I C j , n
9
(5.64)
One could reasonably hope that the dual functions ~)j,n would be obtained by scaling and translating a dual wavelet ~. The sad reality is that this is generally not true. In general the operator U*U does not commute with dilations by a j, s o (U* U) -1 does not commute with these dilations either. On the other hand, one can prove that (U* U) -1 commutes with translations by naJuo, which means that
~j,,(t) - ~j,o(t - naJuo).
(5.65)
The dual frame {@j,n}(j,n)CX2 is thus obtained by calculating each elementary function ~j,o with (5.64), and translating them with (5.65). The situation is much simpler for tight flames, where the dual frame is equal to the original wavelet flame.
146
CHAPTER
a
uolaol
V FRAMES
'ol
'o/ao
2 2 2 2
0.25 0.5 1.0 1.5
13.091 6.546 3.223 0.325
14.183 7.092 3.596 4.221
1.083 1.083 1.116 12.986
289 289 289 289
0.25 0.5 1.0 1.75
27.273 13.673 6.768 0.517
27.278 13.639 6.870 7.276
1.0002 1.0002 1.015 14.061
288 1 2a 288 288
0.25 0.5 1.0 1.75
54.552 27.276 13.586 2.928
54.552 27.276 13.690 12.659
1.0000 1.0000 1.007 4.324
Table 5.2
Estimated frame bounds for the Mexican hat wavelet computed with Theorem 5.10 [21 ]. Mexican Hat Wavelet
The normalized second derivative of a Gaussian is
~ b ( t ) - ~2 71"- 1 / 4 (t 2 - 1)exp ( ~ )
.
(5.66)
Its Fourier transform is
@(CO)__- V/871"1/4 ~2 e x p ( ~ ) ~ The graph of these functions is shown in Figure 4.6. The dilation step a is generally set to be a - 21/v where v is the number of intermediate scales (voices) for each octave. Table 5.2 gives the estimated frame bounds A0 and B0 computed by Daubechies [21] with the formula of Theorem 5.10. For v > 2 voices per octave, the frame is nearly tight when u0 < 0.5, in which case the dual frame can be approximated by the original wavelet frame. As expected from (5.59), when A ,.~ B A ~ B'~
Cr = -v- Cr log 2 e. uo loge a uo
The frame bounds increase proportionally to v/uo. For a - 2, we see that Ao decreases brutally from u0 - 1 to uo - 1.5. For uo - 1.75 the wavelet family is not a frame anymore. For a - 21/2, the same transition appears for a larger uo. 5.4
TRANSLATION
INVARIANCE 1
In pattern recognition, it is important to construct signal representations that are translation invariant. When a pattern is translated, its numerical descriptors should
5.4 TRANSI.ATIONINVARIANCE
147
be translated but not modified. Indeed, a pattern search is particularly difficult if its representation depends on its location. Continuous wavelet transforms and windowed Fourier transforms provide translation-invariant representations, but uniformly sampling the translation parameter destroys this translation invariance. Continuous Transforms Let f~ (t) - f (t - 7-) be a translation of f (t) by r. The wavelet transform can be written as a convolution product:
1 ~b ( t ~s U ) W f ( u , s ) - f + co0~ f ( t ) --~ with ~s(t)
=
dt - f ,~bs(u)
S-1/22/3(--t/s). It is therefore translation invariant: Wfr(U,S) -- f r ,(bs(U) -- W f ( u - v-, s).
A windowed Fourier transform can also be written as a linear filtering
f
Sf(u,{) =
+oo
f(t)g(t-u)e-it~dt-e-iu~
f ,~(u),
O0
with ~,~(t) = g ( - t ) e its. Up to a phase shift, it is also translation invariant:
S f ~ ( u , { ) - e -iu{ f . g~(u - r) = e -ir~ S f ( u - r,{). Frame Sampling
A wavelet frame
~j,n(t) -- ~
l(,na'uo) if3
aJ
yields inner products that sample the continuous wavelet transform at time intervals
aJuo 9 ( f , ~bj,n) -- f -~aJ(naJuo) -- W f (naJuo,aJ). Translating f by r gives ( f ~-, C j , n )
--
f *~aJ(naJuo - 7") -- Wf(naJuo - 7-,aJ).
If the sampling interval aJ uo is large relative to the rate of variation of f * CaJ (t), then the c o e f f i c i e n t s (f,~3j,n)and ( f r , ~ j , n ) m a y take very different values that are not translated with respect to one another. This is illustrated in Figure 5.3. This problem is particularly acute for wavelet orthogonal bases where u0 is maximum. The orthogonal wavelet coefficients of f~- may be very different from the coefficients of f . The same translation distortion phenomena appear in windowed Fourier frames.
148
CHAPTERV FRAMES
wf u I I
I I
I
I
I
I
I
I
I
I
I
I
S aJu ~ FIGURE 5.3 If f~(t) -- f ( t - 7-) then Wf~(u,a j) - W f ( u - 7-,aJ). Uniformly sampling Wf~(u,a j) and W f ( u , a j) at u - naJuo may yield very different values if 7- # kuoa j.
Translation-lnvariant Representations There are several strategies for maintaining the translation invariance of a wavelet transform. If the sampling interval a juo is small enough then the samples of f*~baj (t) are approximately translated when f is shifted. The dyadic wavelet transform presented in Section 5.5 is a translationinvariant representation that does not sample the translation factor u. This creates a highly redundant signal representation. To reduce the representation size while maintaining translation invariance, one can use an adaptive sampling scheme, where the sampling grid is automatically translated when the signal is translated. For each scale a j, Wf(u, aJ) - f*r can be sampled at locations u where IWf(aJ,u)l is locally maximum. The resulting representation is translation invariant since the local maxima positions are translated when f and hence f * ~aJ are translated. This adaptive sampling is studied in Section 6.2.2. 5.5
DYADIC WAVELET TRANSFORM
2
To construct a translation-invariant wavelet representation, the scale s is discretized but not the translation parameter u. The scale is sampled along a dyadic sequence {2J}j~z, to simplify the numerical calculations. Fast computations with filter banks are presented in the next two sections. An application to computer vision and texture discrimination is described in Section 5.5.3. The dyadic wavelet transform of f c L2(R) is defined by
W f ( u , 2 j) -
, ~b (,u) -~
~ f(t) - ~
with
Cv(t) - r
- ~
d t - f *~2j(u),
1 r (t)T
(5.67)
5.5 DYADICWAVELET TRANSFORM
149
The following proposition proves that if the frequency axis is completely covered by dilated dyadic wavelets, as illustrated by Figure 5.4, then it defines a complete and stable representation. Theorem 5.11 If there exist two constants A > 0 and B > 0 such that --{-OO
Vw C N - { 0 }
1#'(2Jw)l2 ~ B,
(5.68)
~ IlWf(u,2J)l[ = ~ B [[fll 2.
(5.69)
, A _< E j - ' - --OO
then A llfll = ~
+~
~
1
j - - - - OO
If ~ satisfies --~-OO
V~ E R - {0} ,
Z
A
~*(2jw) ~(2Jw) - 1,
(5.70)
j~--(X)
then +oc
1
f ( t ) -- E
2-j Wf("2J)*~2J(t)"
(5.71)
j'----(X)
Proof 2. The Fourier transform of fj(u) -- Wf (u, 2J) with respect to u is derived from the convolution formula (5.67): j~j(~) -- v/~r
(5.72)
The condition (5.68) implies that
1 Ifj(~) 12 _
Integrating each side of this inequality with respect to w and applying the Parseval equality (2.25) yields (5.69). Equation (5.71) is proved by taking the Fourier transform on both sides and inseTting (5.70) and (5.72). II The energy equivalence (5.69) proves that the normalized dyadic wavelet transform operator
Uf[j,u]-
W f ( u , 2 j) -
f,-~~2J(t-u)
satisfies frame inequalities. There exist an infinite number of reconstructing wavelets ~} that verify (5.70). They correspond to different left inverses of U, calculated with (5.71). If we choose ~(a~) -
+~
~(~)
Ej__o~ 1r
2'
(5.73)
150
CHAPTERV FRAMES
0.25 0.2 0.15 0.1 0.05 0
-2
FIGURE 5.4
0
Scaled Fourier transforms 1 < j _< 5 andco C [-rr, rr].
2
1~(2J.~)12 computed
with (5.84), for
then one can verify that the left inverse is the pseudo inverse ~f-1. Figure 5.5 gives a dyadic wavelet transform computed over 5 scales with the quadratic spline wavelet shown in Figure 5.6.
5.5. I
Wavelet Design
A discrete dyadic wavelet transform can be computed with a fast filter bank algorithm if the wavelet is appropriately designed. The synthesis of these dyadic wavelets is similar to the construction of biorthogonal wavelet bases, explained in Section 7.4. All technical issues related to the convergence of infinite cascades of filters are avoided in this section. Reading Chapter 7 first is necessary for understanding the main results. Let h and g be a pair of finite impulse response filters. Suppose that h is a low-pass filter whose transfer function satisfies h(0) = x/~. As in the case of orthogonal and biorthogonal wavelet bases, we construct a scaling function whose Fourier transform is + ~ ~(2-pco)
p=l
1 ~t (~-) r ( ~ ) .
,/i
(5.74)
We suppose here that this Fourier transform is a finite energy function so that r E L 2 (R). The corresponding wavelet r has a Fourier transform defined by
(5.75) Proposition 7.2 proves that both r and ~ have a compact support because h and g have a finite number of non-zero coefficients. The number of vanishing moments of r is equal to the number of zeroes of r at ~ - 0. Since r - 1, (5.75) implies that it is also equal to the number of zeros of ~(~) at ~ - 0.
5.5
DYADIC
WAVELET
TRANSFORM
15
I
Signal
2-7
A A
.__~
~^vv,., _~^~.^ ~ '~M" . . . . V. v'-'vv ~v-.a, ^,,~ 9 v "vvvw
A
2-6
A
2-5
/N/~,
A
~
2-4 " - ' - - ' ~ 2-3 ~
J~L../ ^- ~
~
J/~_...~~/'-'~
~
^ ~ , -wvv , v
,,%/-v
^Av%t~-/"'~/--~--
A
- ,,1 ~
.~
F-,
/
~ Approximation
2-3
FIGURE 5.5 Dyadic wavelet transform Wf(u,2J) computed at scales 2 -7 < 2 j _< 2 -3 with the filter bank algorithm of Section 5.5.2, for signal defined over [0,1]. The bottom curve carries the lower frequencies corresponding to scales larger than 2 -3 . Reconstructing Wavelets Reconstructing wavelets that satisfy (5.70) are calculated with a pair of finite impulse response dual filters ft and ~. We suppose that the following Fourier transform has a finite energy: A
..
+~/.t (2-pco)
co
co
1 h (-~) ; ( - ~ ) .
(5.76)
p=l
Let us define
A
1
co
co A
The following proposition gives a sufficient condition to guarantee that ~b is the Fourier transform of a reconstruction wavelet. P r o p o s i t i o n 5.5
If the filters satisfy Vco E [-rr, re] , h(co)
(co)+ a~,(co) (co) -- 2
(5.78)
then -~-OO
gco E R - {0} ,
Z j--- -(x)
A
+* (2Jco)~(2Jco) - 1.
(5.79)
152
CHAPTER V
FRAMES
Proof 2. The Fourier transform expressions (5.75) and (5.77) prove that 1
co ~, co
qS* co .
Equation (5.78) implies
~(~)+*(~)
112
-
h(-~-)kt* co
a,
=
Hence
k Z
j=-l
co qS* co
A
.~.
A
~(Uco)~* (Uco) = ~* (2-/co)~(2-/co) -- ~* (2kco) ~(2kco).
Since ~(0) = 0, (5.78) implies h(0) kt*(0) = 2. We also impose that h(0) = x/~ so one can derive from (5.74,5.76) that ~b(0) = ~* (0) = 1. Since q5 and ~ belong to LI(IR), ~ and q5are continuous, and the Riemann-Lebesgue lemma (Problem 2.6) proves that
I~(~o)1and Iq~(~o)ldecrease to zero when co goes to oe. For co r 0, letting k and I go to +oo yields (5.79). II Observe that (5.78) is the same as the unit gain condition (7.122) for biorthogonal wavelets. The aliasing cancellation condition (7.121) of biorthogonal wavelets is not required because the wavelet transform is not sampled in time.
Finite Impulse Response Solution Let us shift h and g to obtain causal filters. The resulting transfer functions h(co) and ~(co) are polynomials in e -it~ We suppose that these polynomials have no common zeros. The Bezout Theorem 7.6 on polynomials proves that if P(z) and Q(z) are two polynomials of degree n and l, with no common zeros, then there exists a unique pair of polynomials P(z) and Q(z) of degree 1 - 1 and n - 1 such that
(5.80)
P(z) [;'(z) + Q(z) Q_.(z) - 1. A
A
This guarantees the existence of h(~o) and ~(~o) that are polynomials in e -i~ and satisfy (5.78). These are the Fourier transforms of the finite impulse response filters h and ~. One must however be careful because the resulting scaling function q5 in (5.76) does not necessarily have a finite energy.
Spline Dyadic Wavelets A box spline of degree m is a translation of m + 1 convolutions of 1[0,1] with itself. It is centered at t - 1/2 if m is even and at t - 0 if m is odd. Its Fourier transform is
sin(co/2)) m+l ~(w) =
w/2
( exp
-ie~ ) 2
with e =
{ 1 0
ifmiseven ifmisodd
'
(5.81)
5.5
DYADIC WAVELET TRANSFORM
153
0.8 0.5
0.6 0.4 0.2
-0.5 -0.5
FIGURE 5.6
0
0.5
1
0
0 -1
1.5
1
2
Quadratic spline wavelet and scaling function.
SO
(co)m+l
~(co) _ v/~ ~5(2co) = V'2 cos ~(co) 2-
exp
(--i~co) 2
"
(5.82)
We construct a wavelet that has one vanishing moment by choosing ~(co) O(co) in the neighborhood of co - 0. For example }(co) - - i v ~ sin ~- exp
2
"
(5.83)
The Fourier transform of the resulting wavelet is
1 ( I tI~ ( co _-ico
(sin(co/4)) m+2exp(-/co(1-q-e)) co/4 4 " (5.84) It is the first derivative of a box spline of degree m + 1 centered at t = (1 + e)/4. For m -- 2, Figure 5.6 shows the resulting quadratic splines q~ and ~. The dyadic admissibility condition (5.68) is verified numerically forA -- 0.505 and B -- 0.522. To design dual scaling functions ~ and wavelets ~ which are splines, we choose ~(co)- ~
g ,-2, ~ , 2 - ~
h - ~t. As a consequence, ~b- ~ and the reconstruction condition (5.78) implies that
g(CO) 2--,il(CO),2 ~, (co)
- - i v/2 exp
(--ico) ~
CO m ( CO)2n cos ~ . n=O
sin ~- ~
(5.85)
Table 5.3 gives the corresponding filters for m - 2.
5.5.2
'~lgorithme ~ Trous"
Suppose that the scaling functions and wavelets 4~, ~, ~ and ~ are designed with the filters h, g,/t and ~. A fast dyadic wavelet transform is calculated with a filter bank algorithm called in French the algorithmea trous, introduced by Holschneider, Kronland-Martinet, Morlet and Tchamitchian [212]. It is similar to a fast biorthogonal wavelet transform, without subsampling [308, 261 ].
154
CHAPTER V
h[n]/~/~ [ kt[n]/v~
FRAMES
g[n]/v/2
~[n]/v/-2
0.5 0.5
0.03125 09 -0.6875 0.6875 0.21875 0.03125
-2 1
0 1
2 3
0.125 0.375 0.375 0.125
0.125 0.375 0.375 0.125
Table 5.3 Coefficients of the filters computed from their transfer functions (5.82, 5.83, 5.85) for m - 2. These filters generate the quadratic spline scaling functions and wavelets shown in Figure 5.6. Let )~(t) be a continuous time signal characterized by N samples at a distance N -1 over [0, 1]. Its dyadic wavelet transform can only be calculated at scales 1 > 2 j > N -1 . To simplify the description of the filter bank algorithm, it is easier to consider the signal f(t) - f ( N -it), whose samples have distance equal to 1. A change of variable in the dyadic wavelet transform integral shows that Wf(u, 2J) N -1/2 Wf(Nu,N2J). We thus concentrate on the dyadic wavelet transform of f , from which the dyadic wavelet transform of )~ is easily derived. We suppose that the samples a0[n] of the input discrete signal are not equal to f(n) but to a local average of f in the neighborhood of t -- n. Indeed, the detectors of signal acquisition devices perform such an averaging 9 The samples a0[n] are written as averages of f(t) weighted by the scaling kernels qS(t- n): Fast Dyadic Transform
ao[n] - ( f ( t ) , r
- f T f(t)r
This is further justified in Section 7.3.1. For any j _> 0, we denote
aj[n]- (f (t), r
with r
1
~r
/ t \
.
The dyadic wavelet coefficients are computed for j > 0 over the integer grid
dj[n] : Wf (n,2 j) : (f(t), r
n)).
For any filter x[n], we denote by xj[n] the filters obtained by inserting 2 J - 1 zeros between each sample of x[n]. Its Fourier transform is k(2Jw). Inserting zeros in the filters creates holes (trous in French). Let Ycj[n] -- xj[-n]. The next proposition gives convolution formulas that are cascaded to compute a dyadic wavelet transform and its inverse. P r o p o s i t i o n 5.6
For any j >_O, a j+l In] -- a j , [tj [n] , dj+l[n] - aj,~j[n] ,
(5.86)
5.5 DYADICWAVELETTRANSFORM
and
1
a:[n] - -~
(aj+l .hj[n] +dj+l
155
*~j[n]).
(5.87)
Proof 2. Proof of (5.86). Since aj+l [n] -- f * qSzj+l(n) and dj+l[n] = f -,-~2J+l (n), we verify with (3.3) that their Fourier transforms are respectively -q-cx3
aj+l (w) = Z
f(co + 2krr) ~bzj ^* + 1 (co + 2krr)
k---oo
and
+~ d j + 1 (0.)) "~ ~ Je(CM + k---DO
2krr) 2/32J+1 ^* (CO + 2kTr).
The properties (5.76) and (5.77) imply that ~2J+l (CO) =
2~-~b(zJ+'w) -- h(zJw)~/~(2Jw),
+2J+l (('~) = ~ + ( 2 J + ' w )
= ~(2Jw) ~ / ~ ( 2 J w ) .
Since j >_ 0, both h(ZJw) and ~(2Jw) are 27r periodic, so aj+l(W) = h*(ZJw)aj(w) and aj+~(w) = ~*(2Jw)aj(w).
(5.88)
These two equations are the Fourier transforms of (5.86).
Proof of (5.87). Equations (5.88) imply A
&j+l (co) h(2J~) +dj+, (co) g(2J~)
--
&j(co) h* (2Jco) h(2Jco)
+
aj(~) ~* (2J~) g(2J~).
Inserting the reconstruction condition (5.78) proves that _'2"
,,
&j+l(w)h(2Jw) + dj+l (co)~(2Jw) = 2hj (w), which is the Fourier transform of (5.87).
II
The dyadic wavelet representation of a0 is defined as the set of wavelet coefficients up to a scale 2 J plus the remaining low-frequency information a j"
{dj}l<_j<_j, aj].
(5.89)
It is computed from a0 by cascading the convolutions (5.86) for 0 <_ j < J, as illustrated in Figure 5.7(a). The dyadic wavelet transform of Figure 5.5 is calculated with this filter bank algorithm. The original signal a0 is recovered from its wavelet representation (5.89) by iterating (5.87) for J > j _> 0, as illustrated in Figure 5.7(b).
156
CHAPTER V
"~
gj I1 ~
dj+l
FRAMES
gj+l ] ~
dj+2
(a)
(b) FIGURE 5.7 (a): The dyadic wavelet coefficients are computed by cascading convolutions with dilated filters hj and ~,j. (b): The original signal is reconstructed through convolutions with/tj and ~j. A multiplication by 1/2 is necessary to recover the next finer scale signal aj. If the input signal a0[n] has a finite size of N samples, the convolutions (5.86) are replaced by circular convolutions. The maximum scale 2J is then limited to N, and for J - log 2N one can verify that aj In] is constant and equal to N - 1/2 En=0 N- 1a0[n]. Suppose that h and g have respectively Kh and Kg non-zero samples. The "dilated" filters hj and gj have the same number of non-zero coefficients. The number of multiplications needed to compute aj+l and dj+l from aj o r the reverse is thus equal to (Kh + Kg)N. For J = log 2 N, the dyadic wavelet representation (5.89) and its inverse are thus calculated with (Kh + Kg)NlogzN multiplications and additions. 5.5.3
O r i e n t e d Wavelets for a Vision 3
Image processing applications of dyadic wavelet transforms are motivated by many physiological and computer vision studies. Textures can be synthesized and discriminated with oriented two-dimensional wavelet transforms. Section 6.3 relates multiscale edges to the local maxima of a wavelet transform. Oriented Wavelets
In two dimensions, a dyadic wavelet transform is computed with several mother wavelets {~k}l
57,
and ~ j (x) - ~:j~:( - x ) .
The wavelet transform of f C L 2 (]1~2) in the direction k is defined at the position u = (Ul,U2) and at the scale 2J by
Wk"f(u,2 j) - (f(x),r
u)) -
f .~,(u).
(5.90)
5.5 DYADICWAVELETTRANSFORM
157
As in Theorem 5.11, one can prove that the two-dimensional wavelet transform is a complete and stable signal representation if there exist A > 0 and B such that
K +~ V(M- (a.)l,(a32) C ItS.2 - {(0,0)} , A < ~ ~ l~,~(2Jo.,)l 2 < B. k=l j=-c~
(5.91)
Then there exist reconstruction wavelets {~k}l
1
K
Z ~-] Z ~'~ (2jcO) ~k, (2j~) _ 1, j=-c~ k--1
(5.92)
which yields +~
1
K
(5.93)
j=-o~
k=l
Wavelets that satisfy (5.91) are called dyadic wavelets. Families of oriented wavelets along any angle c~ can be designed as a linear expansion of K mother wavelets [312]. For example, a wavelet in the direction c~ may be defined as the partial derivative of order p of a window O(x) in the direction of the vector ff - (cos c~, sin c~):
Offp = c o s C ~ x l + s i n s
r
O(x).
This partial derivative is a linear expansion of K = p + 1 mother wavelets (5.94)
k--0 with
r
-
OPO(x)
for 0 < k <_ p.
For appropriate windows 0, these p + 1 partial derivatives define a family of dyadic wavelets. In the direction c~, the wavelet transform W~f(u,2 j) - f , ~ 2 j ( u ) is computed from the p + 1 components Wkf(u,2 j) - f,~k2j (u) with the expansion (5.94). Section 6.3 uses such oriented wavelets, with p = 1, to detect the multiscale edges of an image. Gabor Wavelets In the cat's visual cortex, Hubel and Wiesel [215] discovered a class of cells, called simple cells, whose responses depend on the frequency and orientation of the visual stimuli. Numerous physiological experiments [283] have shown that these cells can be modeled as linear filters, whose impulse responses have been measured at different locations of the visual cortex. Daugmann [149]
158
CHAPTERV FRANES
(02
--
(01
FIGURE 5.8 Each circle represents the frequency support of a dyadic wavelet ~2kj. This support size is proportional to 2-J and its position rotates when k is modified. showed that these impulse responses can be approximated by Gabor wavelets, obtained with a Gaussian window g(xl ,x2) multiplied by a sinusoidal wave: ff3k(xl,X2)
--
g(xl,x2)
exp[-ir/(x, cos c~ + X2 sin~k)].
The position, the scale and the orientation c~k of this wavelet depend on the cortical cell. These findings suggest the existence of some sort of wavelet transform in the visual cortex, combined with subsequent non-linearities [284]. The "physiological" wavelets have a frequency resolution on the order of 1-1.5 octaves, and are thus similar to dyadic wavelets. Let g(~ul,O32) be the Fourier transform of g(xl ,x2). Then ~2k, (C01,C02) -- ~
~(2Jcol-/] co80lk, 2Jc02 -- ~Tsinc~k).
In the Fourier plane, the energy of this Gabor wavelet is mostly concentrated around (2-Jr/cosc~k,2-J~sinc~k), in a neighborhood proportional to 2-J. Figure 5.8 shows a cover of the frequency plane by such dyadic wavelets. The bandwidth of g(o.) 1 , (.U2) and r/must be adjusted to satisfy (5.91). Texture Discrimination
Despite many attempts, there are no appropriate mathematical models for "homogeneous image textures." The notion of texture homogeneity is still defined with respect to our visual perception. A texture is said to be homogeneous if it is preattentively perceived as being homogeneous by a human observer. The texton theory of Julesz [231 ] was a first important step in understanding the different parameters that influence the perception of textures. The orientation of texture elements and their frequency content seem to be important clues for discrimination. This motivated early researchers to study the repartition of texture
5.5 DYADICWAVELET TRANSFORM
159
FIGURE 5.9 Gabor wavelet transform Iw~f(u,2J)l 2 of a texture patch, at the scales 2 .4 and 2 -5, along two orientations c~k respectively equal to 0 and 7r/2 for k = 1 and k = 2. The darker a pixel, the larger the wavelet coefficient amplitude.
energy in the Fourier domain [85]. For segmentation purposes, it is however necessary to localize texture measurements over neighborhoods of varying sizes. The Fourier transform was thus replaced by localized energy measurements at the output of filter banks that compute a wavelet transform [224, 244, 285, 334]. Besides the algorithmic efficiency of this approach, this model is partly supported by physiological studies of the visual cortex. Since W~:f (u,2 j) - (f (x), ~ j ( x - u)), we derive that Iwk f (u,2J)l 2 measures the energy of f in a spatial neighborhood of u of size 2J and in a frequency neighborhood of (2-Jr/cosc~k,2-Jr/sinc~) of size 2-J. Varying the scale 2J and the angle c~ modifies the frequency channel [100]. The wavelet transform energy IWkf(u,2J)[ 2 is large when the angle c~k and scale 2J match the orientation and scale of high energy texture components in the neighborhood of u. The amplitude of W~f(u,2J)12 can thus be used to discriminate textures. Figure 5.9 shows the dyadic wavelet transform of two textures, computed along horizontal and vertical orientations, at the scales 2 -4 and 2 -5 (the image support is normalized to [0,112). The central texture has more energy along horizontal high frequencies than the peripheric texture. These two textures are therefore discriminated by the wavelet oriented with c~ = 0 whereas the other wavelet corresponding c~k - 7r/2 produces similar responses for both textures. For segmentation, one must design an algorithm that aggregates the wavelet responses at all scales and orientations in order to find the boundaries of homogeneous textured regions. Both clustering procedures and detection of sharp transitions over wavelet energy measurements have been used to segment the image [224, 285, 334]. These algorithms work well experimentally but rely on ad
160
CHAPTER V
FRAMES
hoc parameter settings. A homogeneous texture can be modeled as a realization of a stationary process, but the main difficulty is to find the characteristics of this process that play a role in texture discrimination. Texture synthesis experiments [277, 313] show that Markov random field processes constructed over grids of wavelet coefficients offer a promising mathematical framework for understanding texture discrimination.
5.6
PROBLEMS 5.1.
1 Prove that ifK E Z - { 0 } then {ek[n] = frame of C u. Compute the frame bound.
5.2. 1 Prove that if K E 11~- {0} then {ek(t) of Lz[0,1]. Compute the frame bound. 5.3. 1 Let ~ = 1[_~0,~0]. Prove that normal basis of Lz(•). 5.4. 1 Let gn,k(t) = g ( t - nuo) included in [-Tr/~0,7r/~0].
exp(i27rkn/(KN))}o<_k
-- exp (i27rknt/K)}k~Z is a tight frame
{g(t-nuo) exp(iZkTrt/uo)}(k,,)~zz is an ortho-
exp(ik~ot), where g is a window whose support is
(a) Prove that Ig(t nu0)[ 2 f(t) (b) Prove Theorem 5.8.
+~ (f, gn,k)gn,k(t). = ~-~k=-~
-
5.5. 1 Compute the trigonometric polynomials ft(w) and ~,(w) of minimum degree that satisfy (5.78) for the spline filters (5.82, 5.83) with m = 2. Compute q~with WAVELAB. Is it a finite energy function? 5.6. 1 Compute a cubic spline dyadic wavelet with 2 vanishing moments using the filter h defined by (5.82) for m = 3, with a filter g having 3 non-zero coefficients. Compute in WAVELABthe dyadic wavelet transform of the Lady signal with this new wavelet. Calculate ~[n] if kt[n] -- h[n]. 5.7. 1 Let { g ( t - nuo) exp(ik~ot)}(,,,k)eZ2 be a windowed Fourier frame defined by g(t) = 71--1/4 e x p ( - t 2 / 2 ) with u0 = ~0 and u0~0 < 27r. With the conjugate gradient algorithm of Theorem 5.4, compute in MATLAB the window ~,(t) that generates the dual frame, for the values of u0 ~0 in Table 5.1. Compare ~, with g and explain your result. Verify numerically that when ~0 u0 = 27r then ~ is a discontinuous function that does not belong to L2(/~). 5.8. 1 Prove that a finite set of N vectors {~bn}~<,
x[n] - f(nT/K). Show that if w E [-Tr, Tr] then k(w) # 0 only if w C [-Tr/K,~/K]. (b) Let ~[n] = Q(x[n]) be the quantized samples. We now consider x[n] as a random vector, and we model the error x[n]-.~[n] - W[n] as a white noise process of variance o"2. Find the filter h[n] that minimizes -
E(ll~.h_xll~,
5.6 PROBLEMS
161
and compute this minimum as a function of cr2 and K. Compare your result with (5.43). (c) Let hp (~v) - (1 - e-i~~ -p be the transfer function of a discrete integration of order p. We quantizek[n] = a(x,hp[n]). Find the filter h[n] that minimizes = E{ll~*h-xll2}, and compute this minimum as a function of o"2, K and p. For a fixed oversampling factor K, how can we reduce this error? 5.10. 2 Let r be a dyadic wavelet that satisfies (5.68). Let 12(L2(~)) be the space of +oo sequences {gj(u)}jez such that ~-'~j=-o~ IlgJll 2 < + o o . (a) Verify that i f f E L2(~) then { W f ( u , 2 j) }jez E 12(L2(~)). Let ~ be defined by
r
=
+~ Ej=_oo 1~(2J~)l~'
and W -~ be the operator defined by +oo
w - ' {gj(u)b~= = ~
j=-~
1
~7 gj.r
Prove that W - i is the pseudo inverse of W in 12(L2(~)). (b) Verify that r has the same number of vanishing moments as r (c) Let V be the subspace of 12(L2(]~)) that regroups all the dyadic wavelet transforms of functions in L2(~). Compute the orthogonal projection of {gj(u)}jez in V. 5.11. 1 Prove that if there exist A > 0 and B > 0 such that A (2 -Ih(~o) I~) < ID(~o)I~ _ 8 (2 -I~@)1~), 9
(5.95)
and if r defined in (5.74) belongs to L2(~), then the wavelet ~ given by (5.75) is a dyadic wavelet. 5.12. 2 Zak transform The Zak transform associates to any f E L2(~) -4-oo
l).
Z f ( u , ~ ) -- ~ e i27rl~f ( u l:-oo
(a) Prove that it is a unitary operator from L2(]~) to L2[O, 112:
L]
f(t) g*(t)dt =
So'io'
Zf(u,~)Zg*(u,()dud~ ,
by verifying that for g = l[o,1] it transforms the orthogonal basis {g,,k(t) = g(t-n)exp(i27rkt)}(n,k)~z2 of L2(~) into an orthonormal basis of L2[O, 1]2. (b) Prove that the inverse Zak transform is defined by 1
k/h E L2[0,1] 2 , Z-lh(u) -
L
h(u,~)d~.
162
CHAPTERV FRAMES
(c) Prove that if g E LZCm) then {gCt- n) exPCi27rkt)}(n,k)~z2 is a frame of L 2(]~) if and only if there exist A > 0 and B such that V(u,~) E [0, 1]2 , A < IZg(u,~)l 2 <_B ,
(5.96)
where A and B are the frame bounds. (d) Prove that if (5.96) holds then the dual window g, of the dual frame is defined by Z~,(u,() = 1/Zg*(u,(). 5.13. 3 Suppose that )~ has a support in [-Tr/T, Tr/T]. Let {f(tn)}nrg be irregular samples that satisfy (5.4). With an inverse frame algorithm based on the conjugate gradient Theorem 5.4, implement in MATLABa procedure that computes {f(nT) }n~Z (from which f can be recovered with the sampling Theorem 3.1). Analyze the convergence rate of the conjugate gradient algorithm as a function of d;. What happens if the condition (5.4) is not satisfied? 5.14. 3 Develop a texture classification algorithm with a two-dimensional Gabor wavelet transform using four oriented wavelets. The classification procedure can be based on "feature vectors" that provide local averages of the wavelet transform amplitude at several scales, along these four orientations [224, 244, 285, 334].
VI WAVELET Z O O M
A
wavelet transform can focus on localized signal structures with a zooming procedure that progressively reduces the scale parameter. Singularities and irregular structures often carry essential information in a signal. For example, discontinuities in the intensity of an image indicate the presence of edges in the scene. In electrocardiograms or radar signals, interesting information also lies in sharp transitions. We show that the local signal regularity is characterized by the decay of the wavelet transform amplitude across scales. Singularities and edges are detected by following the wavelet transform local maxima at fine scales. Non-isolated singularities appear in complex signals such as multifractals. In recent years, Mandelbrot led a broad search for multifractals, showing that they are hidden in almost every corner of nature and science. The wavelet transform takes advantage of multifractal self-similarities, in order to compute the distribution of their singularities. This singularity spectrum is used to analyze multifractal properties. Throughout the chapter, the wavelets are real functions. 6. I
LIPSCHITZ REGULARITY 1
To characterize singular structures, it is necessary to precisely quantify the local regularity of a signal f(t). Lipschitz exponents provide uniform regularity measurements over time intervals, but also at any point v. If f has a singularity at v, which means that it is not differentiable at v, then the Lipschitz exponent at v characterizes this singular behavior. The next section relates the uniform Lipschitz regularity of f over R to the 163
164
CHAPTERVI WAVELETZOOM
asymptotic decay of the amplitude of its Fourier transform. This global regularity measurement is useless in analyzing the signal properties at particular locations. Section 6.1.3 studies zooming procedures that measure local Lipschitz exponents from the decay of the wavelet transform amplitude at fine scales.
6. I. I
Lipschitz Definition and Fourier Analysis
The Taylor formula relates the differentiability of a signal to local polynomial approximations. Suppose that f is m times differentiable in [ v - h, v + h]. Let Pv be the Taylor polynomial in the neighborhood of v: m-1 f(k)(v ) ( t - v ) k.
(6.1)
k=O
The Taylor formula proves that the approximation error ev(t) -- f (t) - pv(t) satisfies Vt E { v - h , v + h ]
, Ic~(t)l
It--v] m
sup
m!
uE[v-h,v+h]
]fm(u)].
(6.2)
The m th order differentiability of f in the neighborhood of v yields an upper bound on the error ev(t) when t tends to v. The Lipschitz regularity refines this upper bound with non-integer exponents. Lipschitz exponents are also called H61der exponents in the mathematical literature. Definition 6.1 (LIPSCHITZ) 9 A function f is pointwise Lipschitz c~ >_ 0 at v, if there exist K > O, and a polynomial pv of degree m = [c~J such that Vt c 11~ , If(t) - pv(t)l ~ g I t - v[ ~.
(6.3)
* A function f is uniformly Lipschitz c~ over [a,b] if it satisfies (6.3)for all v E [a, b], with a constant K that is independent of v. 9 The Lipschitz regularity of f at v or over [a, b] is the sup of the c~ such that f is Lipschitz c~. At each v the polynomial pv(t) is uniquely defined. If f is m - Lc~J times continuously differentiable in a neighborhood of v, then pv is the Taylor expansion of f at v. Pointwise Lipschitz exponents may vary arbitrarily from abscissa to abscissa. One can construct multifractal functions with non-isolated singularities, where f has a different Lipschitz regularity at each point. In contrast, uniform Lipschitz exponents provide a more global measurement of regularity, which applies to a whole interval. If f is uniformly Lipschitz c~ > m in the neighborhood
6. I
LIPSCHITZ REGULARITY
165
of v then one can verify that f is necessarily m times continuously differentiable in this neighborhood. If 0 < c~ < 1 then pv(t) - f ( v ) and the Lipschitz condition (6.3) becomes
Vt c R , [ f ( t ) - f ( v ) l <__g l t - v l ~. A function that is bounded but discontinuous at v is Lipschitz 0 at v. If the Lipschitz regularity is c~ < 1 at v, then f is not differentiable at v and c~ characterizes the singularity type. Fourier Condition The uniform Lipschitz regularity of f over IR is related to the asymptotic decay of its Fourier transform. The following theorem can be interpreted as a generalization of Proposition 2.1.
T h e o r e m 6.1 A function f is bounded and uniformly Lipschitz c~ over ~ if fl
~ If(co)l (1 -F I ~ l ~ ) d ~ < -+-c~.
(6.4)
Proof 1. To prove that f is bounded, we use the inverse Fourier integral (2.8) and (6.4) which shows that
/'~ ~
f"lC)
I,.I,>, <_
<
Let us now verify the Lipschitz condition (6.3) when 0 <__c~ < 1. In this case pv(t) = f (v) and the uniform Lipschitz regularity means that there exists K > 0 such that for all (t,v) C IR2 If(t) - f(v)l < g. It_vl ~ Since
'/7
f(t)
=
2--7
If (t) - f (v)l It-vl ~
< -
-27r
f (co) exp(icot) dco,
l f i~ If(~)l
[exp(iwt) -exp(iwv)l dw" It-vl ~
For I t - v1-1 < I~1,
[exp(iwt)-exp(iwv)l < [t_vl a
2 it
vl~ <2lwl ~.
For I t - v1-1 ~ I~1, [exp(i~t)-exp(icov)l < I~11t-vl -< I~1". It-vl a - It-vl a Cutting the integral (6.5) in two for
If(t)-f.(dv)l it-vi-
I~1 < I t - vl -~ and I~1 ~ I t - v1-1 yields
i f +~ ~ 2l}'(~o)l I~ol~d~o- g.
-< 2-7
(6.5)
166
CHAPTERVI WAVELETZOOM
If (6.4) is satisfied, then K < +oo so f is uniformly Lipschitz c~. Let us extend this result for m - [c~J > 0. We proved in (2.42) that (6.4) implies that f is m times continuously differentiable. One can verify that f is uniformly Lipschitz c~over R if and only if f(m) is uniformly Lipschitz c~- m over ~. The Fourier transform of f(m) is (ico)mf(w). Since 0 < c~- m < 1, we can use our previous result which proves that f(m) is uniformly Lipschitz c~- m, and hence that f is uniformly Lipschitz o~.
II
The Fourier transform is a powerful tool for measuring the minimum global regularity of functions. However, it is not possible to analyze the regularity of f at a particular point v from the decay of If(~c)l at high frequencies ~. In contrast, since wavelets are well localized in time, the wavelet transform gives Lipschitz regularity over intervals and at points.
6.1.2
Wavelet Vanishing Moments
To measure the local regularity of a signal, it is not so important to use a wavelet with a narrow frequency support, but vanishing moments are crucial. If the wavelet has n vanishing moments then we show that the wavelet transform can be interpreted as a multiscale differential operator of order n. This yields a first relation between the differentiability of f and its wavelet transform decay at fine scales.
Polynomial Suppression The Lipschitz property (6.3) approximates f with a polynomial Pv in the neighborhood of v: f(t) = pv(t)+ev(t)
with lev(t)l _< g l t - v l
~ 9
(6.6)
A wavelet transform estimates the exponent c~ by ignoring the polynomial Pv. For this purpose, we use a wavelet that has n > c~ vanishing moments:
f
+~tk~(t)dt--O
for 0 _ < k < n .
A wavelet with n vanishing moments is orthogonal to polynomials of degree n - 1. Since c~ < n, the polynomial Pv has degree at most n - 1. With the change of variable t' - ( t - u)/s we verify that 1 r ( ~ ) Wpv(U,S) = f + ~oo pv(t) --~ Since f -
dt - O.
(6.7)
Pv + Cv, W f ( u , s ) = Wev(U,S).
(6.8)
Section 6.1.3 explains how to measure c~ from ]Wf(u,s)l when u is in the neighborhood of v.
6. I
LIPSCHITZ REGULARITY
167
Multiscale Differential Operator The following proposition proves that a wavelet with n vanishing moments can be written as the n th order derivative of a function 0; the resulting wavelet transform is a multiscale differential operator. We suppose that ~ has a fast decay which means that for any decay exponent m E N there exists Cm such that
vt ~ R , I~(t)l <
Cm l+rtl m
9
(6.9)
T h e o r e m 6.2 A wavelet ~b with a fast decay has n vanishing moments if and only
if there exists 0 with a fast decay such that d"O(t) dt n
~b(t) - ( - 1 ) " ~ .
(6.10)
As a consequence an
W f ( u s) - s n ~ ( f , du n
,Os)(U)
,
(6.11)
with Os(t) - s - 1 / z o ( - t / s ) . Moreover, ~ has no more than n vanishing moments if and only if f + ~ O(t)dt ~ O. Proof'. The fast decay of ~ implies that ~ is C ~. This is proved by setting f - ~ in Proposition 2.1. The integral of a function is equal to its Fourier transform evaluated at co = 0. The derivative property (2.22) implies that for any k < n
f+~o t k ~b(t)dt - (i)k~ (k) (0) -- O.
(6.12)
We can therefore make the factorization +(cO) -- (--icO) n
0(cO),
(6.13)
and 0(cO) is bounded. The fast decay of 0 is proved with an induction on n. For n -- 1,
O(t) =
it
~(u)du =
~b(u)du,
oo
and the fast decay of 0 is derived from (6.9). We then similarly verify that increasing by 1 the order of integration up to n maintains the fast decay of 0. Conversely, Ib(~)l <_f + ~ [O(t)ldt < +oo, because 0 has a fast decay. The Fourier transform of (6.10) yields (6.13) which implies that ~;(e) (0) = 0 for k < n. It follows from (6.12) that ~b has n vanishing moments. To test whether ~b has more than n vanishing moments, we compute with (6.13)
f+oo tn~o(t) dt = (i)" ~;(n) (0) __ (--i)nn!O(O). Clearly, ~bhas no more thann vanishing moments if and only if b(0) - f+~ o(t)dt r o.
168
CHAPTER Vl
WAVELET ZOOM
FIGURE 6. I Wavelet transform W f ( u , s ) calculated with ~b = - 0 ' where 0 is a Gaussian, for the signal f shown above. The position parameter u and the scale s vary respectively along the horizontal and vertical axes. Black, grey and white points correspond respectively to positive, zero and negative wavelet coefficients. Singularities create large amplitude coefficients in their cone of influence. The wavelet transform (4.32) can be written
Wf(u,s) = f , ~ ( u )
with ~p~(t)= ~
.
(6.14)
We derive from (6.10) that ~b~(t) -- sn d"9~(t) tit" " Commuting the convolution and differentiation operators yields
Wf(u,s)
d"O~
= sn f "k " - ~ ( U )
= Sn
d~ -~u~( f ,Os)(U).
If K - f _ L~ O(t)dt ~ 0 then the convolution f *Os(t) can be interpreted as a weighted average of f with a kemel dilated by s. So (6.11) proves that W f ( u , s ) is an n th order derivative of an averaging of f over a domain proportional to s. Figure 6.1 shows a wavelet transform calculated with ~b - - 0 ' , where 0 is a Gaussian. The resulting W f ( u , s ) is the derivative of f averaged in the neighborhood of u with a Gaussian kemel dilated by s. Since 0 has a fast decay, one can verify that lira 1 ~_~o-~0, = K6 ,
6. I
LIPSCHITZ REGULARITY
169
in the sense of the weak convergence (A.30). This means that for any 05 that is continuous at u, ls-~O i m e * --~ 1 Os(u) -- K (p(u). If f is n times continuously differentiable in the neighborhood of u then (6.11) implies that Wf(u,s) lim s--+O S n+l/2
. 10s(u) --- ~llI~ f(n) . --~
= g f (n) (u)
(6.15)
In particular, if f is C" with a bounded n th order derivative then [Wf(u,s)] = O(sn+l/2). This is a first relation between the decay of IWf(u,s)l when s decreases and the uniform regularity of f . Finer relations are studied in the next section.
6.1.3
Regularity Measurements with Wavelets
The decay of the wavelet transform amplitude across scales is related to the uniform and pointwise Lipschitz regularity of the signal. Measuring this asymptotic decay is equivalent to zooming into signal structures with a scale that goes to zero. We suppose that the wavelet ~b has n vanishing moments and is C" with derivatives that have a fast decay. This means that for any 0 < k ___n and m C N there exists Cm such that Mt C ~ ,
I~(k)(t)l _<
(6.16)
Cm . 1 + [tl m
The following theorem relates the uniform Lipschitz regularity of f on an interval to the amplitude of its wavelet transform at fine scales. Theorem 6.3 If f C L2(R) is uniformly Lipschitz c~ < n over [a,b], then there exists A > 0 such that V(u,s) C [a,b] x R + , [Wf(u,s)[ ~ A s ~+1/2.
(6.17)
Conversely, suppose that f is bounded and that W f (u,s) satisfies (6.17)for an < n that is not an integer. Then f is uniformly Lipschitz c~ on [a + e, b - e], for anye >O. Proof 3. This theorem is proved with minor modifications in the proof of Theorem 6.4. Since f is Lipschitz c~ at any v E [a, b], Theorem 6.4 shows in (6.20) that V(u,s) e n~ x ~ +
,
IWf(u,s)l ~
As ~+1/2 (1 +
U--V S
For u e [a,b], we can choose v -- u, which implies that IWf(u,s)l ~ As ~+1/2. We verify from the proof of (6.20) that the constant A does not depend on v because the Lipschitz regularity is uniform over [a, b].
170
CHAPTERVI WAVELETZOOM
To prove that f is uniformly Lipschitz a over [a + e , b - e] we must verify that there exists K such that for all v C [a + e, b - {] we can find a polynomial Pv of degree La] such that Vt E ]R , ] f ( t ) - p v ( t ) l < _ K I t - v l a (6.18) When t ~ [a 4- e/Z,b - e/2] then It - v[ _> e/2 and since f is bounded, (6.18) is verified with a constant K that depends on e. For t E [a + e/2,b - e/2], the proof follows the same derivations as the proof of pointwise Lipschitz regularity from (6.21) in Theorem 6.4. The upper bounds (6.26) and (6.27) are replaced by VtE[a+~/Z,b-{/2]
, IA~k)(t)l_
(6.19)
This inequality is verified by computing an upper bound integral similar to (6.25) but which is divided in two, for u c [a,b] and u q~ [a,b]. When u C [a,b], the condition (6.21) is replaced by IWf(u,s)l <_A s ~+1/2 in (6.25). When u ~ [a,b], we just use the fact that [Wf(u,s)[ <_ [[f [ [[~b[[ and derive (6.19) from the fast decay of [~(k)(t)[, by observing that [t - u[ _> c/2 for t E [a + e/2,b - e/2]. The constant K depends on A and e but not on v. The proof then proceeds like the proof of Theorem 6.4, and since the resulting constant K in (6.29) does not depend on v, the Lipschitz regularity is uniform over [a - ~, b + ~]. I The inequality (6.17) is really a condition on the asymptotic decay of [ W f ( u , s ) [ when s goes to zero. At large scales it does not introduce any constraint since the Cauchy-Schwarz inequality guarantees that the wavelet transform is bounded: [ W f ( u , s ) [ - [ ( f ,~bu,s)[ <_ [[ill limb[ .
When the scale s decreases, W f ( u , s ) measures fine scale variations in the neighborhood of u. Theorem 6.3 proves that [ W f (u, s)] decays like s ~+1/2 over intervals where f is uniformly Lipschitz a. Observe that the upper bound (6.17) is similar to the sufficient Fourier condition of Theorem 6.1, which supposes that If(u;)[ decays faster than aJ -~. The wavelet scale s plays the role of a "localized" inverse frequency u~-1. As opposed to the Fourier transform Theorem 6.1, the wavelet transform gives a Lipschitz regularity condition that is localized over any finite interval and it provides a necessary condition which is nearly sufficient. When [a,b] - IR then (6.17) is a necessary and sufficient condition for f to be uniformly Lipschitz a on IR. If ~b has exactly n vanishing moments then the wavelet transform decay gives no information concerning the Lipschitz regularity of f for a > n. If f is uniformly Lipschitz a > n then it is C n and (6.15) proves that lims_+OS -n-l~2 W f ( u , s ) K f ( n ) ( u ) with K :/: 0. This proves that ] W f ( u , s ) [ ~ s n+l/2 at fine scales despite the higher regularity of f . If the Lipschitz exponent a is an integer then (6.17) is not sufficient in order to prove that f is uniformly Lipschitz a. When [a,b] - ~ , if a - 1 and ~ has two vanishing moments, then the class of functions that satisfy (6.17) is called the Z y g m u n d class [47]. It is slightly larger than the set of functions that are uniformly Lipschitz 1. For example, f ( t ) - t loget belongs to the Zygmund class although it is not Lipschitz 1 at t - 0.
6. I
LIPSCHITZ REGULARITY
1 71
Point'wise Lipschitz Regularity The study of pointwise Lipschitz exponents with the wavelet transform is a delicate and beautiful topic which finds its mathematical roots in the characterization of Sobolev spaces by Littlewood and Paley in the 1930's. Characterizing the regularity of f at a point v can be difficult because f may have very different types of singularities that are aggregated in the neighborhood of v. In 1984, Bony [99] introduced the "two-microlocalization" theory which refines the Littlewood-Paley approach to provide pointwise characterization of singularities, which he used to study the solution of hyperbolic partial differential equations. These technical results became much simpler through the work of Jaffard [220] who proved that the two-microlocalization properties are equivalent to specific decay conditions on the wavelet transform amplitude. The following theorem gives a necessary condition and a sufficient condition on the wavelet transform for estimating the Lipschitz regularity of f at a point v. Remember that the wavelet ~ has n vanishing moments and n derivatives having a fast decay. Theorem 6.4 (JAFFARD) If f C L2(]~) is Lipschitz ~ <_ n at v, then there exists A such that l,l - -
V(u,s) E R • R + , IWf(u,s)l <_ As c~+1/2 1-4-
V
.
s
(6.20)
Conversely, if ~ < n is not an integer and there exist A and c~' < c~ such that v ( u , s ) ~ R • R + , I w f ( ~ , ~ ) l <_ A s ~+~/2
1+
(6.21)
S
then f is Lipschitz ct at v. Proof. The necessary condition is relatively simple to prove but the sufficient condition is much more difficult. 9Proof 1 of (6.20) Since f is Lipschitz c~ at v, there exists a polynomial pv of degree Lc~J < n and K such that if(t) - pv(t) I < K i t - v[~. Since ~ has n vanishing moments, we saw in (6.7) that Wpv(U,S) = 0 and hence IWf (u,s)l
-
f (t) - pv(t)
<_
KIt-vl~--~
) --~, ~ r
~
o~
--~ dt.
S
The change of variable x = (t - u)/s gives
Iwf(,,s)l <_ ~
glsx+u-vl~lr oo
Since la + bl ~ < 2~ (lal ~ + Ibl~),
Wf(u,s)l <_K2~x/~ (s ~
Ix~lr
lu-vl ~f?
Ir
dx)
172
CHAPTERVl WAVELET ZOOM
which proves (6.20). 9 Proof 2 of (6.21) The wavelet reconstruction formula (4.37) proves that f can be decomposed in a Littlewood-Paley type sum +~
f(t) = Z
(6.22)
Aj(t)
j---oo
with Aj(t) - ~
W f (u,s)
J2J
l
--~
ds --fi du .
~2
(6.23)
Let A~k) be its k th order derivative. To prove that f is Lipschitz a at v we shall approximate f with a polynomial that generalizes the Taylor polynomial ,1#
pv(t) = Z
A~k) (v)
k=0
.
(6.24)
j
If f is n times differentiable at v then Pv corresponds to the Taylor polynomial but this is +~ (k) not necessarily true. We shall first prove that ~--]j=_~ Aj (v) is finite by getting upper bounds on iA~k) (t)l. These sums may be thought of as a generalization of pointwise derivatives. To simplify the notation, we denote by K a generic constant which may change value from one line to the next but that does not depend on j and t. The hypothesis (6.21) and the asymptotic decay condition (6.16) imply that
IAj(t)l
-
C+
_<
K
--
j=j
f +oc ~o 2 ~j
As
~
(
U-- •
1 +
u- v 1+ ~
~
ds m s 2 du
Cm
s
l+l(t-u)/sl
1 l+l(t-u)/2Jl
du m 2-7
(6.25)
Since lu - vl ~' <_ 2 <~'( l u - tl<~' + i t - v]"'), the change of variable u' = 2-J ( u - t) yields ci #
IAj(t)l < K2 ~s f + o o
l + lu'l~' + l ( v - t ) / 2 j
-
1 + lu'l m
du'.
Choosing m - a' + 2 yields
Izxj(t)l _< K2 ~j
V--I
1 + -~
.
(6.26)
The same derivations applied to the derivatives of Aj(t) yield
Vk < La] + 1 , IA~~) (t)l < K2 (~-k)j
1+ ~
.
(6.27)
At t = v it follows that Vk _< LaJ , ]A~~) (v)] _< K 2 (~-k)j .
(6.28)
6. I
LIPSCHITZ REGULARITY
I 73
This guarantees a fast decay of I/x~ k) (v)l when 2 j goes to zero, because c~ is not an integer so (~ > Lc~J. At large scales 2J, since IWf(u,s)l <_Ilfll I1r with the change of variable u' = ( t - u)/s in (6.23) we have
IA~~)(v)l <_ IlfllC~I1r
f+~
i~(k)(ut)ldu, j2~2]+1
ds $3/2+k
and hence IA~k) (v)l < K2 -(k+~/2)j. Together with (6.28) this proves that the polynomial pv defined in (6.24) has coefficients that are finite. With the Littlewood-Paley decomposition (6.22) we compute
I:(,)
-
-
A,(,)
_
j
(v) k=0
The sum over scales is divided in two at 2 ] such that 2J > I t - v I > 2 J-1 . For j _> J, we can use the classical Taylor theorem to bound the Taylor expansion of Aj.
E j=J
L~J
A~(,)- Z~x~ ~(v)
(t v) k
-~.
k--O
+~ ( t - v) L~j4-1 /~J4-1 j~] sup I~j (h)l. = (L~J + 1)! h~[t,v] Inserting (6.27) yields -4-0o
I < K l t - v l L~j+I ~-~2 -j(L~j+'-~) j=J
v-t
-T7
and since 2 J > It - vl _> 2 J-~ we get I < K Iv - tl ~. Let us now consider the case j < J J-1 n
._~
E
((
j~-oo
_<
K~
2 ~j
k=O
iv,l
1 + ~
+
(
j=-oo
<
K
k=0
. - k!-
2 ~J + 2 ( ~ - ` r k--0
and since 2] _> It - vl >_ 2]-' we get II < K Iv - tl ~. As a result
If(t) - pv(t)l <_ I + II <_ K ]v - tl ~ which proves that f is Lipschitz c~ at v.
(6.29) I
174
CHAPTERVI
WAV E L E T
v
0
ZOOM :,- U
lu-vl > c s
lu-vl >
FIGURE 6.2 The cone of influence of an abscissa v consists of the scale-space points (u,s) for which the support of ~u,s intersects t - v. To interpret more easily the necessary condition (6.20) and the sufficient condition (6.21), we shall suppose that ~ has a compact support equal to [ - C , C]. The cone of influence of v in the scale-space plane is the set of points (u,s) such that v is included in the support of Cu,s(t) = s -1/2 r u)/s). Since the support of ~ ( ( t - u)/s) is equal to [u - Cs, u + Cs], the cone of influence of v is defined by l u - v I <_ Cs. (6.30) Cone of Influence
It is illustrated in Figure 6.2. If u is in the cone of influence of v then Wf(u,s) (f, Cu,sl depends on the value of f in the neighborhood of v. Since [u - vl/s <_C, the conditions (6.20,6.21) can be written
[Wf(u,s)l < A' Sc~+1/2 which is identical to the uniform Lipschitz condition (6.17) given by Theorem 6.3. In Figure 6.1, the high amplitude wavelet coefficients are in the cone of influence of each singularity.
Oscillating Singularities It may seem surprising that (6.20,6.21) also impose a condition on the wavelet transform outside the cone of influence of v. Indeed, this corresponds to wavelets whose support does not intersect v. For l u - v I > Cs we get IWf(u,s)l <_A's ~-~'+'/2 l u - vl a. (6.31) We shall see that it is indeed necessary to impose this decay when u tends to v in order to control the oscillations of f that might generate singularities. Let us consider the genetic example of a highly oscillatory function 1
f(t) - s i n - , t
which is discontinuous at v = 0 because of the acceleration of its oscillations. Since is a smooth C n function, if it is centered close to zero then the rapid oscillations
6. I
LIPSCHITZ REGULARITY
175
FIGURE 6.3 Wavelet transform of f(t) -- sin(at -1) calculated with ~ = - 0 ' where 0 is a Gaussian. High amplitude coefficients are along a parabola below the cone of influence of t = 0. of sin t- 1 produce a correlation integral ( sin t- 1, l/)u,s) that is very small. With an integration by parts, one can verify that if (u, s) is in the cone of influence of v = 0, then IWf(u,s)l <_As 2+~/2. This looks a s if f is Lipschitz 2 at 0. However, Figure 6.3 shows high energy wavelet coefficients below the cone of influence of v = 0, which are responsible for the discontinuity. To guarantee that f is Lipschitz c~, the amplitude of such coefficients is controlled by the upper bound (6.31). To explain why the high frequency oscillations appear below the cone of influence of v, we use the results of Section 4.4.2 on the estimation of instantaneous frequencies with wavelet ridges. The instantaneous frequency of sint -1 = sin qS(t) is I~b'(t)] = t -2. Let 2/3~ be the analytic part of ~, defined in (4.47). The corresponding complex analytic wavelet transform is w a f ( u , s ) --- (f, ~a,s ). It was proved in (4.101) that for a fixed time u, the maximum of s-~/Zlwaf(u,s)] is located at the scale s(u)-
u2,
where ~7is the center frequency of ~a (~). When u varies, the set of points (u,s(u)) define a ridge that is a parabola located below the cone of influence of v = 0 in the plane (u,s). Since ~ -- Real[~a], the real wavelet transform is
Wf (u,s) -- Real[Wa f (u,s)]. The high amplitude values of Wf(u,s) are thus located along the same parabola ridge curve in the scale-space plane, which clearly appears in Figure 6.3. Real wavelet coefficients Wf(u,s) change sign along the ridge because of the variations of the complex phase of w a f ( u , s ) .
176
CHAPTERVl WAVELETZOOM
The example of f(t) = sint -1 can be extended to general oscillatory singularities [33]. A function f has an oscillatory singularity at v if there exist c~ _> 0 and /3 > 0 such that for t in a neighborhood of v
f (t) ~ [t - v[ ~ g
it _ vl ~
,
where g(t) is a C a oscillating function whose primitives at any order are bounded. The function g(t) - sint is a typical example. The oscillations have an instantaneous frequency ~b'(t) that increases to infinity faster than It1-1 when t goes to v. High energy wavelet coefficients are located along the ridge s(u) -- rl/cy(u), and this curve is necessarily below the cone of influence lu - v I <_ Cs.
6.2
WAVELET TRANSFORM MODULUS MAXIMA 2
Theorems 6.3 and 6.4 prove that the local Lipschitz regularity of f at v depends on the decay at fine scales of [Wf(u,s)l in the neighborhood of v. Measuring this decay directly in the time-scale plane (u,s) is not necessary. The decay of IWf(u,s)l can indeed be controlled from its local maxima values. We use the term modulus maximum to describe any point (uo,so) such that IW f (u, so)l is locally maximum at u - u0. This implies that
OWf(uo,so) = 0 . Ou This local maximum should be a strict local maximum in either the fight or the left neighborhood of u0, to avoid having any local maxima when [Wf(u,so)l is constant. We call maxima line any connected curve s(u) in the scale-space plane (u,s) along which all points are modulus maxima. Figure 6.5(b) shows the wavelet modulus maxima of a signal.
6.2. I
Detection of Singularities
Singularities are detected by finding the abscissa where the wavelet modulus maxima converge at fine scales. To better understand the properties of these maxima, the wavelet transform is written as a multiscale differential operator. Theorem 6.2 proves that if ~b has exactly n vanishing moments and a compact support, then there exists 0 of compact support such that r = ( - 1)n0 (n) with f + ~ O(t)dt ~ O. The wavelet transform is rewritten in (6.11) as a multiscale differential operator dn
Wf(u,s) --S n --~un( f *Os)(U).
(6.32)
If the wavelet has only one vanishing moment, wavelet modulus maxima are the maxima of the first order derivative of f smoothed by Os, as illustrated by Figure 6.4. These multiscale modulus maxima are used to locate discontinuities, and edges in images. If the wavelet has two vanishing moments, the modulus maxima correspond to high curvatures. The following theorem proves that if Wf(u,s) has no modulus maxima at fine scales, then f is locally regular.
177
6.2 WAVELET TRANSFORM MODULUS MAXIMA
fit)
__l~ f
i i I
i I
''
f* Os(u)
I
i t i I
i I
~U
i I
W1 flu,s)
i
~ U
i i i t
W 2 flu,s)
i
~
~- u
FIGURE 6.4 The convolution f.Os(U) averages f over a domain proportional to s. If ~ - - 0 t then W l f ( u , s ) - sA-au(f* Os)(U) has modulus maxima at sharp variation points of f . O s ( u ) . If ~ - 0" then the modulus maxima of W2f(u,s) S 2 -d-yz(f*Os)(U) d2
correspond to locally maximum curvatures.
Theorem 6.5 (HWANG, MALLAT) Suppose that ~ is C" with a compact support, and ~ - ( - 1 ) n o (n) with f_+~O(t)dt ~ O. Let f E Ll[a,b]. Ifthere exists so > 0 such that IWf(u,s)l has no local maximum for u E [a,b] and s < so, then f is uniformly Lipschitz n on [a + e, b - e], for any e > O. This theorem is proved in [258]. It implies that f can be singular (not Lipschitz 1) at a point v only if there is a sequence of wavelet maxima points (Up,Sp)pE N that converges towards v at fine scales: lim Up - V
p--++co
and
lim s p - O .
p--++co
These modulus maxima points may or may not be along the same maxima line. This result guarantees that all singularities are detected by following the wavelet transform modulus maxima at fine scales. Figure 6.5 gives an example where all singularities are located by following the maxima lines.
MaximaPropagation
For all ~ = ( - 1)n 0(n), we are not guaranteed that a modulus maxima located at (u0, s0) belongs to a maxima line that propagates towards finer scales. When s decreases, W f ( u , s ) may have no more maxima in the neighborhood of u = u0. The following proposition proves that this is never the case if 0 is a Gaussian. The wavelet transform W f ( u , s ) can then be written as the solution of the heat diffusion equation, where s is proportional to the diffusion time. The
178
CHAPTERVI WAVEkETZOOM
m a x i m u m principle applied to the heat diffusion equation proves that m a x i m a may not disappear when s decreases. Applications of the heat diffusion equation to the analysis of multiscale averaging have been studied by several computer vision researchers [217, 236, 359].
Proposition 6.1 (HUMMEL, POGGIO, YUILLE) Let ~2 = ( - 1 ) n o (n) where 0 is a Gaussian. For any f e L2(R), the modulus maxima o f W f ( u , s ) belong to connected curves that are never interrupted when the scale decreases.
Proof 3. To simplify the proof, we suppose that 0 is a normalized Gaussian O(t) -2-17r -1/2 e x p ( - t 2 / 4 ) whose Fourier transform is 0(w) = exp(-w2). Theorem 6.2 proves that Wf(u,s) = s n f(n) *Os(U), (6.33) where the n th derivative f(n) is defined in the sense of distributions. Let 7- be the diffusion time. The solution of
Og(7-,u)
OZg(7-,u)
OT
OU 2
(6.34)
with initial condition g(O,u) = go(u) is obtained by computing the Fourier transform with respect to u of (6.34):
Og(w,u) = --w e b~,(7-,w). 07It follows that ~(7-,w) -- ~0(w) exp(-7-w 2) and hence g(u, ~) - ~
1
x/ 7-
go .O~(~).
For 7- = s, setting go = f(n) and inserting (6.33) yields Wf(u,s) = s n+~/2 g(u,s). The wavelet transform is thus proportional to a heat diffusion with initial condition f(n). The maximum principle for the parabolic heat equation [36] proves that a global maximum of Ig(u,s)l for (u,s) C [a,b] • [s0,sl] is necessarily either on the boundary u = a,b or at s = so. A modulus maxima of Wf(u,s) at (Ul,Sl) is a local maxima of Ig(u,s)l for a fixed s and u varying. Suppose that a line of modulus maxima is interrupted at (Ul ,Sl), with s~ > 0. One can then verify that there exists e > 0 such that a global maximum of Ig(u,s)l over [Ul-e, ul +e] x [Sl- e, Sl] is at (Ul,Sl). This contradicts the maximum principle, and thus proves that all modulus maxima propagate towards finer scales. II Derivatives of Gaussians are most often used to guarantee that all m a x i m a lines propagate up to the finest scales. Chaining together m a x i m a into m a x i m a lines is also a procedure for removing spurious modulus m a x i m a created by numerical errors in regions where the wavelet transform is close to zero.
6.2
WAVELET TRANSFORM MODULUS MAXIMA
| 79
FIGURE 6.5 (a): Wavelet transform Wf(u,s). The horizontal and vertical axes give respectively u and logzs. (b): Modulus maxima of Wf(u,s). (c): The full line gives the decay of log2 [Wf(u,s)l as a function of logzs along the maxima line that converges to the abscissa t - 0.05. The dashed line gives log 2 IWf(u,s)l along the left maxima line that converges to t = 0.42.
180
CHAPTERVl WAVELETZOOM
Isolated Singularities A wavelet transform may have a sequence of local maxima that converge to an abscissa v even though f is perfectly regular at v. This is the case of the maxima line of Figure 6.5 that converges to the abscissa v - 0.23. To detect singularities it is therefore not sufficient to follow the wavelet modulus maxima across scales. The Lipschitz regularity is calculated from the decay of the modulus maxima amplitude. Let us suppose that for s < so all modulus maxima that converge to v are included in a cone l u - v I < Cs. (6.35) This means that f does not have oscillations that accelerate in the neighborhood of v. The potential singularity at v is necessarily isolated. Indeed, we can derive from Theorem 6.5 that the absence of maxima below the cone of influence implies that f is uniformly Lipschitz n in the neighborhood of any t 7~ v with t C (v - Cso, v + Cso). The decay of IWf(u,s)l in the neighborhood of v is controlled by the decay of the modulus maxima included in the cone l u - v[ < Cs. Theorem 6.3 implies that f is uniformly Lipschitz c~ in the neighborhood of v if and only if there exists A > 0 such that each modulus maximum (u,s) in the cone (6.35) satisfies (6.36)
IWf(u,s)l <_As c~+l/2, which is equivalent to
]og2[Wf(u,s)l <_log2A+
(1) c~+~
log2s.
(6.37)
The Lipschitz regularity at v is thus the maximum slope of lo62 IWf(u,s)l as a function of log 2 s along the maxima lines converging to v. In numerical calculations, the finest scale of the wavelet transform is limited by the resolution of the discrete data. From a sampling at intervals N -1, Section 4.3.3 computes the discrete wavelet transform at scales s > AN -1, where A is large enough to avoid sampling coarsely the wavelets at the finest scale. The Lipschitz regularity c~ of a singularity is then estimated by measuring the decay slope of log 2 IWf(u,s)l as a function of log2s for 2 J >__s _ AN -1. The largest scale 2 J should be smaller than the distance between two consecutive singularities to avoid having other singularities influence the value of Wf(u,s). The sampling interval N-1 must therefore be small enough to measure c~ accurately. The signal in Figure 6.5(a) is defined by N - 256 samples. Figure 6.5(c) shows the decay of lo62 IWf(u,s)l along the maxima line converging to t - 0.05. It has slope c~ + 1/2 ~ 1/2 for 2 -4 >_ s >__2 -6. As expected, c ~ - 0 because the signal is discontinuous at t - 0.05. Along the second maxima line converging to t - 0.42 the slope is c~+ 1/2 ~ 1, which indicates that the singularity is Lipschitz 1/2. When f is a function whose singularities are not isolated, finite resolution measurements are not sufficient to distinguish individual singularities. Section 6.4 describes a global approach that computes the singularity spectrum of multifractals by taking advantage of their self-similarity.
181
6.2 WAVELET TRANSFORM MODULUS MAXIMA
Smoothed Singularities The signal may have important variations that are infinitely continuously differentiable. For example, at the border of a shadow the grey level of an image varies quickly but is not discontinuous because of the diffraction effect. The smoothness of these transitions is modeled as a diffusion with a Gaussian kernel whose variance is measured from the decay of wavelet modulus maxima. In the neighborhood of a sharp transition at v, we suppose that (6.38)
f (t) = f o * g~(t), where g~ is a Gaussian of variance 0-2: cr v / ~ exp
~
.
(6.39)
If f0 has a Lipschitz c~ singularity at v that is isolated and non-oscillating, it is uniformly Lipschitz c~ in the neighborhood of v. For wavelets that are derivatives of Gaussians, the following theorem [261 ] relates the decay of the wavelet transform to cr and c~. T h e o r e m 6.6 Let ~ - ( - 1) n 0 (n) with O(t) - ,~ e x p ( - t 2/(2/3 2)). I f f - f o * g~ and f o is uniformly Lipschitz oL on [v - h, v § h] then there exists A such that g(u,s) E [ v - h , v + h ]
xlR + , I W f ( u , s ) l <_As c~+1/2
( 1 + -(n-~ 0"2- ) ~--U~x2
(6.40)
Proof 2. The wavelet transform can be written d" d~ Wf(u,s)--s"~(f ,Os)(U)=S"~(fo,g~,Os)(U). (6.41) du ~ du ~ Since 0 is a Gaussian, one can verify with a Fourier transform calculation that
Os* g~(t) =
s Oso(t) with So --
s 2 +/3-5.
(6.42)
Inserting this result in (6.41) yields
W f ( u s) -- s" '
~0s
( Is n-k-l/2Wfo(u, so).
d" -du -g(f~176
So
(6.43)
Since f0 is uniformly Lipschitz a on [v - h, v + h], Theorem 6.3 proves that there exists A > 0 such that
V(u,s) r [ v - h , v + h ] x R + , IWfo(u,s)l
~_Asa+l/2
(6.44)
Inserting this in (6.43) gives
IWf(u,s)l <_A
( So s
SO-t-1/2,
from which we derive (6.40) by inserting the expression (6.42) of So.
(6.45) I
182
CHAPTERVl WAVELETZOOM
F I G U R E 6.6 (a)" Wavelet transform Wf(u,s). (b)" Modulus m a x i m a of a wavelet transform computed ~ = 0", where 0 is a Gaussian with variance/3 1. (c): Decay of log2 ]Wf(u,s)j along maxima curves. In the left figure, the solid and dotted lines correspond respectively to the maxima curves converging to t - O. 81 and t - 0.12. In the fight figure, they correspond respectively to the curves converging to t - 0.38 and t - O. 55. The diffusion at t - 0.12 and t - O. 55 modifies the decay for s < cr - 2 -5.
6.2
183
WAVELET TRANSFORM MODULUS MAXIMA
Theorem 6.6 explains how the wavelet transform decay relates to the amount of diffusion of a singularity. At large scales s >> or//3, the Gaussian averaging is not "felt" by the wavelet transform which decays like s ~+1/2. For s < or//3, the variation of f at v is not sharp relative to s because of the Gaussian averaging. At these fine scales, the wavelet transform decays like s n+1/2 because f is C ~. The parameters K, c~, and cr are numerically estimated from the decay of the modulus maxima along the maxima curves that converge towards v. The variance /32 depends on the choice of wavelet and is known in advance. A regression is performed to approximate
log2lWf(u,s)l
~log2(g)+
1)
ct-+-~
log2s-
n-c~ 2
log2 (1 + ~~2s2) 9
Figure 6.6 gives the wavelet modulus maxima computed with a wavelet that is a second derivative of a Gaussian. The decay of log2 IWf(u,s)l a s a function of log 2 s is given along several maxima lines corresponding to smoothed and nonsmoothed singularities. The wavelet is normalized so that/3 - 1 and the diffusion scale is ~r - 2 -5. 6.2.2
Reconstruction From Dyadic Maxima 3
Wavelet transform maxima carry the properties of sharp signal transitions and singularities. If one can reconstruct a signal from these maxima, it is then possible to modify the singularities of a signal by processing the wavelet transform modulus maxima. The strength of singularities can be modified by changing the amplitude of the maxima and we can remove some singularities by suppressing the corresponding maxima. For fast numerical computations, the detection of wavelet transform maxima is limited to dyadic scales {2J}jcz. Suppose that ~ is a dyadic wavelet, which means that there exist A > 0 and B such that -Jvoo
Vw E N - { 0 }
, A _< E
I@(2j~)12 ~
O.
(6.46)
j----- OO
Theorem 5.11 proves that the dyadic wavelet transform {Wf(u,2J)}jcz is a complete and stable representation. This means that it admits a bounded left inverse. This dyadic wavelet transform has the same properties as a continuous wavelet transform Wf(u,s). All theorems of Sections 6.1.3 and 6.2 remain valid if we restrict s to the dyadic scales {2J}jcz. Singularities create sequences of maxima that converge towards the corresponding location at fine scales, and the Lipschitz regularity is calculated from the decay of the maxima amplitude. Translation-lnvariant Representation At each scale 2 j, the maxima representation provides the values of Wf(u,2J) where IWf(u,2J)l is locally maximum. Figure 6.7(c) gives an example. This adaptive sampling of u produces a translationinvariant representation. When f is translated by 7- each Wf(2J, u) is translated by
184
Vl WAVELETZ O O M
CHAPTER
f(t)
0
0.2
0.4
0.6
0.8
1
(a) 2_7
_~L . . . . . . .
AA~,,,,,
-
v V~/V v v
2-6 ~ -
g~V~,,-^
"--
v
A. . . .
......"
~
.
~v-
.
2-4
~
2-3
~
~
2-2 "--.,
.
-
-
-
.
/
~
.j~-~.~
~
~ . ~
2-1 , - t - - - - - - - - - . 2-0
v
..-....._.
-
v
A..--..~
_./~
~
_,,_.
"-~
V - V
.
/~_..
~_~___ _-.
,,--~
/<'-~V~-"
.
.,./.,,~_,-,~ v - ' % ,
2-5
~
~---
"v
.~J---------~
~
~-------
(b) ^A
2-7
A
2-6
A . . . .
2_5
A
2-4
.
A
^
.
v
^_^
.
v
.
-
.
v
A
v-
v
.
.
-
V
__
_
A. . . . .
v
v
A
A
v
v v
...,,
^
A
A
v
A
V V
.....
---
v
v
2-2
v-
V VV-V
.
2 -3
2-1
_
v VVVVV
V
_
-
_ V
V V
v
V
^_
-
,,~
v----
A
v
.,,
v
^
^
v
v
v
v
^
A
v
v
A
o
A
v
A
^
2-o
(c) FIGURE 6.7 (a): Intensity variation along one row of the Lena image. (b)" Dyadic wavelet transform computed at all scales 2N -1 <_ 2J _< 1, with the quadratic spline wavelet %b- - 0 ' shown in Figure 5.6. (c): Modulus maxima of the dyadic wavelet transform.
6.2
WAVELETTRANSFORM MODULUS MAXIMA
1115
7- and their maxima are translated as well. This is not the case when u is uniformly sampled as in the wavelet frames of Section 5.3. Section 5.4 explains that this translation invariance is of prime importance for pattern recognition applications. Reconstruction To study the completeness and stability of wavelet maxima representations, Mallat and Zhong introduced an alternate projection algorithm [261 ] that recovers signal approximations from their wavelet maxima; several other algorithms have been proposed more recently [ 116, 142, 199]. Numerical experiments show that one can only recover signal approximations with a relative mean-square error of the order of 10 -2. For general dyadic wavelets, Meyer [48] and Berman [94] proved that exact reconstruction is not possible. They found families of continuous or discrete signals whose dyadic wavelet transforms have the same modulus maxima. However, signals with the same wavelet maxima differ from each other only slightly, which explains the success of numerical reconstructions [261 ]. If the signal has a band-limited Fourier transform and if r has a compact support, then Kicey and Lennard [235] proved that wavelet modulus maxima define a complete and stable signal representation. A simple and fast reconstruction algorithm is presented from a frame perspective. Section 5.1 is thus a prerequisite. At each scale 2 j, we know the positions {Uj,p}p of the local maxima of IWf(u,2J)l and the values
Wf(uj,p,2 j) - ( f , ~j,p) with 1
Let ~' be the derivative of r and r has a local extremum at u - Uj,p
( t--Uj,p) 2J
(t) - 2-J/2~ ' (2 -j ( t - Uj,p)). Since W f (u, 2 j)
OWf(uj,p,2 j) = - 2 -j (f, ~b~,p) -- 0 . Ou The reconstruction algorithm should thus recover a function f such that
W f (uj,p,2 j) - (~f , Cj,p) - ( f , Cj,p} ,
(6.47)
and @, r
-- (f, 2/)),p) -- 0 .
(6.48)
This last condition imposes that the derivative of Wff(u,2J) vanishes at u = Uj,p, which does not necessarily mean that it has a modulus maxima at Uj,p. This is further enforced by minimizing IIf]l.
186
CHAPTER Vl
WAVELET ZOOM
Frame Pseudo-Inverse The reconstruction algorithm recovers the function f of minimum norm that satisfies (6.47) and (6.48). The minimization of IIfll has a tendency to decrease the wavelet transform energy at each scale 2J:
,,W f (u,2J),,2 - L+~176 ,W f (u,2J),2 du because of the norm equivalence proved in Theorem 5.11"
+co a l l ~ 2 < Z 2-Jllw]f(u,2J)ll2 <
BII/II2"
j--- --OO
The norm IIW (u,2J)l is reduced by decreasing IW (u,2J)l. Since we also impose that Wf(uj,p, 2J) - (f, ~j,p), minimizing Ilfll generally creates local maxima at u - Uj,p. The signal f of minimum norm that satisfies (6.47) and (6.48) is the orthogonal projection P v f of f on the space V generated by the wavelets {~j,p, ~,p }j,p. In discrete calculations, there is a finite number of maxima, so {~j,p, 2/3~,p}j,p is a finite family and hence a basis or a redundant frame of V. Theorem 5.4 describes a conjugate gradient algorithm that recovers f from the frame coefficients with a pseudo-inverse. It performs this calculation by inverting a frame symmetrical operator L introduced in (5.26). This operator is defined by
Vr E V ,
Lr - E ((r, Cj,p)Cj,p -'~ (r, ~5,p)#25,p) "
(6.49)
J,P
Clearly f -- L- 1Lf -- L- 1g with g - L f -- Z (()~' ~J,P)~J,P + ( f ' ~;,p)~),p) -- Z (f' ~',P)~J,P" j,P J,P
(6.50)
The conjugate gradient computes L-lg with an iterative procedure that has exponential convergence. The convergence rate depends on the frame bounds A and B of {r 2~,p}j,p in V. A faster reconstruction algorithm does not explicitly impose the fact (f, r ) O, by considering a smaller space V generated by the restricted wavelet family {r }j,p, and performing the calculation with the reduced frame operator:
Lr -- Z
(r, 2/)j,p)~)j,p .
(6.51)
J,P
The minimization of Ilfll recovers a function such that Wff(u, ZJ)is nearly locally maximum at u - Uj,p, and fewer operations are needed with this reduced frame operator. About 10 iterations are usually sufficient to recover an approximation of f with a relative mean-square error on the order of 10 -2. More iterations do not decrease the error much because f r f. Each iteration requires O(N log 2 N) calculations if implemented with a fast "~ trous" algorithm.
187
6.2 WAVELET TRANSFORM MODULUS MAXIMA
f(t)
i
i
E
r
200 100 (a)
,00[/ ol-~J o
,
0.2
,
0.4
o'.6
o'.8
1
0.6
0.8
1
(b) 200 100 O0
0.2
0.4
(c) FIGURE 6.8 (a): Original signal. (b): Frame reconstruction from the dyadic wavelet maxima shown in Figure 6.7(c). (c)" Frame reconstruction from the maxima whose amplitude is above the threshold T - 10. Example 6.1 Figure 6.8(b) shows the signal f - P v f recovered with 10 iterations of the conjugate gradient algorithm, from the wavelet tranform maxima in Figure 6.7(c). This reconstruction is calculated with the simplified frame operator (6.51). After 20 iterations, the reconstruction error is IIf- fll/ttfll - 2.510 Figure 6.8(c) shows the signal reconstructed from the 50% of wavelet maxima that have the largest amplitude. Sharp signal transitions corresponding to large wavelet maxima have not been affected, but small texture variations disappear because the corresponding maxima are removed. The resulting signal is piecewise regular.
Fast Discrete Calculations To simplify notation, the sampling interval of the input signal is normalized to 1. The dyadic wavelet transform of this normalized discrete signal a0[n] of size N is calculated at scales 2 _< 2 j _< N with the "algorithme trous" of Section 5.5.2. The cascade of convolutions with the two filters h[n] and g[n] is computed with O(N log 2N) operations. Each wavelet coefficient can be written as an inner product of a0 with a discrete
188
CHAPTERVl WAVELETZOOM
wavelet translated by m: N-1
dj[m] -
(a0[n], ~j[n - m]) - Z
a0[n] ~?j[n - m].
n=0
The modulus maxima are located at abscissa Uj,p where mum, which means that
Idj[uj, ]l
Idj[uj,,,- 1]1 and Idj[uj,,,]l
Idj[uj,p]lis locally maxi-
Idj[uj,p + 1]1,
so long as one of these two inequalities is strict. We denote ~j,p[n] = ~j[n - Uj,p]. To reconstruct a signal from its dyadic wavelet transform calculated up to the coarsest scale 2 J, it is necessary to provide the remaining coarse approximation a j [m], which is reduced to a constant when 2 J -- N: N-1
1 aj[m] - - - ~
Za0[n]-
V/tiC.
n--0
Providing the average C is also necessary in order to reconstruct a signal from its wavelet maxima. The simplified maxima reconstruction algorithm inverts the symmetrical operator L associated to the frame coefficients that are kept, without imposing explicitly the local extrema property: log/N
Lr -- Z j=l
Z
(r, ~.)j,p) 2/3j,p AVC .
(6.52)
p
The computational complexity of the conjugate gradient algorithm of Theorem 5.4 is driven by the calculation of L p , in (5.38). This is optimized with an efficient filter bank implementation of L. To compute Lr we first calculate the dyadic wavelet transform of r[n] with the "algorithme h trous". At each scale 2 j, all coefficients that are not located at an a b s c i s s a Uj,p are set to zero: dj[m] -
(r[n],~j[n -- Uj,p]) 0
if m -- Uj,p otherwise
(6.53)
Then Lr[n] is obtained by modifying the filter bank reconstruction given by Proposition 5.6. The decomposition and reconstruction wavelets are the same in (6.52) so we set ft[n] = h[n] and ~[n] = gin]. The factor 1/2 in (5.87) is also removed because the reconstruction wavelets in (6.52) are not attenuated by 2 - j as are the wavelets in the non-sampled reconstruction formula (5.71). For J = log2 N, we initialize ~tj[n] "-- C / v / N and for logzU > j > 0 we compute
{tj[n] - aj+l ,hj[n] + d j + l * gj[n].
(6.54)
6.3 MULTISCALEEDGE DETECTION
189
One can verify that Lr[n] = fi0[n] with the same derivations as in the proof of Proposition 5.6. Let Kh and Kg be the number of non-zero coefficients of h[n] and g[n]. The calculation of Lr[n] from r[n] requires a total of 2(Kh + Kg)Nlog 2N operations. The reconstructions shown in Figure 6.8 are computed with the filters of Table 5.3.
6.3
MULTISCALE EDGE DETECTION 2
The edges of structures in images are often the most important features for pattern recognition. This is well illustrated by our visual ability to recognize an object from a drawing that gives a rough outline of contours. But, what is an edge? It could be defined as points where the image intensity has sharp transitions. A closer look shows that this definition is often not satisfactory. Image textures do have sharp intensity variations that are often not considered as edges. When looking at a brick wall, we may decide that the edges are the contours of the wall whereas the bricks define a texture. Alternatively, we may include the contours of each brick in the set of edges and consider the irregular surface of each brick as a texture. The discrimination of edges versus textures depends on the scale of analysis. This has motivated computer vision researchers to detect sharp image variations at different scales [44, 298]. The next section describes the multiscale Canny edge detector [ 113]. It is equivalent to detecting modulus maxima in a two-dimensional dyadic wavelet transform [261 ]. The Lipschitz regularity of edge points is derived from the decay of wavelet modulus maxima across scales. It is also shown that image approximations may be reconstructed from these wavelet modulus maxima, with no visual degradation. Image processing algorithms can thus be implemented on multiscale edges.
6.3. I
Wavelet Maxima for Images
2
Canny Edge Detection The Canny algorithm detects points of sharp variation in an image f(xl ,x2) by calculating the modulus of its gradient vector
V f--
OXl'OX2
(6.55)
"
The partial derivative of f in the direction of a unit vector ff = (cos c~, since) in the x = (xl ,x2) plane is calculated as an inner product with the gradient vector
of O~
-~
Of
= V f. if- ~
Of
cos ct + Ox2 sin o~.
The absolute value of this partial derivative is maximum if ff is colinear to V f . This shows that V f ( x ) is parallel to the direction of maximum change of the surface f(x). A point y E R 2 is defined as an edge if is locally maximum at x - y when x - y + )~V f ( y ) for I)~1 small enough. This means that the partial derivatives of f reach a local maximum at x = y, when x varies in a one-dimensional
IV/(x)l
190
CHAPTER Vl
WAVELET ZOOM
neighborhood of y along the direction of maximum change of f at y. These edge points are inflection points of f. Multiscale Edge Detection A multiscale version of this edge detector is implemented by smoothing the surface with a convolution kernel O(x) that is dilated. This is computed with two wavelets that are the partial derivatives of 0"
O0
r
OXl
O0
and r
(6.56)
OX2
The scale varies along the dyadic sequence {2J}jcz to limit computations and storage. For 1 < k < 2, we denote for x - (Xl ,x2) r
1r
(Xl x2)
~
~3-, ~-
and
(x) - r
(-x).
In the two directions indexed by 1 _< k _< 2, the dyadic wavelet transform of f C L2(R 2) at u - (ul,u2)is
Wkf(u,2 j) -- (f(x),r
u)) -- f ~kzj(U ) .
(6.57)
Section 5.5.3 gives necessary and sufficient conditions for obtaining a complete and stable representation. Let us denote 02j(x) - 2-J O(2-Jx) and 02j(x) - 02j(-x). The two scaled wavelets can be rewritten m
~lzj
_
2j O02J
~-'-X-x 1 and
~2j _ 2 j O02J OX2
We thus derive from (6.57) that the wavelet transform components are proportional to the coordinates of the gradient vector of f smoothed by 02J"
{'wl f(u,2 j) \W2 f(u, 2j)
_ 2 j ( ~u~ --, o (f*O2') (u)) _ 2Jv(f.O2J)(u ) 0 -5-~2(f .O2j)(u)]
(6.58)
The modulus of this gradient vector is proportional to the wavelet transform modulus Mf(u,2 j) - v/IWl f(u,2J)l 2 + IW2 f(u,2J)l 2. (6.59) Let Af(u,2J) be the angle of the wavelet transform vector (6.58) in the plane
A f (u 2 j) - { a(u) ' 7r--a(u) with
a(u) - tan -1
if wlf(u,2 j) > 0 i f w l f ( u , 2 j) <0 W2f(u,2J)) Wl f(u,2J ) .
(6.60)
6.3 MULTISCALE EDGE DETECTION
19 1
The unit vector ffj(u) - (cosAf(u,2J),sinAf(u,2J)) is colinear to ~(f-.kO2J)(U). An edge point at the scale 2 j is a point v such that M f ( u , 2 j) is locally maximum at u - v when u - v + )~ffj(v) for I~[ small enough. These points are also called wavelet transform modulus maxima. The smoothed image f * 02J has an inflection point at a modulus maximum location. Figure 6.9 gives an example where the wavelet modulus maxima are located along the contour of a circle. M a x i m a curves Edge points are distributed along curves that often correspond to the boundary of important structures. Individual wavelet modulus maxima are chained together to form a maxima curve that follows an edge. At any location, the tangent of the edge curve is approximated by computing the tangent of a level set. This tangent direction is used to chain wavelet maxima that are along the same edge curve. The level sets of g(x) are the curves x(s) in the (x] ,x2) plane where g(x(s)) is constant. The parameter s is the arc-length of the level set. Let -F - (7-1,7-2) be the direction of the tangent of x(s). Since g(x(s)) is constant when s varies,
Og(x(s)) OS
Og Og --, ~ T1 + _~X2T2 -- ~7g. "7--0. OXl
So V g(x) is perpendicular to the direction -F of the tangent of the level set that goes through x. This level set property applied to g - f * 02J proves that at a maximum point v the vector ffj(v) of angle af(v,2J) is perpendicular to the level set of f * 0 z j going through v. If the intensity profile remains constant along an edge, then the inflection points (maxima points) are along a level set. The tangent of the maxima curve is therefore perpendicular to ffj(v). The intensity profile of an edge may not be constant but its variations are often negligible over a neighborhood of size 2 j for a sufficiently small scale 2 j, unless we are near a corner. The tangent of the maxima curve is then nearly perpendicular to ffj(v). In discrete calculations, maxima curves are thus recovered by chaining together any two wavelet maxima at v and v + if, which are neighbors over the image sampling grid and such that ff is nearly perpendicular to ffj(v).
Example 6.2
The dyadic wavelet transform of the image in Figure 6.9 yields modulus images M f ( 2 j, v) whose maxima are along the boundary of a disk. This circular edge is also a level set of the image. The vector ffj(v) of angle A f ( 2 j, v) is thus perpendicular to the edge at the maxima locations.
Example 6.3
In the Lena image shown in Figure 6.10, some edges disappear when the scale increases. These correspond to fine scale intensity variations that are removed by the averaging with 0:j when 2 j is large. This averaging also modifies the position of the remaining edges. Figure 6.10(f) displays the wavelet
192
CHAPTER Vl
WAVELETZOOM
FIGURE 6.9 The top image has N 2 -- 1282 pixels. (a): Wavelet transform in the horizontal direction, with a scale 2 j that increases from top to bottom: {wlf(u,2J)}_6<j<_o. Black, grey and white pixels correspond respectively to negative, zero and positive values. (b): Vertical direction: {wEf(u,2J)}_6<j< O. (c): Wavelet transform modulus {Mf(u,2J)}_6<j
6.3 MULTISCALEEDGEDETECTION
193
FIGURE 6.10 Multiscale edges of the Lena image shown in Figure 6.11. . (b): { W 2 f ( u , 2 J ) } _ 7 < j < _ _ 3 . (c): { M f ( u , 2 J ) } _ 7 < _ j < _ _ 3 . (a): { w l f ( u , 2 J ) } _ 7 < j < _ _ 3 (d): { A f ( u , 2 J ) } _ 7 < j < _ _ 3 . (e): Modulus maxima. (f): Maxima whose modulus values are above a threshold. maxima such that Mf(v,2J) > T, for a given threshold T. They indicate the location of edges where the image has large amplitude variations. Lipschitz Regularity The decay of the two-dimensional wavelet transform depends on the regularity of f . We restrict the analysis to Lipschitz exponents 0 < c~ ___ 1. A function f is said to be Lipschitz c~ at v - (Vl, v2) if there exists K > 0 such that for all (xl ,x2) C/~2
If(xl,x2) - f(v],v2)l ~ g (Ix~ - vii 2 + Ix2 - v212)~/2.
(6.61)
If there exists K > 0 such that (6.61) is satisfied for any v E f~ then f is uniformly Lipschitz a over f~. As in one dimension, the Lipschitz regularity of a function f is related to the asymptotic decay [W 1f(u,2J)! and [W2f(u,2J)l in the corresponding neighborhood. This decay is controlled by Mf(u,2J). Like in Theorem 6.3, one can prove that f is uniformly Lipschitz a inside a bounded domain of R 2 if and
194
CHAPTERVI WAVELETZOOM
only if there exists A > 0 such that for all u inside this domain and all scales 2 j
IMf(u,U)l <_A2 j(a+l).
(6.62)
Suppose that the image has an isolated edge curve along which f has Lipschitz regularity a. The value of IMf(u,2J)l in a two-dimensional neighborhood of the edge curve can be bounded by the wavelet modulus values along the edge curve. The Lipschitz regularity a of the edge is estimated with (6.62) by measuring the slope of log 2 IMf(u,U)I as a function of j. If f is not singular but has a smooth transition along the edge, the smoothness can be quantified by the variance O"2 of a two-dimensional Gaussian blur. The value of O"2 is estimated by generalizing Theorem 6.6. Reconstruction from Edges In his book about vision, Marr [44] conjectured that images can be reconstructed from multiscale edges. For a Canny edge detector, this is equivalent to recovering images from wavelet modulus maxima. In two dimensions, whether dyadic wavelet maxima define a complete and stable representation is still an open mathematical problem. However, the algorithm of Mallat and Zhong [261 ] recovers an image approximation that is visually identical to the original one. As in Section 6.2.2, a simpler inverse frame reconstruction is described. At each scale 2 j, a multiscale edge representation provides the positions Uj,p of the wavelet transform modulus maxima as well as the values of the modulus Mf(uj,p,2 j) and the angle Af(uj,p,2J). The modulus and angle specify the two wavelet transform components (6.63) Wk f (Uj,p,2 j) ( f , @j,p) k for 1 _< k < 2, -
-
with ~,p(X) -- 2 -j ~ k ( z - J ( x - Uj,p)). Let n-),p be the unit vector in the direction of a f (uj,p,2J) and
~3,p(X ) _ 22j O202J(x - Uj,p) O~,p Since the gradient modulus Mf(uj,p, 2 j) has a local extremum at Uj,p in the direction of n-~,p, one can verify that (f, ~j,p) 3 -- O .
(6.64)
As in one dimension, the reconstruction algorithm recovers a function of minimum norm f such that ~bj,p) for 1 < k _< 3.
(6.65)
It is the orthogonal projection of f in the closed space V generated by the family of wavelets
6.3 MULTISCALEEDGE DETECTION
195
(c) FIGURE 6. I I (a): Original Lena. (b): Reconstructed from the wavelet maxima displayed in Figure 6.10(e) and larger scale maxima. (c): Reconstructed from the thresholded wavelet maxima displayed in Figure 6.10(f) and larger scale maxima.
If this family is a frame of V, which is true in finite dimension, the associated frame operator is 3
V r E V , Lr - ~-~-~(r, ~j,p> k ~j,~. k=l
(6.66)
j,p
We compute f - - L-lg from g - - L f - - E k = 2l ~j,p (f, @j,p) ~ ~)j,p, k with the conjugate gradient algorithm of Theorem 5.4. To simplify the numerical implementation, one can restrict the inner product conditions (6.65) to the wavelets ~ , p for k - 1,2. The frame operator (6.66) is
196
CHAPTER Vl
WAVELETZOOM
FIGURE 6.12 The illusory edges of a straight and a curved triangle are perceived in domains where the images are uniformly white. then limited to these two types of wavelets: 2
Lr_ZZ(r
' ~
k
(6.67)
k--1 j,p
The resulting reconstructed image f is not equal to the original image f but their relative mean-square difference is less than 10 -2 . Singularities and edges are nearly perfectly recovered and no spurious oscillations are introduced. The images differ slightly in smooth regions, but visually this is not noticeable. Example 6.4 The image reconstructed in Figure 6.11 (b) is visually identical to the original image. It is recovered with 10 conjugate gradient iterations. After 20 iterations, the relative mean-square reconstruction error is IIf - f l J / l l f l l = 410 -3. The thresholding of edges accounts for the disappearance of image structures from the reconstruction shown in Figure 6.11 (c). Sharp image variations are perfectly recovered.
Illusory Contours A multiscale wavelet edge detector defines edges as points where the image intensity varies sharply. This definition is however too restrictive when edges are used to find the contours of objects. For image segmentation, edges must define closed curves that outline the boundaries of each region. Because of noise or light variations, local edge detectors produce contours with holes. Filling these holes requires some prior knowledge about the behavior of edges in the image. The illusion of the Kanizsa triangle [39] shows that such an edge filling is performed by the human visual system. In Figure 6.12, one can "see" the edges of a straight and a curved triangle although the image grey level remains uniformly white between the black disks. Closing edge curves and understanding illusory contours requires computational models that are not as local as multiscale
6.3 MULTISCALEEDGE DETECTION
197
differential operators. Such contours can be obtained as the solution of a global optimization that incorporates constraints on the regularity of contours and which takes into account the existence of occlusions [ 189].
6.3.2
Fast Multiscale Edge Computations 3
The dyadic wavelet transform of an image ofN 2 pixels is computed with a separable extension of the filter bank algorithm described in Section 5.5.2. A fast multiscale edge detection is derived [261 ]. Edge detection wavelets (6.56) are designed as separable products of one-dimensional dyadic wavelets, constructed in Section 5.5.1. Their Fourier transform is
Wavelet Design
+1(031,032) = g ( 031
y)
(6.68)
+2(031'032) -- g ( 2 ) ~5(031 T ) ~5(032T) '
(6.69)
and
where ~(03) is a scaling function whose energy is concentrated at low frequencies and ~(03)- - i v ~ s i n \ - (a ~03 - z/ e x P ( 2~0 3 )
.
(6.70)
This transfer function is the Fourier transform of a finite difference filter which is a discrete approximation of a derivative -0.5 0.5 0
g[P]---x/~
ifp=O ifp=l otherwise
(6.71)
The resulting wavelets ~b1 and ~b2 are finite difference approximations of partial derivatives along x and y of = 4 qS(2x)~b(2y). To implement the dyadic wavelet transform with a filter bank algorithm, the scaling function ~bis calculated, as in (5.76), with an infinite product:
O(xl,x2)
+oo it(2_p03)
II p=l
CO
03
1 h (~) ~ (~).
(6.72)
The 27r periodic function ~tis the transfer function of a finite impulse response lowpass filter We showed in (5.81) that the Fourier transform of a box spline of degree m
h[p].
) m-+-I
~(03)_ (sin(03/2)w/2
exp
(
) -iew 2
with e-- { 1 ifmiseven 0 ifmisodd
CHAPTERVI WAVELETZOOM
198
is obtained with
(co)
h(co) = x/2 ~(2co) = x/2 cos ~(co) -2
m+l
exp
(--ieco) 2
Table 5.3 gives h[p] for m - 2.
'~Algorithme ~ trous" The one-dimensional "algorithme ?~trous" of Section 5.5.2 is extended in two dimensions with convolutions along the rows and columns of the image. The support of an image j~ is normalized to [0,112 and the N 2 pixels are obtained with a sampling on a uniform grid with intervals N -1. To simplify the description of the algorithm, the sampling interval is normalized to 1 by considering the dilated image f(xl,x2) - ):(N-lxl,N-lx2). A change of variable shows that the wavelet transform of f is derived from the wavelet transform of f with a simple renormalization: Wkj~(u,2 j) = N - ' Wk f (Nu,N2J) . Each sample ao[n] of the normalized discrete image is considered to be an average of f calculated with the kernel ~b(Xl) qS(x2) translated at n --- (nl,n2)"
ao[nl,n2] -- (f(xl,x2), qS(xl -- nl) qS(x2 - - n2)). This is further justified in Section 7.7.3. For any j _> 0, we denote aj[nl,n2] -- ( f ( x l , x 2 ) ,
~b2,(Xl -- nl) q52,(x2 -- n2)).
The discrete wavelet coefficients at n - (nl , n 2 )
are
d J [ n ] - Wl f ( n , 2 j) and d2[n] = W2 f(n,2J) . They are calculated with separable convolutions. For any j _> 0, the filter hip] "dilated" by 2 j is defined by
( h[-p/2J] hj[p] 0
ifp/2J cZ otherwise
(6.73)
and for j > 0, a centered finite difference filter is defined by =
00 5 0.5
if p - - 2 j - 1 if p - 2 j - 1 otherwise
(6.74)
For j = 0, we define ~'o [01/v/2 - - 0 . 5 , ~'o [- 1]/x/~ - - 0 . 5 and ~'o [P] - 0 for p # 0 , - 1. A separable two-dimensional filter is written n2]
--
,
6.3 MULTISCALEEDGE DETECTION
199
and 5In] is a discrete Dirac. Similarly to Proposition 5.6, one can prove that for any j > 0 and any n - (nl ,n2)
aj+l[n]
-- aj.hjhj[n], d}+l[n ] aj,~jS[n], dj2+l[n] = aj,c~j[n].
(6.75) (6.76) (6.77)
Dyadic wavelet coefficients up to the scale 2 J are therefore calculated by cascading the convolutions (6.75-6.77) for 0 < j _< J. To take into account border problems, all convolutions are replaced by circular convolutions, which means that the input image a0[n] is considered to be N periodic along its rows and columns. Since J < log 2 N and all filters have a finite impulse response, this algorithm requires O(N 2 log 2 N) operations. If J - log 2N then one can verify that the larger scale approximation is a constant proportional to the grey level average C: 1
aj[nl,n2]--~
N-1
Z
ao[nl,n2]-NC.
nl ~n2--O
2 2 whereas The wavelet transform modulus is Mf(n,2 j) -Id)[n]12 + Idj[n]l 2 Af(n,2J) is the angle of the vector (dJ[n],dj[n]). The wavelet modulus maxima are located at points Uj,p where Mf(uj,p,2J) is larger than its two neighbors Mf(uj,p i ~',2J), where ~'= (el,e2) is the vector whose coordinates el and e2 are either 0 or 1, and whose angle is the closest to Af(uj,p,2J). This verifies that Mf(n,2J) is locally maximum at n = Uj,p in a one-dimensional neighborhood whose direction is along the angle Af(uj,p, 2J). Reconstruction from Maxima The frame algorithm recovers an image approximation from multiscale edges by inverting the operator L defined in (6.67), with the conjugate gradient algorithm of Theorem 5.4. This requires computing Lr efficiently for any image r[n]. For this purpose, the wavelet coefficients of r are first calculated with the "algorithme h trous," and at each scale 2 _< 2 j < N all wavelets coefficients not located at a maximum position U j , p a r e set to zero as in the one-dimensional implementation (6.53)"
Wkr(n,2 j) -
o
if n - - blj,p otherwise "
The signal Lr[n] is recovered from these non-zero wavelet coefficients with a reconstruction formula similar to (6.54). Let hj[n] - hj[-n] and gj[n] - ~,j[-n] be the two filters defined with (6.73) and (6.74). The calculation is initialized for J - log 2 N by setting aj [n] = CN-1, where C is the average image intensity. For log 2 N > j > 0 we compute a j [ r t ] - aj+l
.hjhj[rt] + d J + 1 .
gjc~[rt] +d2+l[rt].c~gj[n],
200
CHAPTERVl WAVELETZOOM
and one can verify that Lr[n] = n0[n]. It is calculated from r[n] with O(N 2 log 2N) operations. The reconstructed images in Figure 6.11 are obtained with 10 conjugate gradient iterations implemented with this filter bank algorithm. 6.4
MULTIFRACTALS
2
Signals that are singular at almost every point were originally studied as pathological objects of pure mathematical interest. Mandelbrot [43] was the first to recognize that such phenomena are encountered everywhere. Among the many examples [25] let us mention economic records like the Dow Jones industrial average, physiological data including heart records, electromagnetic fluctuations in galactic radiation noise, textures in images of natural terrain, variations of traffic flow... The singularities of multifractals often vary from point to point, and knowing the distribution of these singularities is important in analyzing their properties. Pointwise measurements of Lipschitz exponents are not possible because of the finite numerical resolution. After discretization, each sample corresponds to a time interval where the signal has an infinite number of singularities that may all be different. The singularity distribution must therefore be estimated from global measurements, which take advantage ofmultifractal self-similarities. Section 6.4.2 computes the fractal dimension of sets of points having the same Lipschitz regularity, with a global partition function calculated from wavelet transform modulus maxima. Applications to fractal noises such as fractional Brownian motions and to hydrodynamic turbulence are studied in Section 6.4.3. 6.4. I
Fractal Sets and Self-Similar Functions
A set S c ]1~n is said to be self-similar if it is the union of disjoint subsets S 1 , . . . , ~ k that can be obtained from S with a scaling, translation and rotation. This selfsimilarity often implies an infinite multiplication of details, which creates irregular structures. The triadic Cantor set and the Van Koch curve are simple examples. Example 6.5 The Von Koch curve is a fractal set obtained by recursively dividing each segment of length l in four segments of length 1/3, as illustrated in Figure 6.13. Each subdivision increases the length by 4/3. The limit of these subdivisions is therefore a curve of infinite length.
Example 6.6 The triadic Cantor set is constructed by recursively dividing intervals of size 1in two sub-intervals of size 1/3 and a central hole, illustrated by Figure 6.14. The iteration begins from [0, 1]. The Cantor set obtained as a limit of these subdivisions is a dust of points in [0,1].
6.4
201
MULTIFRACTALS
1/3
~ 3
1/3
FIGURE 6.13 Three iterations of the Von Koch subdivision. The Von Koch curve is the fractal obtained as a limit of an infinite number of subdivisions. I
I
1/3
I
I
1/3
I
I
1/9
1/9
1/9
1/9
MH
HH
HH
HH
FIGURE 6.14 Three iterations of the Cantor subdivision of [0,1]. The limit of an infinite number of subdivisions is a closed set in [0,1].
Fractal Dimension The Von Koch curve has infinite length in a finite square of ~2. The usual length measurement is therefore not well adapted to characterize the topological properties of such fractal curves. This motivated Hausdorff in 1919 to introduce a new definition of dimension, based on the size variations of sets when measured at different scales. The capacity dimension is a simplification of the Hausdorff dimension that is easier to compute numerically. Let S be a bounded set in/I~ n. We count the minimum number N(s) of balls of radius s needed to cover S. If S is a set of dimension D with a finite length (D = 1), surface (D -- 2) or volume (D = 3) then
N(s) ~ s -O,
SO
\
D = - lim log N (s). s~0 logs
(6.78)
The capacity dimension D of S generalizes this result and is defined by
D
-
-
l i m i n f logN(s) s~0 logs
(6.79)
202
CHAPTER VI
WAVELETZOOM
The measure of S is then M = l i m s u p N ( s ) s~ .
s--+0
It may be finite or infinite. The Hausdorff dimension is a refined fractal measure that considers all covers of S with balls of radius smaller than s. It is most often equal to the capacity dimension, but not always. In the following, the capacity dimension is called
fractal dimension. E x a m p l e 6.7 The Von Koch curve has infinite length because its fractal dimension is D > 1. We need N (s) - 4 n balls of size s - 3 -n to cover the whole curve, hence
N(3 -n) -(3-n)-log4/log3. One can verify that at any other scale s, the minimum number of balls N(s) to cover this curve satisfies D
-
-
l i m i n f logN(s) s-+0 logs
_
log4 log3
As expected, it has a fractal dimension between 1 and 2. E x a m p l e 6.8 s -- 3 -n, so
The triadic Cantor set is covered by N(s) -- 2" intervals of size
N(3 -n) --(3-n)-log2/log3.
One can also verify that D -- - l i m i n f logN(s) _ log2 s-~0 logs log3 Self-Similar Functions Let f be a continuous function with a compact support S. We say that f is self-similar if there exist disjoint subsets S1, 9 9 9 Sk such that the graph of f restricted to each $i is an affine transformation of f . This means that there exist a scale li > 1, a translation ri, a weight pi and a constant ci such that
Vt c Si , f (t) - ci -~- pi f (li(t - ri)) .
(6.80)
Outside these subsets, we suppose that f is constant. Generalizations of this definition can also be used [ 110]. If a function is self similar, its wavelet transform is also. Let g be an affine transformation of f :
g(t) = p f ( l ( , - r)) +c.
(6.81)
6.4 MULTIFRACTALS
Its wavelet transform is
Wg(u,s) --
/+o~
203
1
(~)
oc g(t) - ~ r
dt.
With the change of variable t' = l ( t - r), since ~ has a zero average, the affine relation (6.81) implies
P W f ( l ( u - r ) ,sl) Wg(u,s) - ---~
.
Suppose that ~b has a compact support included in [-K,K]. The affine invariance (6.80) of f over Si = [ai,bi] produces an affine invariance for all wavelets whose support is included in $i. For any s < ( b i - ai)/K and any U E [ai + Ks, b i - Ks],
W f ( u , s ) -- ~Pii W f (li(u - ri ) , sli) 9 The self-similarity of the wavelet transform implies that the positions and values of its modulus maxima are also self-similar. This can be used to recover unknown affine invariance properties with a voting procedure based on wavelet modulus maxima [218]. Example 6.9 A Cantor measure is constructed over a Cantor set. Let d#o(x) = dx be the uniform Lebesgue measure on [0, 1]. As in the Cantor set construction, this measure is subdivided into three uniform measures, whose integrals over [0, 1/3], [1/3,2/3] and [2/3,1] are respectively pl, 0 and p2. We impose Pl + p2 = 1 to obtain a total measure d#l on [0, 1] whose integral is equal to 1. This operation is iteratively repeated by dividing each uniform measure of integral p over [a, a + l] into three equal parts whose integrals are respectively PiP, 0 and p2p over [a,a + //3], [a + 1/3,a + 21/3] and [a + 21/3,a + 1]. This is illustrated by Figure 6.15. After each subdivision, the resulting measure d#n has a unit integral. In the limit, we obtain a Cantor measure d # ~ of unit integral, whose support is the triadic Cantor set.
Example 6.10 A devil's staircase is the integral of a Cantor measure:
f(t) -
/o'
d#oo(x).
(6.82)
It is a continuous function that increases from 0 to 1 on [0,1]. The recursive construction of the Cantor measure implies that f is self-similar:
f(t)-
pl/(3t)
i f t E [0,1/3]
Pl Pl + P2 f ( 3 t - 2)
if t E [1/3,2/3] . if t E [2/3,0]
204
CHAPTER Vl
WAVELET ZOOM
d~to(X) Pl
I
2
t
IPlP21
P2
d~tl(X) 2 P2PlI IP2 dlLt2(x)
I
FIGURE 6.15 Two subdivisions of the uniform measure on [0,1] with left and fight weights pl and Pc. The Cantor measure d # ~ is the limit of an infinite number of these subdivisions.
FIGURE 6.16 Devil's staircase calculated from a Cantor measure with equal weights pl - p2 - 0.5. (a): Wavelet transform Wf(u,s) computed with ~b - -0', where 0 is Gaussian. (b): Wavelet transform modulus maxima.
6.4 MULTIFRACTALS
205
Figure 6.16 displays the devil's staircase obtained with pl -- p2 -- 0.5. The wavelet transform below is calculated with a wavelet that is the first derivative of a Gaussian. The self-similarity of f yields a wavelet transform and modulus maxima that are self-similar. The subdivision of each interval in three parts appears through the multiplication by 2 of the maxima lines, when the scale is multiplied by 3. This Cantor construction is generalized with different interval subdivisions and weight allocations, beginning from the same Lebesgue measure d#0 on [0,1] [5].
6.4.2
Singularity Spectrum
3
Finding the distribution of singularities in a multifractal signal f is particularly important for analyzing its properties. The spectrum of singularity measures the global repartition of singularities having different Lipschitz regularity. The pointwise Lipschitz regularity of f is given by Definition 6.1. D e f i n i t i o n 6.2 (SPECTRUM) Let S~ be the set of all points t E ~ where the point-
wise Lipschitz regularity of f is equal to c~. The spectrum of singularity D(a) of f is the fractal dimension of S~. The support of D(c~) is the set of ~ such that $~ is not empty. This spectrum was originally introduced by Frisch and Parisi [185] to analyze the homogeneity of multifractal measures that model the energy dissipation of turbulent fluids. It was then extended by Arneodo, Bacry and Muzy [278] to multifractal signals. The fractal dimension definition (6.79) shows that if we make a disjoint cover of the support of f with intervals of size s then the number of intervals that intersect S~ is
N~(s) ~ s -~
.
(6.83)
The singularity spectrum gives the proportion of Lipschitz c~ singularities that appear at any scale s. A multifractal f is said to be homogeneous if all singularities have the same Lipschitz exponent c~0,which means the support of D(c~) is restricted to {a0 }. Fractional Brownian motions are examples of homogeneous multifractals.
Partition Function One cannot compute the pointwise Lipschitz regularity of a multifractal because its singularities are not isolated, and the finite numerical resolution is not sufficient to discriminate them. It is however possible to measure the singularity spectrum of multifractals from the wavelet transform local maxima, using a global partition function introduced by Arneodo, Bacry and Muzy [278]. Let ~p be a wavelet with n vanishing moments. Theorem 6.5 proves that if f has pointwise Lipschitz regularity a0 < n at v then the wavelet transform Wf(u,s) has a sequence of modulus maxima that converges towards v at fine scales. The set of maxima at the scale s can thus be interpreted as a coveting of the singular support of f with wavelets of scale s. At these maxima locations
IWf(u,s)l
r',~s ~176
206
CHAPTER Vl
WAVELETZOOM
Let {Up(S) }peZ be the position of all local maxima of IWg(u,s)l at a fixed scale s. The partition function Z measures the sum at a power q of all these wavelet modulus maxima: Z(q,s) - E [Wf (up's)lq" (6.84)
p At each scale s, any two consecutive maxima Up and Up+~ are supposed to have a distance JUp+l - UpJ > cs, for some e > 0. If not, over intervals of size es, the sum (6.84) includes only the maxima of largest amplitude. This protects the partition function from the multiplication of very close maxima created by fast oscillations. For each q E IR, the scaling exponent T(q) measures the asymptotic decay of Z(q,s) at fine scales s:
7(q) - liminf log Z(q,s) s~0
logs
This typically means that
Z(q,s) ~ s T(q). Legendre Transform The following theorem relates T(q) to the Legendre transform of D ( a ) for self-similar signals. This result was established in [83] for a particular class of fractal signals and generalized by Jaffard [222]. Theorem 6.7 (ARNEODO, BACRY, JAFFARD, MUZY) Let A - [Olmin, O~max] be the support of D(a). Let r be a wavelet with n > a m a x vanishing moments. If f is a
self-similar signal then r(q) -- m i n ( q (a + 1 / 2 ) - D ( a ) ) . aEA
(6.85)
Proof 3. The detailed proof is long; we only give an intuitive justification. The sum (6.84) over all maxima positions is replaced by an integral over the Lipschitz parameter. At the scale s, (6.83) indicates that the density of modulus maxima that cover a singularity with Lipschitz exponent a is proportional to s -~ . At locations where f has Lipschitz regularity a, the wavelet transform decay is approximated by
IWf(u,s)l ~ s ~+~/2. It follows that
Z(q,s) ~ ./A sq(a-s
s-V(a) da.
When s goes to 0 we derive that Z(q,s) ~ s~(q) for r(q) = rnin~eA(q(a + 1 / 2 ) D(a)). II This theorem proves that the scaling exponent T(q) is the Legendre transform of D(a). It is necessary to use a wavelet with enough vanishing moments to measure all Lipschitz exponents up to amax. In numerical calculations r(q) is computed by evaluating the sum Z(q,s). We thus need to invert the Legendre transform (6.85) to recover the spectrum of singularity D(a).
6.4
Proposition 6.2
207
MULTIFRACTALS
9 The scaling exponent T(q) is a convex and increasing func-
tion of q. 9 The Legendre transform (6.85) is invertible if and only ifD(a) is convex, in which case D ( a ) - m i n ( q ( a + 1/2) - T(q)). (6.86) /
qcR \
The spectrum D(a) of self-similar signals is convex. Proof 3. The proof that D(a) is convex for self-similar signals can be found in [222]. We concentrate on the properties of the Legendre transform that are important in numerical calculations. To simplify the proof, let us suppose that D(q) is twice differentiable. The minimum of the Legendre transform (6.85) is reached at a critical point q(a). Computing the derivative of q(a + 1/2) - D(a) with respect to a gives dD
q(a) = d a '
(6.87)
1 ) - D(a). T(q) -- q ( a + -~
(6.88)
with
Since it is a minimum, the second derivative of 7(q(a)) with respect to a is negative, from which we derive that d2O(a(q)) < 0 . dot2 This proves that 7(q) depends only on the values where D(a) has a negative second derivative. We can thus recover D(a) from 7(q) only if it is convex. The derivative of T(q) is
dT(q) 1 da dq = a + - ~ + q d q
da dD(a) 1 dq dct = a + ~ > 0 .
(6.89)
It is therefore increasing. Its second derivative is
d2T(q)
da
dq 2
dq
Taking the derivative of (6.87) with respect to q proves that
da d2D(a) = 1. dq da 2 d2"r(q) Since d2D(~)d~2-< 0 we derive that ~ _< 0. Hence T(q) is convex. By using (6.88), (6.89) and the fact that T(q) is convex, we verify that
D(c~)- min + q c (q R (a
1/2)-7(q)). II
2(~8
CHAPTERVl WAVELETZOOM
The spectrum D(a) of self-similar signals is convex and can therefore be calculated from 7-(q) with the inverse Legendre formula (6.86). This formula is also valid for a much larger class of multifractals. For example, it is verified for statistical selfsimilar signals such as realizations of fractional Brownian motions. Multifractals having some stochastic self-similarity have a spectrum that can often be calculated as an inverse Legendre transform (6.86). However, let us emphasize that this formula is not exact for any function f because its spectrum of singularity D(a) is not necessarily convex. In general, Jaffard proved [222] that the Legendre transform (6.86) gives only an upper bound of D(a). These singularity spectrum properties are studied in detail in [49]. Figure 6.17 illustrates the properties of a convex spectrum D(a). The Legendre transform (6.85) proves that its maximum is reached at D(a0) = m a x D ( a ) = -7-(0). aEA
It is the fractal dimension of the Lipschitz exponent a0 most frequently encountered in f . Since all other Lipschitz a singularities appear over sets of lower dimension, if a0 < 1 then D(a0) is also the fractal dimension of the singular support of f . The spectrum D(a) for a < a0 depends on T(q) for q > 0, and for a > a0 it depends on T(q) for q < 0.
Numerical Calculations To compute D(a), we assume that the Legendre transform formula (6.86)is valid. We first calculate Z(q,s) = ~-~pIWf(up,s)l q, then derive the decay scaling exponent r(q), and finally compute D(a) with a Legendre transform. If q < 0 then the value of Z(q,s) depends mostly on the small amplitude maxima [Wf(up,S)l. Numerical calculations may then become unstable. To avoid introducing spurious modulus maxima created by numerical errors in regions where f is nearly constant, wavelet maxima are chained to produce maxima curve across scales. If ~ = (-1)P 0 (e) where 0 is a Gaussian, Proposition 6.1 proves that all maxima lines Up(S) define curves that propagate up to the limit s -- 0. All maxima lines that do not propagate up to the finest scale are thus removed in the calculation of Z(q,s). The calculation of the spectrum D(a) proceeds as follows.
1. Maxima Compute Wf(u,s) and the modulus maxima at each scale s. Chain the wavelet maxima across scales.
2. Partition function Compute Z(q,s) = E IWf(up's)lq " P
3. Scaling Compute r(q) with a linear regression of log2 Z(s, q) as a function of log 2 s: log 2 Z(q,s)
,~ r(q) log 2 s + C(q) .
4. Spectrum Compute D(a) = min ( q ( a + 1 / 2 ) qE]~
7.(q)).
6.4 MULTIFRACTALS
209
D(cz )
q=O
q---
----oo
O~min
FIGURE 6.17
Convex spectrum
O:0
>0~
r
D(a).
Example 6.11 The spectrum of singularity D(a) of the devil's staircase (6.82) is a convex function that can be calculated analytically [203]. Suppose that pl < p2. The support of D(a)is [OLmin,OLmax] with -
O L m i n --"
log P2 and log3
-
OLmax
--
~
log Pl . log3
If Pl = p2 = 1/2 then the support of D(a) is reduced to a point, which means that all the singularities of f have the same Lipschitz log 2/log 3 regularity. The value D(log2/log3) is then the fractal dimension of the triadic Cantor set and is thus equal to log 2/log 3. Figure 6.18(a) shows a devil's staircase calculated with pl -- 0.4 and p: -- 0.6. Its wavelet transform is computed with r -- - 0 ' , where 0 is a Gaussian. The decay of log a Z(q,s) as a function of log: s is shown in Figure 6.18(b) for several values of q. The resulting T(q) and V(a) are given by Figures 6.18(c,d). There is no numerical instability for q < 0 because there is no modulus maximum whose amplitude is close to zero. This is not the case if the wavelet transform is calculated with a wavelet that has more vanishing moments.
Smooth Perturbations Let f be a multifractal whose spectrum of singularity D(a) is calculated from T(q). If a C ~ signal g is added to f then the singularities are not modified and the singularity spectrum of f - f + g remains D(c~). We study the effect of this smooth perturbation on the spectrum calculation. The wavelet transform of f is
s) - w f ( , ,
Let T(q) and ~(q) be the scaling exponent of the partition functions Z(q,s) and Z(q,s) calculated from the modulus maxima respectively of Wf(u,s) and W~f(u,s). We denote by D(a) and b(c~) the Legendre transforms respectively of ~-(q) and ~(q). The following proposition relates ~-(q) and ~(q).
210
C H A P T E R Vl
f(t)
WAVELET ZOOM Z(q,s)
200
150 0.8
100
0.6
50 0 .q=O.O0
m
0.4
/-
0.2
012
-50 -100
0'.4
0'.6
-15( _
0'.8
-8
o
log 2
s
(b)
(a) D(a)
~8(q)
0.6 0.5
-10
§247
+§§ +§§
0.4
++++++§
0.3 0.2
++++§
0.1
-s
6
~
lOq
8',4
0.5
(c)
0.6
0.7
0.8
0.9 a
(d)
FIGURE 6.18 (a): Devil's staircase with Pl -- 0 . 4 and p2 : 0.6. (b): Partition function Z(q,s) for several values of q. (c): Scaling exponent ~-(q). (d): The theoretical spectrum D ( a ) is shown with a solid line. The + are the spectrum values calculated numerically with a Legendre transform of 7(q).
(ARNEODO,BACRY,MUZY) Let ~b be a wavelet with exactly n vanishing moments. Suppose that f is a self-similar function. P r o p o s i t i o n 6.3
9 I f g is apolynomial ofdegree p < n then T(q) = ~-(q)for all q E JR. 9 If g(n) is almost everywhere non-zero then
~(q) --
"r(q) (n+ 1/2)q
if q > qc i f q <_ qr
(6.90)
where qc is defined by z(qc) : (n + 1/2)qc. Proof 3. If g is a polynomial of degree p < n then Wg(u,s) = 0. The addition of g does not modify the calculation of the singularity spectrum based on wavelet maxima, so T(q) = ~(q) for all q E R. If g is a C ~ function that is not a polynomial then its wavelet transform is generally non-zero. We justify (6.91) with an intuitive argument that is not a proof. A rigorous proof can be found in [83]. Since ~b has exactly n vanishing moments, (6.15) proves that I W g ( u , s ) l ~ K s n-l-l/2
g(n) (U).
6.4 MULTIFRACTALS
2 1I
We suppose that g ( n ) ( g ) r 0. For 7-(q) < (n + 1/2)q, since IWg(u,s)l q ~ s q(n+l/2) has a faster asymptotic decay than s ~-(q) when s goes to zero, one can verify that Z(q,s) and Z(q,s) have the same scaling exponent, ~(q) = -r(q). If -r(q) > (n + 1/2)q, which means that q < qc, then the decay of [W~f(u,s)lq is controlled by the decay of IWg(u,s)[q, SO~(q) = (n + 1/2)q. II This proposition proves that the addition of a non-polynomial smooth function introduces a bias in the calculation of the singularity spectrum. Let ac be the critical Lipschitz exponent corresponding to qc: D(ac) = qc (O~c+ 1 / 2 ) - "r(qc).
The Legendre transform of ~(q) in (6.90) yields
D(a)-
D(a) 0 -c~
ifa ac and c~ ~ n
(6.91)
This modification is illustrated by Figure 6.19. The bias introduced by the addition of smooth components can be detected experimentally by modifying the number n of vanishing moments of ~. Indeed the value of qc depends on n. If the singularity spectrum varies when changing the number of vanishing moments of the wavelet then it indicates the presence of a bias. 6.4.3
Fractal Noises 3
Fractional Brownian motions are statistically self-similar Gaussian processes that give interesting models for a wide class of natural phenomena [265]. Despite their non-stationarity, one can define a power spectrum that has a power decay. Realizations of fractional Brownian motions are almost everywhere singular, with the same Lipschitz regularity at all points. We often encounter fractal noise processes that are not Gaussian although their power spectrum has a power decay. Realizations of these processes may include singularities of various types. The spectrum of singularity is then important in analyzing their properties. This is illustrated by an application to hydrodynamic turbulence. Definition 6.3 (FRACTIONAL BROWNIAN MOTION) A fractional Brownian motion of Hurst exponent 0 < H < 1 is a zero-mean Gaussian process BI4 such that BH(O) = 0 , and
E{ IB/-/(t)-
Bl4(t-/x) 12}
--
21zxl H.
(6.92)
212
CHAPTER Vl
WAVELET ZOOM
",~,,
[5
D(~)
I
Ctrnin
!
',,
"
" "'
iD(o~)",, ~0
t~c
"',,
OCmax
n
FIGURE 6.19 If ~ has n vanishing moments, in presence of a C a perturbation the computed spectrum D(a) is identical to the true spectrum D ( a ) for a <_ ac. Its support is reduced to {n} for a > ac. Property (6.92) imposes that the deviation of ]BH(t) - B n ( t - A)I be proportional to IA[ H. As a consequence, one can prove that any realization f of Bn is almost everywhere singular with a pointwise Lipschitz regularity a - H. The smaller H, the more singular f . Figure 6.20(a) shows the graph of one realization forH =0.7. Setting A = t in (6.92) yields E{IBH(/)I 2} = ff2lt[2H. Developing (6.92) for A = t - u also gives E{BH(t)BH(U)} = -~- (I
+ [u
- I t - ulZn).
(6.93)
The covariance does not depend only on t - u, which proves that a fractional Brownian motion is non-stationary. The statistical self-similarity appears when scaling this process. One can derive from (6.93) that for any s > 0
E{Bn(st)Bn(su)} = E{sn Bn(t)s n Be(u)}. Since B n ( s t ) and s n B n ( t ) are two Gaussian processes with same mean and same covariance, they have the same probability distribution B e ( s t ) -- s n B n ( t ) ,
where -- denotes an equality of finite-dimensional distributions.
Power Spectrum Although BH is not stationary, one can define a generalized power spectrum. This power spectrum is introduced by proving that the increments of a fractional Brownian motion are stationary, and by computing their power spectrum [78].
6.4 MULTIFRACTALS
213
FIGURE 6.20 (a): One realization of a fractional Brownian motion for a Hurst exponent H -- 0.7. (b)" Wavelet transform. (c)" Modulus maxima of its wavelet transform. (d): Scaling exponent ~-(q). (e): Resulting D(c~) over its support. Proposition 6.4 Let gzx (t) -- 5(t) - 5 ( t -
A). The i n c r e m e n t
II4,Zx (t) -- B~I * g~x (t) -- Bl-l(t) - B H ( t -- A)
(6.94)
is a stationary p r o c e s s w h o s e p o w e r s p e c t r u m is
RII4,A( ~ ) -
io312H+l [ g A ( 0 3 )
i
(6.95)
9
Proof 2. The covariance of I/4,zx is computed with (6.93): ,
,
0"2
E{IHzx(t)Iz4zx(t--T)}-- 5-(I~--AI TM+ ~-+
/~ 2H
-2l~-I
2H
)--RI/4,zx(7") 9
(6.96)
The power spectrum kt,,~x (~) is the Fourier transform of RIH,~x(7-). One can verify that the Fourier transform of the distribution f(~-) --17-]TMis )(~v) - -AH I~v]-(2/4+1),
2 14
CHAPTERVl WAVELETZOOM
with An > 0. We thus derive that the Fourier transform of (6.96) can be written R,,,A (co) -- 2o.2 AH fool-(2H+l) sin 2 2xco 2 ' which proves (6.95) for a 2 = crZAH/2.
I
If X ( t ) is a stationary process then we know that Y(t) - X , g(t) is also stationary and the power spectrum of both processes is related by
Rx(O3) --[~(03)[2.
(6.97)
Although BH(t) is not stationary, Proposition 6.4 proves that IH,A (t) -- BH* g/x (t) is stationary. As in (6.97), it is tempting to define a "generalized" power spectrum calculated with (6.95):
RBH(~)- I~A(03)I2 = ]&i2H+I"
(6.98)
The non-stationarity of BH(t) appears in the energy blow-up at low frequencies. The increments IH,/x(t) are stationary because the multiplication by ]~/x(~)] 2 = O(co 2) removes the explosion of the low frequency energy. One can generalize this result and verify that if g is an arbitrary stable filter whose transfer function satisfies ] ~ ( o : ) j - O(~), then Y(t) - BH * g(t) is a stationary Gaussian process whose power spectrum is
Rr(c~ Wavelet Transform
i&12H+I ]g(0.))] .
(6.99)
The wavelet transform of a fractional Brownian motion is
WBH(U,S) -- B H , ~ , ( u ) .
(6.100)
Since ~b has a least one vanishing moment, necessarily ] ~ ( a J ) [ - O(a~) in the neighborhood of c o - 0. The wavelet filter g - ~bs has a Fourier transform ~(aJ) - x/~ ~b*(saJ) - O(co) near co - 0. This proves that for a fixed s the process Ys(u) - WBH(U,S) is a Gaussian stationary process [181], whose power spectrum is calculated with (6.99): -
s I
(s
)l 2
or2
-- s2H+2/)r, (saJ).
(6.101)
The self-similarity of the power spectrum and the fact that BH is Gaussian are sufficient to prove that WBH(u,s) is self-similar across scales"
WBH(U,S) - s H+l/2 WBH
(") s
-, 1 ,
where the equivalence means that they have same finite distributions. Interesting characterizations of fractional Brownian motion properties are also obtained by decomposing these processes in wavelet bases [49, 78, 357].
6.4 MULTIFRACTALS
2 I5
Example 6.12 Figure 6.20(a) displays one realization of a fractional Brownian with H --0.7. The wavelet transform and its modulus maxima are shown in Figures 6.20(b) and 6.20(c). The partition function (6.84) is computed from the wavelet modulus maxima. Figure 6.20(d) gives the scaling exponent 7-(q), which is nearly a straight line. Fractional Brownian motions are homogeneous fractals with Lipschitz exponents equal to H. In this example, the theoretical spectrum D(c~) has therefore a support reduced to {0.7} with D(0.7) = 1. The estimated spectrum in Figure 6.20(e) is calculated with a Legendre transform of ~-(q). Its support is [0.65,0.75]. There is an estimation error because the calculations are performed on a signal of finite size. Fractal Noises
Some physical phenomena produce more general fractal noises
X(t), which are not Gaussian processes, but which have stationary increments. As for fractional Brownian motions, one can define a "generalized" power spectrum that has a power decay
/~x(~)-
1~12~~+1.
These processes are transformed into a wide-sense stationary process by a convolution with a stable filter g which removes the lowest frequencies =
One can thus derive that the wavelet transform Ys(u) - WX(u,s) is a stationary process at any fixed scale s. Its spectrum is the same as the spectrum (6.101) of fractional Brownian motions. If H < 1, the asymptotic decay of/~x(~c) indicates that realizations of X(t) are singular functions but it gives no information on the distribution of these singularities. As opposed to fractional Brownian motions, general fractal noises have realizations that may include singularities of various types. Such multifractals are differentiated from realizations of fractional Brownian motions by computing their singularity spectrum D(c~). For example, the velocity fields of fully developed turbulent flows have been modeled by fractal noises, but the calculation of the singularity spectrum clearly shows that these flows differ in important ways from fractional Brownian motions. Hydrodynamic Turbulence Fully developed turbulence appears in incompressible flows at high Reynolds numbers. Understanding the properties of hydrodynamic turbulence is a major problem of modem physics, which remains mostly open despite an intense research effort since the first theory of Kolmogorov in 1941 [237]. The number of degrees of liberty of three-dimensional turbulence is considerable, which produces extremely complex spatio-temporal behavior. No formalism is yet able to build a statistical-physics framework based on the Navier-Stokes equations, that would enable us to understand the global behavior of turbulent flows, at it is done in thermodynamics. In 1941, Kolmogorov [237] formulated a statistical theory of turbulence. The velocity field is modeled as a process V (x) whose increments have a variance
E{IV(x + A)- V(x)l 2}
2/3 A2/3.
216
CHAPTER Vl
WAVELETZOOM
The constant e is a rate of dissipation of energy per unit of mass and time, which is supposed to be independent of the location. This indicates that the velocity field is statistically homogeneous with Lipschitz regularity a = H = 1/3. The theory predicts that a one-dimensional trace of a three-dimensional velocity field is a fractal noise process with stationary increments, and whose spectrum decays with a power exponent 2H + 1 = 5/3:
kv(
) -
[6~15/3"
The success of this theory comes from numerous experimental verifications of this power spectrum decay. However, the theory does not take into account the existence of coherent structures such as vortices. These phenomena contradict the hypothesis of homogeneity, which is at the root of Kolmogorov's 1941 theory. Kolmogorov [238] modified the homogeneity assumption in 1962, by introducing an energy dissipation rate c(x) that varies with the spatial location x. This opens the door to "local stochastic self-similar" multifractal models, first developed by Mandelbrot [264] to explain energy exchanges between fine-scale structures and large-scale structures. The spectrum of singularity D(c~) is playing an important role in testing these models [ 185]. Calculations with wavelet maxima on turbulent velocity fields [5] show that D(c~) is maximum at 1/3, as predicted by the Kolmogorov theory. However, D(c~) does not have a support reduced to { 1/ 3 }, which verifies that a turbulent velocity field is not a homogeneous process. Models based on the wavelet transform were recently introduced to explain the distribution of vortices in turbulent fluids [ 12, 179, 180]. 6.5
PROBLEMS 6.1. 1Lipschitzregularity (a) Prove that if f is uniformly Lipschitz c~ on [a, b] then it is pointwise Lipschitz c~ at all to E [a, b]. (b) Show that f(t) = tsint -1 is Lipschitz 1 at all to E [-1, 1] and verify that it is uniformly Lipschitz c~ over [- 1,1] only for c~ < 1/2. Hint: consider the points t, = (n + 1/2) -l 7r-1. 6.2. 1 Regularity of derivatives (a) Prove that f is uniformly Lipschitz a > 1 over [a,b] if and only if f ' is uniformly Lipschitz a - 1 over [a, b]. (b) Show that f may be pointwise Lipschitz a > 1 at to while f ' is not pointwise Lipschitz a - 1 at to. Consider f (t) = t 2 COSt - 1 at t = 0. 6.3. 1 Find f(t) which is uniformly Lipschitz 1 but does not satisfy the sufficient Fourier condition (6.1). 6.4. 1 Let f(t) = eosw0t and ~(t) be a wavelet that is symmetric about 0. (a) Verify that
Wf(u,s) =
V~(sc~0)coswot.
6.5 PROBLEMS
217'
(b) Find the equations of the curves of wavelet modulus maxima in the timescale plane (u,s). Relate the decay of IWf(u,s)l along these curves to the number n of vanishing moments of ~b. 6.5.
1 Let f(t) --Itl ~. Show that Wf(u,s) = s~+1/2 Wf(u/s, 1). Prove that it is not sufficient to measure the decay of lWf(u, s)l when s goes to zero at u = 0 in order to compute the Lipschitz regularity of f at t -- 0.
6.6. 2 Let f(t) = Itl ~ sin Itl -~ with c~ > 0 and/3 > 0. What is the pointwise Lipschitz regularity of f and f ' at t - 0? Find the equation of the ridge curve in the (u,s) plane along which the high amplitude wavelet coefficients IWf(u,s)l converge to t -- 0 when s goes to zero. Compute the maximum values of c~ and a ' such that Wf(u,s) satisfy (6.21). 6.7.
1 For a complex wavelet, we call lines of constant phase the curves in the (u,s) plane along which the complex phase of Wf(u,s) remains constant when s varies. (a) If f(t) --Itl ~, prove that the lines of constant phase converge towards the singularity at t - - 0 when s goes to zero. Verify this numerically in WAVELAB. (b) Let ~p be a real wavelet and Wf(u,s) be the real wavelet transform of f . Show that the modulus maxima of Wf(u,s) correspond to lines of constant phase of an analytic wavelet transform, which is calculated with a particular analytic wavelet ~)a that you will specify.
6.8. 2 Prove that if f - 1[0,+~) then the number of modulus maxima of Wf(u,s) at each scale s is larger than or equal to the number of vanishing moments of ~b. 6.9.
1 The spectrum of singularity of the Riemann function
f(t)-
+~
~
1
-~
sinn2/
n-----oo
is defined on its support by D ( a ) = 4 c ~ - 2 if c~ E [1/2,3/4] and D ( 3 / 2 ) = 0 [213, 222]. Verify this result numerically with WAVELAB, by computing this spectrum from the partition function of a wavelet transform modulus maxima. 6.10.
2 Let ~b -- - 0 ' where 0 is a positive window of compact support. If f is a Cantor devil's staircase, prove that there exist lines of modulus maxima that converge towards each singularity.
6.11.
2 Implement in WAVELAB an algorithm that detects oscillating singularities by following the ridges of an analytic wavelet transform when the scale s decreases. Test your algorithm on f(t) = sint -1 .
6.12.
2 Implement in WAVELABan algorithm that reconstructs a signal from the local maxima of its dyadic wavelet transform, with the frame algorithm of Section 6.2.2. Compare numerically the speed of convergence and the precision of the reconstruction when using the frame operator (6.49) that incorporates the extrema condition and the reduced frame operator (6.51).
6.13.
2 Let X[n] = f[n] + W[n] be a signal of size N, where W is a Gaussian white noise of variance ~r2. Implement in WAVELAB an estimator of f which thresholds at T -- cr V/2 log e N the maxima of a dyadic wavelet transform of X. The
218
CHAPTER Vl
WAVELETZOOM
estimation of f is reconstructed from the thresholded maxima representation with the frame algorithm of Section 6.2.2. Compare numerically this estimator with a thresholding estimator in a wavelet orthonormal basis. 6.14.
2 Let O(t) be a Gaussian of variance 1. (a) Prove that the Laplacian of a two-dimensional Gaussian
r
-
~176 0(x:)+ 0(x,)~176 ox------v-
ox-~
satisfies the dyadic wavelet condition (5.91) (there is only 1 wavelet). (b) Explain why the zero-crossings of this dyadic wavelet transform provide the locations of multiscale edges in images. Compare the position of these zerocrossings with the wavelet modulus maxima obtained with ~1 (Xl,X2) -O'(xl)O(x2) and r -O(Xl)Ot(x2). 6.15.
1 The covariance of a fractional Brownian motion BH(t) is given by (6.93). Show that the wavelet transform at a scale s is stationary by verifying that E
WBH(Ul,s) WBH(U2,S)
--
_ T s2H+I
itl2H q~ -Ul--U2 -s - t) dt,
with ~ ( t ) - (.,*~(t) and ~(t) = r 6.16.
2 Let X(t) be a stationary Gaussian process whose covariance Rx (~-) -E{X(t)X(t- T) } is twice differentiable. One can prove that the average number of zero-crossings over an interval of size 1 is -TrR~(0)(Tr 2 Rx(0)) -1 [56]. Let BH(t) be a fractional Brownian motion and ~ a wavelet that is C 2. Prove that the average numbers respectively of zero-crossings and of modulus maxima of WBH(u,s) for u E [0,1] are proportional to s. Verify this result numerically in WAVELAB.
6.17. 3 We want to interpolate the samples of a discrete signal f ( n / N ) without blurring its singularities, by extending its dyadic wavelet transform at finer scales with an interpolation procedure on its modulus maxima. The modulus maxima are calculated at scales 2J > N -1 . Implement in WAVELAB an algorithm that creates a new set of modulus maxima at the finer scale N - 1, by interpolating across scales the amplitudes and positions of the modulus maxima calculated at 2J > N -1 . Reconstruct a signal of size 2N by adding these fine scale modulus maxima to the maxima representation of the signal. 6.18.
3 Implement an algorithm that estimates the Lipschitz regularity c~ and the smoothing scale o of sharp variation points in one-dimensional signals by applying the result of Theorem 6.6 on the dyadic wavelet transform maxima. Extend Theorem 6.6 for two-dimensional signals and find an algorithm that computes the same parameters for edges in images.
6.19.
3 Construct a compact image code from multiscale wavelet maxima [261]. An efficient coding algorithm must be introduced to store the positions of the "important" multiscale edges as well as the modulus and the angle values of the wavelet transform along these edges. Do not forget that the wavelet transform angle is nearly orthogonal to the tangent of the edge curve. Use the image reconstruction algorithm of Section 6.3.2 to recover an image from this coded representation.
6.5 PROBLEMS 6.20.
2 19
3 A generalized Cantor measure is defined with a renormalization that transforms the uniform measure on [0,1] into a measure equal to Pl, 0 and P2 respectively on [0,11], [11,12] and [12,1], with Pl + p2 = 1. Iterating infinitely many times this renormalization operation over each component of the resulting measures yields a Cantor measure. The integral (6.82) of this measure is a devil's staircase. Suppose that ll, 12, p~ and p2 are unknown. Find an algorithm that computes these renormalization parameters by analyzing the self-similarity properties of the wavelet transform modulus maxima across scales. This problem is important in order to identify renormalization maps in experimental data obtained from physical experiments.
VII WAVELET BASES
O
ne can construct wavelets ~ such that the dilated and translated family
(
1 (t-2Jn)) ~3j,n(t ) -- - ~
~3
2J
(j,n)EZ2
is an orthonormal basis of L2(/t~). Behind this simple statement lie very different points of view which open a fruitful exchange between harmonic analysis and discrete signal processing. Orthogonal wavelets dilated by 2 j carry signal variations at the resolution 2 -j. The construction of these bases can thus be related to multiresolution signal approximations. Following this link leads us to an unexpected equivalence between wavelet bases and conjugate mirror filters used in discrete multirate filter banks. These filter banks implement a fast orthogonal wavelet transform that requires only operations for signals of size N. The design of conjugate mirror filters also gives new classes of wavelet orthogonal bases including regular wavelets of compact support. In several dimensions, wavelet bases of L2(R d) are constructed with separable products of functions of one variable.
O(N)
7. I
ORTHOGONAL
W A V E L E T BASES 1
Our search for orthogonal wavelets begins with multiresolution approximations. For f C L2(~), the partial sum of wavelet coefficients )-~n=-~ (f, can indeed be interpreted as the difference between two approximations of f at the
~j,n)~bj,n
220
7. I
22 i
O R T H O G O N A L WAVELET BASES
resolutions 2 -j+l and 2 -j. Multiresolution approximations compute the approximation of signals at various resolutions with orthogonal projections on different spaces {v~j}jEz. Section 7.1.3 proves that multiresolution approximations are entirely characterized by a particular discrete filter that governs the loss of information across resolutions. These discrete filters provide a simple procedure for designing and synthesizing orthogonal wavelet bases.
7. I. I
Multiresolution Approximations
Adapting the signal resolution allows one to process only the relevant details for a particular task. In computer vision, Burt and Adelson [ 108] introduced a multiresolution pyramid that can be used to process a low-resolution image first and then selectively increase the resolution when necessary. This section formalizes multiresolution approximations, which set the ground for the construction of orthogonal wavelets. The approximation of a function f at a resolution 2 -j is specified by a discrete grid of samples that provides local averages of f over neighborhoods of size proportional to 2 j. A multiresolution approximation is thus composed of embedded grids of approximation. More formally, the approximation of a function at a resolution 2 -j is defined as an orthogonal projection on a space Vj C L2(R). The space Vj regroups all possible approximations at the resolution 2 -j. The orthogonal projection of f is the function fj C Vj that minimizes flY- fj[[. The following definition introduced by Mallat [254] and Meyer [47] specifies the mathematical properties of multiresolution spaces. To avoid confusion, let us emphasize that a scale parameter 2 j is the inverse of the resolution 2 -j. Definition 7.1 (MULTIRESOLUTIONS) A sequence {Vj}jE Z of closed subspaces of
L z (~) is a multiresolution approximation ifthefollowing 6properties are satisfied: V(j,k) E Z 2 , f(t) E Vj r f(t-2Jk) ~ Vj, VjEZ VjCZ
, Vj+IcVj,
, f(t) c V j ~=~ f
(') ~
(7.1) (7.2)
cVj+I,
(7.3)
+oc
lim V j -
j-~+oc
N j ---_
Vj-{0},
lim V j - C l o s u r e ( U
j--+--OO
(7.4)
(~
Vj)-L2(IR).
(7.5)
\j=-oc
There exists 0 suchthat {O(t- n)},~cz is a Riesz basis of Vo. Let us give an intuitive explanation of these mathematical properties. Property (7.1) means that Vj is invariant by any translation proportional to the scale 2 7. As we shall see later, this space can be assimilated to a uniform grid with intervals 2 j, which characterizes the signal approximation at the resolution 2 -j. The inclusion
222
CHAPTER Vll
WAVELET BASES
(7.2) is a causality property which proves that an approximation at a resolution 2 - j contains all the necessary information to compute an approximation at a coarser resolution 2 -j-1 . Dilating functions in Vj by 2 enlarges the details by 2 and (7.3) guarantees that it defines an approximation at a coarser resolution 2 -j-1. When the resolution 2 - j goes to 0 (7.4) implies that we lose all the details of f and lim IIPv~fll - 0. j--++~
(7.6)
On the other hand, when the resolution 2 - j goes + ~ , property (7.5) imposes that the signal approximation converges to the original signal: lirn IIf - e v ~ f l l
j-+-~
(7.7)
- 0.
When the resolution 2-J increases, the decay rate of the approximation error Ilf Pvjf[I depends on the regularity of f . Section 9.1.3 relates this error to the uniform Lipschitz regularity of f . The existence of a Riesz basis { O ( t - n)}ncZ of V0 provides a discretization theorem. The function 0 can be interpreted as a unit resolution cell; Appendix A.3 gives the definition of a Riesz basis. There exist A > 0 and B such that any f C V0 can be uniquely decomposed into --~-oo
f (t) -
Z
(7.8)
a[n] O ( t - n)
n---cx~
with
--~-oo
A
Ilfll 2 < ~
la[n]l 2 _< B Ilfll 2
(7.9)
n - - --oo
This energy equivalence guarantees that signal expansions over {O(t - n) }nez are numerically stable. With the dilation property (7.3) and the expansion (7.8), one can verify that the family {2-J/20(2-Jt - n)}ncz is a Riesz basis of Vj with the same Riesz bounds A and B at all scales 2 j. The following proposition gives a necessary and sufficient condition for { O ( t - n)}n6g to be a Riesz basis. Proposition 7.1 A family {O(t- n) )n~z is a Riesz basis of the space V0 it generates
if and only if there exist A > 0 and B > 0 such that
w c
[-~-, ~-]
1
+~
1
~ < ~
Ib(o.,-2k~)l 2 < ,1-
(7.10)
k---co
Proof 1. Any f E V0 can be decomposed as +co
f (t) = Z n=--cx3
a[n] O(t - n).
(7.11)
ORTHOGONALWAVELETBASES
7. I
223
The Fourier transform of this equation yields a}(co) -- a(co) 0(co) where a(co) is the Fourier series a(co) -thus be written }lfl]2
_
=
1
27r
J'5
The norm of f can
17(0.3)12d~ -- ~1 f02rr y+c~ ~ la(~ + 2kTr)] 2 ]O(cu + 2kyr)[ 2 dcu
k=-oo
1 jO"2~-
27r
+oo a[n] exp(-inco). Y'~,,=-oo
(7.12)
+oc
la(~u)12Z
[b(~u+2kTr)12&u'
k---o~
because a(~u) is 27r periodic. The family 1 f0 27r
A [[fll 2 < ~
(7.13)
{O(t- n)}nez is a Riesz basis if and only if
~/(CO) 2 dco -- ~+oe la[n] 2 _< B Ilf [2.
(7.14)
n---oo
If 0 satisfies (7.10) then (7.14) is derived from (7.13). The linear independence of {O(t--n)}n6Z is a consequence of the fact that (7.14)is valid for any a[n] satisfying (7.11). If f = 0 then necessarily a[n]--0 for all n C Z. The family {O(t-n)}n~Z is therefore a Riesz basis of V0. Conversely, if {O(t - n) }ncz is a Riesz basis then (7.14) is valid for any a[n] E Iz (Z). If either the lower bound or the upper bound of (7.10) is not satisfied for almost all co E [-re, rr] then one can construct a non-zero 2rr periodic function a(co) whose support corresponds to frequencies where (7.10) is not verified. We then derive from (7.13) that (7.14) is not valid for a[n], which contradicts the Riesz basis hypothesis. II
Example 7.1 Piecewise constant approximations A simple multiresolution approximation is composed of piecewise constant functions. The space Vj is the set of all g E L2(1R) such that g(t) is constant for t E [nU, (n + 1)U) and n E Z. The approximation at a resolution 2-J of f is the closest piecewise constant function on intervals of size U. The resolution cell can be chosen to be the box window 0 = 1[0,1). Clearly Vj C Vj-1 since functions constant on intervals of size 2J are also constant on intervals of size 2 j-1 . The verification of the other multiresolution properties is left to the reader. It is often desirable to construct approximations that are smooth functions, in which case piecewise constant functions are not appropriate. Example 7.2 Shannon approximations Frequency band-limited functions also yield multiresolution approximations. The space Vj is defined as the set of functions whose Fourier transform has a support included in [-2-JTr, 2-JTr]. Proposition 3.2 provides an orthonormal basis {O(t-n)}.~z of Vo defined by sin 7rt .tt) = ~ . /~/"
\
7rt
All other properties of multiresolution approximation are easily verified.
(7.15)
224
CHAPTER VII WAVELETBASES
O(t) 0.8
1 0.8
0.6
0.6
0.4
0.4 0.2
0.2 J
-1
FIGURE 7. I
0
1
0
2
-10
0
10
Cubic box spline 0 and its Fourier transform t).
The approximation at the resolution 2 - j of f E L 2 (/~) is the function Pvj f E Vj that minimizes ]lPvjf- f[I. It is proved in (3.12) that its Fourier transform is obtained with a frequency filtering" A
Pvjf (~o) -- ff (w) l[-2-'rr,2-Jrr](w). This Fourier transform is generally discontinuous at -+-2-JTr, in which case IPvjf(t)l decays like I/I -~, for large Itl, even though f might have a compact support. Example 7.3 Spline approximations Polynomial spline approximations construct smooth approximations with fast asymptotic decay. The space Vj of splines of degree m > 0 is the set of functions that are m - 1 times continuously differentiable and equal to a polynomial of degree m on any interval [n2J, (n + 1)2J], for n E Z. When m = 0, it is a piecewise constant multiresolution approximation. When m = 1, functions in Vj are piecewise linear and continuous. A Riesz basis of polynomial splines is constructed with box splines. A box spline 0 of degree m is computed by convolving the box window 1[0,1] with itself m + 1 times and centering at 0 or 1/2. Its Fourier transform is sin(w/2)) O(~v) -
~v/2
m+l
exp
-ieco ) 2
"
(7.16)
If m is even then e = 1 and 0 has a support centered at t = 1/2. If m is odd then = 0 and O(t) is symmetric about t - 0. Figure 7.1 displays a cubic box spline m = 3 and its Fourier transform. For all m >__0, one can prove that {O(t - n) },~z is a Riesz basis of V0 by verifying the condition (7.10). This is done with a closed form expression for the series (7.24).
7.1.2
Scaling Function
The approximation of f at the resolution 2 - j is defined as the orthogonal projection Pvjf on Vj. To compute this projection, we must find an orthonormal basis of Vj.
7. I ORTHOGONAL WAVELETBASES
225
The following theorem orthogonalizes the Riesz basis {O(t- n) }nEZ and constructs an orthogonal basis of each space Vj by dilating and translating a single function r called a scaling function. To avoid confusing the resolution 2-J and the scale 2 j, in the rest of the chapter the notion of resolution is dropped and P v j f is called an approximation at the scale 2 j. T h e o r e m 7.1 Let {Vj }jEZ be a multiresolution approximation and ~ be the scal-
ing function whose Fourier transform is r
=
t9(~u)
(7.17)
Let us denote Cj,n (t ) = - - ~ r The family {r
-~
9
is an orthonormal basis of Vj for all j E Z.
Proof 1. To construct an orthonormal basis, we look for a function r E V0. It can thus be expanded in the basis {O(t- n)}neZ: +~
r
= Z
a[n]O(t- n),
n=--oo
which implies that
~(~) = ~(~) b(~),
where ~ is a 27r periodic Fourier series of finite energy. To compute h we express the orthogonality of {~b(t- r/)}n~Z in the Fourier domain. Let r r For any (n, p) E Z 2,
<,(t-n),,(t-p))
= f+~162162 =
r
Hence {r is orthonormal if and only if r162 Fourier transform of this equality yields
(7.18) = 3[n]. Computing the
+oo
Z
I~b(cu+ 2kTr)[2 -- 1.
(7.19)
k---o~
Indeed, the Fourier transform of r r is [r 2, and we proved in (3.3) that sampling a function periodizes its Fourier transform. The property (7.19) is verified if we choose a(~;) -
1O(~ + 2kTr)l2 k
Proposition 7.1 proves that the denominator has a strictly positive lower bound, so fi is a 27r periodic function of finite energy. I
226
CHAPTER VII
WAVELET BASES
r
f
1 0.8
---~
0.6
0.5
0.4 0.2 -10
-5
0
5
0
10
_ -10
/
\ 0
_ 10
FIGURE 7.2 Cubic spline scaling function 05 and its Fourier transform ~ computed with (7.23).
Approximation The orthogonal projection of f over V j is obtained with an expansion in the scaling orthogonal basis -4-oo
Pvjf-
Z
(f'~J'n)t~J'n"
(7.20)
n=-c~
The inner products
aj [n] = (f , Cj,n)
(7.21)
provide a discrete approximation at the scale 2J. We can rewrite them as a convolution product:
aj[n] -- f 7
1 ~ ( t - 22JJ n ) dt - f , ~j(2Jn), f (t) --~
(7.22)
with ~j(t) - x/~-J(p(2-Jt). The energy of the Fourier transform ~ is typically concentrated in [-Tr, 7r], as illustrated by Figure 7.2. As a consequence, the Fourier transform v/~*(2J~c) of ~j(t) is mostly non-negligible in [-2-JTr,2-JTr]. The discrete approximation aj[n] is therefore a low-pass filtering of f sampled at intervals 2 j. Figure 7.3 gives a discrete multiresolution approximation at scales 2 -9 < 2 j < 2 -4.
Example 7.4 For piecewise constant approximations and Shannon multiresolution approximations we have constructed Riesz bases {O(t- n)}ncZ which are orthonormal bases, hence ~b- 0.
Example 7.5 Spline multiresolution approximations admit a Riesz basis constructed with a box spline 0 of degree m, whose Fourier transform is given by (7.16). Inserting this expression in (7.17) yields
~(w) -
exp(-ie~/2) ~Mm-k-1 v / g 2m 4_2 ( (M) '
(7.23)
7. I
ORTHOGONALWAVELETBASES
227
FIGURE 7.3 Discrete multiresolution approximations puted with cubic splines. with
+co Sn (co)
aj[n] at
scales 2J, com-
1
2_,
(7.24)
+
k-----oo
and e = 1 if m is even or e = 0 if m is odd. A closed form expression of $2m+2 (co) is obtained by computing the derivative of order 2m of the identity +~
$2 (2co)
2..,
k=-c~
1
1
(2co + 2kTr) 2 = 4 s i n 2 co"
For linear splines m = 1 and $4 (2co)
-
1 + 2 cos 2 co , 48 sin4 co
(7.25)
which yields ~5(w) -
4 v ~ s i n 2 (co/2) . co2 V/1 + 2cos2(co/2)
The cubic spline scaling function corresponds to m with (7.23) by inserting $8 (2co)
=
(7.26) 3 and ~(co) is calculated
5 + 30 cos 2 co + 30sin 2 co cos 2 co 105 28 sin 8 co
(7.27)
228
CHAPTER VII
+
WAVELET BASES
70cos 4 co + 2sin 4 co cos 2 co + 2/3 sin 6 co 105 28 sin 8 co
This cubic spline scaling function ~5 and its Fourier transform are displayed in Figure 7.2. It has an infinite support but decays exponentially.
7.1.3
Conjugate Mirror Filters
A multiresolution approximation is entirely characterized by the scaling function 05 that generates an orthogonal basis of each space V j. We study the properties of ~bwhich guarantee that the spaces Vj satisfy all conditions of a multiresolution approximation. It is proved that any scaling function is specified by a discrete filter called a conjugate mirror filter.
Scaling Equation The multiresolution causality property (7.2) imposes that Vj C Vj-1. In particular 2-1~2ok(t~2) c V1 c V0. Since {~b(t- n)}ncZ is an orthonormal basis of V0, we can decompose 1
+oo
t
-~b(~)-
E n~
with
h[n]-
h[n]c~(t-n),
(7.28)
--(X)
(1~ b ( ~ ) , ~, b ( t - n ) } .
(7.29)
This scaling equation relates a dilation of q5 by 2 to its integer translations. The sequence h[n] will be interpreted as a discrete filter. The Fourier transform of both sides of (7.28) yields ~(2co) -- ~
1
h(co)~(co)
(7.30)
for h(co) - Y'~n=-oo +~ h[n] e -in~~ It is thus tempting to express ~5(co) directly as a product of dilations of h(co). For any p __ 0, (7.30) implies qS(Z-P+lco) - ~
1
h(Z-Pco)$(2-Pco).
(7.31)
) ~5(2-Pc0)"
(7.32)
By substitution, we obtain
_
If ~(co) is continuous at co - 0 then lim ~(2-Pco) -- ~(0) so P~4-oo
+o~ ~(2_pco)
H
p=l
(7.33)
7. I
ORTHOGONAL WAVELET BASES
229
The following theorem [254, 47] gives necessary and then sufficient conditions on ~t(w) to guarantee that this infinite product is the Fourier transform of a scaling function. T h e o r e m 7.2 (MALLAT, MEYER) Let (9 C L 2(R) be an integrable scaling func-
tion. The Fourier series of h[n] - (2-1/2c~(t/2), ~ ( t - n)) satisfies V~ E ~ , Ikt(u;)I2 + Ih(~ + 7r)I 2 - 2,
(7.34)
h(0) - x/2.
(7.35)
and Conversely, if kt(~c) is 27r periodic and continuously differentiable in a neighborhood of ~c - O, if it satisfies (7.34) and (7.35) and if inf w~[-Tr/2,Tr/21
Ih(~)l
> 0
(7.36)
then + ~ ~(2-pw)
(7.37)
p=l
is the Fourier transform of a scaling function r E L 2 (R). Proof This theorem is a central result whose proof is long and technical. It is divided in several parts.
9 Proof 1 of the necessary condition (7.34) The necessary condition is proved to be a consequence of the fact that {(9(t-n)}ncZ is orthonormal. In the Fourier domain, (7.19) gives an equivalent condition: -qt-oo
w ~ R,
~
I~(~ + ek~)l: - 1.
~7.38~
k---oo
Inserting ~(co)= 2-1/2h(co/2)&(w/2) yields --~oo
co
1~(2 +k~)12 I~(~ +k~)l 2 - 2. k---c~
Since ~t(co) is 27r periodic, separating the even and odd integer terms gives -3t-OQ
~ ~~ ~ I~(~~ + ~ ) I~+ I~ ./~~ +~)I~ ~ I~(~+ ~ ~ + ~ ) I~-~ p----oo
p~-=--oo
Inserting (7.38) for co' = co/2 and co' - co/2 + 7r proves that
Ii,(~')12 + Ii,(J + 7r)l2 -- 2. 9Proof z of the necessary condition (7.35) We prove that ~t(0) = x/~ by showing that ~(0) ~ 0. Indeed we know that ~(0) - 2 -1/2 kt(0)~(0). More precisely, we verify
230
CHAPTER Vll
WAVELET BASES
that I~(0) I -- 1 is a consequence of the completeness property (7.5) of multiresolution approximations. The orthogonal projection of f C L2 (/i~) on Vj is +~
evjf--
(7.39)
~ (f,~j,n)~j,n. n=-cx~
Property (7.5) expressed in the time and Fourier domains with the Plancherel formula implies that A
lim IIf-
evjfll
j--+-oo
z -
2
lim 27r IIf- Pvjfll - 0.
(7.40)
j--+-oo
A
To compute the Fourier transformPvj f(w), we denote ~bj(t) = ~ ~ b ( Z - J t ) . the convolution expression (7.22) in (7.39) yields +oo
Inserting
+oo
Pvjf(t)= Z f*~J(ZJn)c~J(t-ZJn)=c~J* ~ f*~J(ZJn)~(t-ZJn)" n----oo
n=-oo
The Fourier transform of f , ~j(t) is v/~f(w)~*(2J~). A uniform sampling has a periodized Fourier transform calculated in (3.3), and hence
Pvjf(oJ) =
~(2Ja;) ~
f
a;
k=-c~
-- --~-
]
2j
a;
-
2J
J
.
(7.41) A
Let us choose f = 1[_.,~]. For j < 0 and ~ E [-Tr, Tr], (7.41) gives Pvjf(ov) = [~(2Jov) [2. The mean-square convergence (7.40) implies that
lim
J--+-~
~r
1 -1~(2J~o)l ~ d~o - O.
Since q~is integrable, b(~) is continuous and hence limj_~_~ 1~(2J~)l = I~(0)1- 1. We now prove that the function ~b whose Fourier transform is given by (7.37) is a scaling function. This is divided in two intermediate results.
9Proof3 that {qS(t-n)}nEZ is orthonormal. Observe first that the infinite product (7.37) converges and that I~(~)1-< I because (7.34) implies that I/,(~)1-< v~. The Parseval formula gives (c~(t),c~(t-n))- / i
c~(t)(9*(t-n)dt- ~l
l~(~)12ein~d~.
Verifying that {~b(t - n) }ncZ is orthonormal is thus equivalent to showing that
f+c~ l~(w)12 einwd6o -- 27r,[n]. This result is obtained by considering the functions
4~(~)
= i~i kt(2-Pw) v~ lt-:~":~'~ p--1
(~)
7. I ORTHOGONAL WAVELET BASES
2~ l
and computing the limit, as k increases to +oo, of the integrals
I~k(~o)12e~n~&o -
I~[n]-
J-2kTr p--1
2
e in~~dco.
First, let us show that Ik [n] - 27r3[n] for all k >__1. To do this, we divide I~ [n] into two integrals:
1
0
Ik [n] =
2krr p--1
Ih(2-Pco) 12 e ira~ dco -]2 ,Io
2 p= l
e ira~ dco.
Let us make the change of variable co' - co + 2krc in the first integral. Since h(co) is 2rr periodic, when p < k then 1~(2-p[co'- 2~rr])l 2 -l~(2-pco')l z. When k - p the hypothesis (7.34) implies that Ih(2-~[co ' - 2~rr]) 12+ Ih(2-kco') 12 -- 2. For k > 1, the two integrals of Ik [n] become
12krr ~ Ik[n] --
dO
[i/(2-PCO) [2 2
p--1
e in~~dco.
(7.42)
k-1 Since I-Ip=l I~t(Z-Pco) 12ein~ is 2krr periodic we obtain Ik[n] - Ik-1 [n], and by induction Ik[n] -- I1 [n]. Writing (7.42) for k -- 1 gives I~ [n] =
e in~ dco = 2~- 6[n],
which verifies that Ik[n] 2 ~ [ n ] , for all k _> 1. We shall now prove that q5 C L 2 (R). For all co E IR -
-
i~t(2-pco) 12 - 1~(r 2
lim [~k(co)[ 2 = H k-+~ p--1
The Fatou Lemma A. 1 on positive functions proves that f + o o [qS(c~ 12de~ -< limk-+~f + o o
~k(CO)I 2dco=27r,
(7.43)
because I~[0] = 2re for all k > 1. Since
i~(CO) i2 e i"~ - lim ICk(co)l 2 e inw , k--+oo
we finally verify that
S
oo
ID(co)12e in~ dco
--
Si
lim k--+oo
I&(~o)l ~ e inm dco = 27r di[n]
(7.44)
by applying the dominated convergence Theorem A.1. This requires verifying the upper-bound condition (A.1). This is done in our case by proving the existence of a constant C such that [l@k(co)12ein~~
I
I
2 ~ C I~(co)l 2.
(7.45)
CHAPTER Vll
2~2
WAVELET BASES
Indeed, we showed in (7.43) that ]~(w) 2 is an integrable function. The existence of C > 0 satisfying (7.45) is trivial for ]w] > 2kTr since ~Sk(w) = 0. For [w I _< 2krr since ~5(w) = 2 -1/2 h(w/2)qS(w/2), it follows that
I~,(co)l 2 = I@k(co)l21~,(2-%)12. To prove (7.45) for I~ol <_ 2krr, it is therefore sufficient to show that I@(co)l2 >_ 1 / c for
~oc [-~,,~]. Let us first study the neighborhood of w = 0. Since h(w) is continuously differentiable in this neighborhood and since If,@)l 2 <__2 = li,(O)l 2, the functions l~t(w)[2 and log e ]h(w)] 2 have derivatives that vanish at w = 0. It follows that there exists e > 0 such that _ Hence,
,
2)
_
>__ -I~1.
for I~ol _<
=
> e-I~ol > e -'. -
2
(7.46)
Now let us analyze the domain w[ > e. To do this we take an integer 1 such that 2-lrr < e. Condition (7.36) proves that K -- inf~c[-~/2:/2] Ih(~o)l > 0 so if I~ol <_ 1~5(w) 2 =
l ~ Ih(2-Pc~ ]2
2
K 2l
e-s
m
1
.]kit
p--1
This last result finishes the proof of inequality (7.45). Applying the dominated convergence Theorem A.1 proves (7.44) and hence that {~b(t- n)}n~z is orthonormal. A simple change of variable shows that {~bj,n}jcz is orthonormal for all j E Z.
9 Proof 3 that {Vj}j~z is a multiresolution. To verify that ~ is a scaling function, we must show that the spaces Vj generated by {~j,n}jcz define a multiresolution approximation. The multiresolution properties (7.1) and (7.3) are clearly true. The causality V j+l C Vj is verified by showing that for any p E Z, -ovoo
h [ n - 2p] ~)j,n.
~J+',P -- E n----cx~
This equality is proved later in (7.112). Since all vectors of a basis of Vj+ 1 can decomposed in a basis of Vj it follows that V j+l c Vj. To prove the multiresolution property (7.4) we must show that any f E L2(1R) satisfies lim IIPvjfl = o. (7.47) j-++oo
Since
{r
is an orthonormal basis of V j +oo
Ilevjf 12- ~ n~--oo
I(f,~J,,)l 2-
7. I
ORTHOGONAL
WAVELET
BASES
233
Suppose first that f is bounded by A and has a compact support included in [2J,2J]. The constants A and J may be arbitrarily large. It follows that +cr
I(f, Cj,n)12
2-a
If (t) [[d?(2-at - n) ldt n
n=-c~
2J
2-JA 2
[d)(2-Jt-n)[dt n
2J
Applying the Cauchy-Schwarz inequality to 1 • -+-cx)
q-oo
I(f'c~J'n)[2 <--
yields
2J
f
aZ2J+l Z
n~---oo
1~(2-Jt - n)l
2J [(9(2_Jt_n)122_Jdt
n~--oG
< A22J+l~sjl~(t)12dt--A22J+lfTlfS(t)[21sj(t)dt , with Sj - Un~[n- 2J-J,n + 2J-j] for j > J. For t ~ Z we obviously have lsj (t) -+ 0 for j --+ +oo. The dominated convergence TheoremA. 1 applied to [~b(t)[2 lsj (t) proves that the integral converges to 0 and hence -21-OO
lim ~ j-++oo
I(f,~j,n)12--O.
n~----oo
Property (7.47) is extended to any f E L2(~) by using the density in L2(~) of bounded function with a compact support, and Proposition A.3. To prove the last multiresolution property (7.5) we must show that for any f E L2(R), /
lira j-+-oo IIf
Pv, fll:
= j--+-oo lim (llfll: \
\
-Ilev, SII:]/ = o.
(7.48)
We consider functions f whose Fourier transform 5} has a compact support included in [-2arT, 2srr] for J large enough. We proved in (7.41) that the Fourier transform of Pvsf is -~-oo
Pv,-'~(co) = ~5(2Jco) ~
f (co - 2-J2krr) ~b*(2 j [co - 2-J2krr]).
k-----oo
If j < - J , then the supports of ~c(co_ 2-J2krr) are disjoint for different k so
Ilevjfll=
-
2rr +~--~
If(co) ~
4 dco
[qS(2jco)
If (co- 2-j2krr)
(7.49)
[21r
I~ (2J
[co-2-J2krr])12dco.
k=-c~ kr
We have already observed that [4~(co)[ < 1 and (7.46) proves that for co sufficiently small Ir _> e -I~~ so lim I@(~o)1= 1. w-+0
234
CHAPTER VII
WAVELET BASES
Since ~(~)121~(2J~)14 ~ I~(~)12 and limj_~_~ [@(2J~)14l~(~)[ 2 = apply the dominated convergence Theorem A. 1, to prove that lim
)(w) 2 l~(2Jw)14dw =
j-+-c~
I~(~)12 one can
I)(w)l 2dw - II/I 2.
(7.50)
o0
The operator Pvj is an orthogonal projector, so Ilevjftl < Ilfll. With (7.49) and (7.50), this implies that limj_+_~(llfll = -IlPvjfll 2) - 0, and hence verifies (7.48). This property is extended to any f E L2 (IR) by using the density in L2 (IR) of functions whose Fourier transforms have a compact support and the result of Proposition A.3. II Discrete filters whose transfer functions satisfy (7.34) are called c o n j u g a t e m i r r o r As we shall see in Section 7.3, they play an important role in discrete signal processing; they make it possible to decompose discrete signals in separate frequency bands with filter banks. One difficulty of the proof is showing that the infinite cascade of convolutions that is represented in the Fourier domain by the product (7.37) does converge to a decent function in L2(IR). The sufficient condition (7.36) is not necessary to construct a scaling function, but it is always satisfied in practical designs of conjugate mirror filters. It cannot just be removed as shown by the example h(co) = cos(3co/2), which satisfies all other conditions. In this case, a simple calculation shows that f5 = 1/31[_3/2,3/2]. Clearly {4~(t- n) }~cz is not orthogonal so 4~is not a scaling function. The condition (7.36) may however be replaced by a weaker but more technical necessary and sufficient condition proved by Cohen [ 17, 128].
filters.
Example 7.6 For a Shannon multiresolution approximation, ~5 - 1[_~:]. derive from (7.37) that
We thus
VCO(E [--71",71"] , h(co) -- V/2 l[-rr/2,rr/2] (co). Example 7.7 For piecewise constant approximations, ~b = 1[0,1] . Since h[n] = ( 2 - 1 / 2 ~ ( t / 2 ) , qS(t - n)) it follows that 2 1/2 h[n] -
0
i f n - - 0, 1 otherwise
(7.51)
Example 7.8 Polynomial splines of degree m correspond to a conjugate mirror filter h(co) that is calculated from ~(co) with (7.30): ~t(co) - x/2 ~(2co)
o
(7.52)
Inserting (7.23) yields ~t(co) _ exp ( - i e c o ) ~/ $2m-+-2(co) 2 22m+l $2m+2 (2co) '
(7.53)
7 ~ ORrHOGONALWAVELEr BASES
-2
-
0
-
235
2
FIGURE 7.4 The solid line gives Ikt(c~)l2 on [-Tr, 7r], for a cubic spline multiresolution. The dotted line corresponds to I~(~)l 2.
II
n
hi,,]
m=l
0 1,-1 2, - 2 3, - 3 4, - 4 5, - 5 6, - 6 7, - 7 8, - 8 9, - 9 10,-10 11,-11
0.817645956 0.397296430 -0.069101020 -0.051945337 0.016974805 0.009990599 -0.003883261 -0.002201945 0.000923371 0.000511636 -0.000224296 -0.000122686
m=3
0 1,-1 2, - 2 3, - 3 4, - 4
0.766130398 0.433923147 -0.050201753 -0.110036987 0.032080869
h[n] m=3
5, - 5 6, - 6 7, - 7 8, - 8 9, - 9 10,-10 11,-11 12,-12 13,-13 14,-14 15,-15 16,-16 17,-17 18,-18 19,-19 20, - 2 0
0.042068328 -0.017176331 -0.017982291 0.008685294 0.008201477 -0.004353840 -0.003882426 0.002186714 0.001882120 -0.001103748 -0.000927187 0.000559952 0.000462093 -0.000285414 -0.000232304 0.000146098
Table 7. I Conjugate mirror filters h[n] corresponding to linear splines m and cubic splines m - 3. The coefficients below 10 -4 are not given.
1
where c - 0 if m is odd and e - 1 if m is even. For linear splines m - 1 so (7.25) implies that h(aJ)
-
v/~
1 +2cos2(a~/2) 1 + 2 cos 2 ~
1/2
cos 2
2-
"
(7.54)
For cubic splines, the conjugate mirror filter is calculated by inserting (7.27) in (7.53). Figure 7.4 gives the graph of The impulse responses h[n] of these filters have an infinite support but an exponential decay. For m odd, h[n] is symmetric about n - 0. Table 7.1 gives the coefficients h[n] above 10 -4 for m - 1,3.
I/,(~)12,
236
CHAPTERVII WAVELETBASES
7.1.4
In Which Orthogonal Wavelets Finally Arrive
Orthonormal wavelets carry the details necessary to increase the resolution of a signal approximation. The approximations of f at the scales 2 j and 2 j-1 are respectively equal to their orthogonal projections on V j and V j-1. We know that V j is included in V j-1. Let W j be the orthogonal complement of V j in V j-l" Vj-1 -- Vj 9 Wj.
(7.55)
The orthogonal projection of f on V j_ 1 can be decomposed as the sum of orthogonal projections on Vj and W j: (7.56)
Pvj_,f -- P v j f + P w j f .
The complement P w j f provides the "details" of f that appear at the scale 2 j-1 but which disappear at the coarser scale 2 j. The following theorem [47, 254] proves that one can construct an orthonormal basis of W j by scaling and translating a wavelet ~. Theorem
7.3 (MALLAT, MEYER) Let (9 be a scaling function and h the corre-
sponding conjugate mirror filter. Let ~ be the function whose Fourier transform 1
w
with ~(~) - e-i~ ~t*(~ + 7r).
Let us denote
1 (t
Cj,n(t) -- - - ~ r
2J
(7.58)
"
For any scale 2 j, {r is an orthonormal basis of Wj. {r is an orthonormal basis of L2(~).
For all scales,
Proof 1. Let us prove first that ~ can be written as the product (7.57). Necessarily ~(t/2) E W1 c V0. It can thus be decomposed in {~b(t- n) }nE~ which is an orthogonal basis of V0" 1 t +~ --~ ~ (-2) -- Z g[n] fb(t- n), (7.59) n---cxD
with
t
The Fourier transform of (7.59) yields ~(2~) = ~
1
~(~) ~(~).
(7.61)
The following lemma gives necessary and sufficient conditions on ~ for designing an orthogonal wavelet.
7. I
O R T H O G O N A L WAVELET BASES
237
L e m m a 7.1 The family {~j,,,},,EZ is an orthonormal basis ofWj if and only if [~(co) [2 + [&(co-+-wr)[2 = 2
(7.62)
~(~)/,* (~) + ~(~ + ~)/,* (~ + ~) = o.
(7.63)
and The lemma is proved for j - 0 from which it is easily extended to j ~: 0 with an appropriate scaling. As in (7.19) one can verify that { ~ ( t - n)}nEZ is orthonormal if and only if V~v E ~ , l(cv) -- Z
Iz~(~ + 2kTr)12 -- 1.
(7.64)
k=-co
Since ~(~) - 2 -1/2 ~(~v/2)~(~v/2) and ~(~v) is 27r periodic, --~-oo
CO
k---co +c~
CO
Z
+co
~3
S
p---co
p---co
+co I~(~ + 2pTr) [2 - 1 so (7.64) is equivalent to (7.62). We know that ~-~,p__co The space W0 is orthogonal to V0 if and only if {q~(t- n)}nEZ and {~(t-n)}nEZ are orthogonal families of vectors. This means that for any n E Z ( ~ ( t ) , +(t - ,,)) = * * ~(,,) - 0.
The Fourier transform of ~ , ~(t) is ~(~v)~* (~v). The sampled sequence ~ , (~(n) is zero if its Fourier series computed with (3.3) satisfies -q-co
Vw E R ,
~
~(a; + 2kTr) ~* (co + 2kTr) = O.
(7.65)
k---co
By inserting ~(~v) -- 2 -'/2 ~(~/2) ~(~v/2) and ~(~v) -- 2 -1/2 ~t(cv/2)~(~v/2) in this +co I~( ~ + 2kTr) 12 -- 1 we prove as before that (7.65)is equivalent equation, since ~-]k--co to (7.63). We must finally verify that V_I = V0 | W0. Knowing that { x/~4~(2t - n) }nEZ is an orthogonal basis of V_,, it is equivalent to show that for any a[n] E 12(Z) there exist bin] E 12(Z) and c[n] E 12(Z) such that +co
+co
a[n] x/2qS(2[t- 2-in]) = ~ tl~- --@0
n--
+co
b[n] (9(t- n) + ~ --CO
n--
c[n] ~ ( t - n).
(7.66)
--00
This is done by relating/~(~v) and b(~v) to ~(~v). The Fourier transform of (7.66) yields 1
v~
CO
238
CHAPTER VII
WAV E L E T
Inserting ~(co) = 2 - 1 / 2 ~(co/2) qS(co/2) and c~(co) = tion shows that it is necessarily satisfied if co
BASES
2 -1/2
co
~t(co/2) ~(co/2) in this equaco
a ( ~ - ) =/~(co)h (-~-)+b(co)~ ( ~ ) .
(7.67,
Let us define b(2co) = ~1 [a(co)h* (co) + a(co + rr) h* (co + rr)] and
1 ~, ~, b(2co) = ~ [a(co) (co)+ a(co + rr) (co + rr)].
When calculating the right-hand side of (7.67) we verify that it is equal to the left-hand side by inserting (7.62), (7.63) and using Ih(co) 12+ lit(co+ rr)l 2 = 2.
(7.68)
Since/~(co) and b(co) are 2rr periodic they are the Fourier series of two sequences and c[n] that satisfy (7.66). This finishes the proof of the lemma. The formula (7.58) ~(co) = e -i~' h* (co + rr)
b[n]
satisfies (7.62) and (7.63) because of (7.68). We thus derive from Lemma 7.1 that {~bj,n} (j,n)eZ2 is an orthogonal basis of Wj. We complete the proof of the theorem by verifying that {~bj,n}O,,,)ez2 is an orthogonal basis of L2(IR). Observe first that the detail spaces {Wj}jez are orthogonal. Indeed Wj is orthogonal to Vj and Wl C Vt-1 c Vj for j < l. Hence Wj and Wl are orthogonal. We can also decompose LZ(N) =
(7.69)
O+__~_~Wj.
Indeed V j_ 1 -- Wj | Vj and we verify by substitution that for any L > J VL -- |
| Vj.
(7.70)
Since {Vj}jez is a multiresolution approximation, VL and Vj tend respectively to L2(N) and {0} when L and J g o respectively to - o e and +ec, which implies (7.69). A union of orthonormal bases of all Wj is therefore an orthonormal basis of L2 (N). II The proof of the theorem shows that ~ is the Fourier series of
g[n] =
>
-~b
, ~(t - n) ,
(7.71)
g[n]go(t-n).
(7.72)
which are the decomposition coefficients of 1
t
+~
--~ ~ (-2) = Z
n=-oo
Calculating the inverse Fourier transform of (7.58) yields
gin] = ( - 1)1-n hi1 - n].
(7.73)
This mirror filter plays an important role in the fast wavelet transform algorithm.
7. I
ORTHOGONAL
239
WAVELET BASES
,
,
. . . .
,
1'
0.8 0.,t
0.6 0.4 0.2
-0.5 -1
-5
FIGURE 7.5 modulus.
o
0
5
-20
-10
()
10
20
Battle-Lemari6 cubic spline wavelet ~ and its Fourier transform
1
0.8 0.6 0.4 0.2 o
-2
o
2
FIGURE 7.6 Graphs of 1+(2J~)L2 for the cubic spline Battle-Lemari6 wavelet, with 1 _< j _< 5 and ~o C [-Tr, 7r].
Example 7.9 Figure 7.5 displays the cubic spline wavelet ~ and its Fourier transform ~ calculated by inserting in (7.57) the expressions (7.23) and (7.53) of ~b(~) and h(c~). The properties of this Battle-Lemari6 spline wavelet are further studied in Section 7.2.2. Like most orthogonal wavelets, the energy of ~ is essentially concentrated in [-27r,-Tr] U [Tr,27r]. For any ~ that generates an orthogonal basis of L 2(R), one can verify that ^
W~I~-{0} , ~
[+(2M)I2-1.
j ~ - - O ( 3
This is illustrated in Figure 7.6. The orthogonal projection of a signal f in a "detail" space Wj is obtained with a partial expansion in its wavelet basis --~00
P w j f -- E n - - --(20
(f ' ~bj,n) ~Pj,n.
240
CHAPTER Vll
WAVELET BASES
A signal expansion in a wavelet orthogonal basis can thus be viewed as an aggregation of details at all scales 2 j that go from 0 to +c~ +c~
+c~
+c~
f= Z Pwjf-- Z
Z (f,r162 j----c~n---cx~
j---c~
Figure 7.7 gives the coefficients of a signal decomposed in the cubic spline wavelet orthogonal basis. The calculations are performed with the fast wavelet transform algorithm of Section 7.3. Approximation
JJ 2-5
I
I
I
I
2-6
I ,
2-7
I
]
,
'Ill Jl"
'1. . . . i
2-8
2-9
JI
l '
.,I .[.
II,
J I
i
i
0
0.2
0.4
0.6
0.8
1
F I G U R E 7.7 Wavelet coefficients dj[n] - (f, Cj,n)calculated at scales 2 j with the cubic spline wavelet. At the top is the remaining coarse signal approximation aj[rt] -- (f,~J,n) for J - - 5 .
Wavelet Design Theorem 7.3 constructs a wavelet orthonormal basis from any conjugate mirror filter h(w). This gives a simple procedure for designing and building wavelet orthogonal bases. Conversely, we may wonder whether all wavelet orthonormal bases are associated to a multiresolution approximation and a conjugate mirror filter. If we impose that ~ has a compact support then Lemari6 [41] proved that r necessarily corresponds to a multiresolution approximation. It is however possible to construct pathological wavelets that decay like It1-1 at infinity, and which cannot be derived from any multiresolution approximation. Section
7.2 CLASSESOF WAVELET BASES
241
7.2 describes important classes of wavelet bases and explains how to design h to specify the support, the number of vanishing moments and the regularity of ~. 7.2
CLASSES OF W A V E L E T BASES 1
7.2. I
Choosing a Wavelet
Most applications of wavelet bases exploit their ability to efficiently approximate particular classes of functions with few non-zero wavelet coefficients. This is true not only for data compression but also for noise removal and fast calculations. The design of ~ must therefore be optimized to produce a maximum number of wavelet coefficients (f, ~;j,n) that are close to zero. A function f has few non-negligible wavelet coefficients if most of the fine-scale (high-resolution) wavelet coefficients are small. This depends mostly on the regularity of f , the number of vanishing moments of ~ and the size of its support. To construct an appropriate wavelet from a conjugate mirror filter h[n], we relate these properties to conditions on ~t(co). Vanishing Moments
Let us recall that ~ has p vanishing moments if +_~t k r
--= 0 for 0 < k < p.
(7.74)
This means that ~ is orthogonal to any polynomial of degree p - 1. Section 6.1.3 proves that if f is regular and ~ has enough vanishing moments then the wavelet coefficients I(f, ~j,~)[ are small at fine scales 2J. Indeed, if f is locally C k, then over a small interval it is well approximated by a Taylor polynomial of degree k. If k < p, then wavelets are orthogonal to this Taylor polynomial and thus produce small amplitude coefficients at fine scales. The following theorem relates the number of vanishing moments of ~ to the vanishing derivatives of ~(co) at co - 0 and to the number of zeros of ~t(co) at co - 7r. It also proves that polynomials of degree p - 1 are then reproduced by the scaling functions. Theorem 7.4 (VANISHINGMOMENTS) Let ~ and 0 be a wavelet and a scaling function that generate an orthogonal basis. Suppose that Ir o((1 + t2) -p/2-a) and Iq$(t) I - O((1 + t2) -p/2-1). The four following statements are equivalent: (i) (ii) (iii) (iv)
The wavelet ~9 has p vanishing moments. +(co) and its first p - 1 derivatives are zero at co - O. h(co) and its first p - 1 derivatives are zero at co - 7r. For any 0 <_ k < p, ^
-~-oo
qk(t) -- Z
n~ ~ ( t - n) is a polynomial of degree k.
(7.75)
n----oc
Proof 2. The decay of Iq$(t)l and I~b(t)l implies that ~(co) and ~(aJ) are p times continuously differentiable. The k th order derivative ~(k)(~) is the Fourier transform of
CHAPTER VII
242
(--it)kr
WAVELET BASES
Hence
&~k)(o)-- f ~~(-it)k~(t)dt. We derive that (i) is equivalent to (ii). Theorem 7.3 proves that x/2 ~(2co) - e -i~~h* (co -+-rr) ~(co). Since ~(0) r 0, by differentiating this expression we prove that (ii) is equivalent to (iii). Let us now prove that (iv)implies (i). Since ~b is orthogonal to {qS(t-n)}neZ, it is thus also orthogonal to the polynomials qk for 0 < k < p. This family of polynomials is a basis of the space of polynomials of degree at most p - 1. Hence ~b is orthogonal to any polynomial of degree p - 1 and in particular to t k for 0 _< k < p. This means that ~b has p vanishing moments. To verify that (i) implies (iv) we suppose that ~b has p vanishing moments, and for k < p we evaluate qk(t) defined in (7.75). This is done by computing its Fourier transform:
+~ dk 0k(co) -- qS(co) Z nk exp(-inco) = (i) k ~(co) ~ n=--cx~
+cr Z exp(-inco) . n----oo
Let ~(k) be the distribution that is the k th order derivative of a Dirac, defined in Appendix A.7. The Poisson formula (2.4) proves that 1
+~
Ok(co) = (i) k ~ qS(co) ~
d;(k) (co - 21rr).
(7.76)
1=-oo
With several integrations by parts, we verify the distribution equality k-1
~(co) 6 (k) (co - 21rr) -- qS(21rr)6(k)(co _ 21rr) + ~
ak,l (~(m)(CO_ 2lrr),
(7.77)
m---0
where am, lk is a linear combination of the
derivatives
{~(m)(217r)}O<m
For I ~ 0, let us prove that am, lk __ 0 by showing that ~(m) (217r) -- 0 if 0 _< m < p. For any P > 0, (7.32) implies
P ~(2-pco)
~ ( c o ) - qS(2-Pco) I-I
(7.78)
p=l
Since ~ has p vanishing moments, we showed in (iii) that/'t(co)^ has a zero of order p at co = +Tr. But ~t(co) is also 27r periodic, so (7.78) implies that 4~(co) = O([co - 2hr e) in the neighborhood of co = 217r, for any l ~ 0. H e n c e ~(m) (217r) -- 0 if m < p. Since a mk,l --- 0 and qS(21Tr) = 0 when l ~ 0, it follows from (7.77) that ~(co) ~(k)(co _ 2/7r) = 0 for I -~ 0.
243
CLASSESOF WAVELETBASES
7.2
The only term that remains in the summation (7.76) is 1 -- 0 and inserting (7.77) yields
1(
)
~tk(c~)-- (i)k~-~ ~(0)6 (k)(c~)+ ~ am, k 0 (~(m)(~a3) m--O
The inverse Fourier transform of (~(m)(~U) is (27r) -1 (-it) m and Theorem 7.2 proves that ~(0) r 0. Hence the inverse Fourier transform qk of qk is a polynomial of degree k. II The hypothesis (iv) is called the Fix-Strang condition [320]. The polynomials {qk }0___k
Size of Support
If f has an isolated singularity at to and if to is inside the support rt), then (f,~j,n) may have a large amplitude. If has a compact support of size K, at each scale 2 j there are K wavelets Cj,n whose support includes to. To minimize the number of high amplitude coefficients we must reduce the support size of ~. The following proposition relates the support size of h to the support of ~b and ~. of
~j,n(t) = 2 -j/2 ~ ( 2 - J t -
Proposition 7.2 (COMPACT SUPPORT) The scaling function r has a compact support if and only if h has a compact support and their support are equal. If the support of h and ~ is [N1,N2] then the support of ~ is [ ( N 1 - N2 + 1)/2, ( N 2 -
N1 + 1)/2].
Proof 1. If ~bhas a compact support, since
we derive that h also has a compact support. Conversely, the scaling function satisfies 1
t
+o~ n------ oo
If h has a compact support then one can prove [ 144] that ~bhas a compact support. The proof is not reproduced here. To relate the support of q5and h, we suppose that h[n] is non-zero for N1 < n < N2 and that 05has a compact support [K1,K2]. The support of q~(t/2) is [2K1,2K2]. The sum at the fight of (7.79) is a function whose support is [N1 + K1,N2 + K2]. The equality proves that the support of ~bis [K1,K2] = IN, ,N z]. Let us recall from (7.73) and (7.72) that 1
t
--~(-2)-
+o~
Z n-- --oo
+o~
g[n](9(t-n)= Z 17=--(x3
(-1)l-nh[1-n]~(t-n)"
244
CHAPTER Vll
WAVELET BASES
If the supports of q5 and h are equal to [N1,N2], the sum in the right-hand side has a support equal to [NI- N2 -4-1,N2- N1 -k- 1]. Hence ~ has a support equal to [(N~N 2 + 1)/2,(Nz-N1 + 1)/2]. II If h has a finite impulse response in [N1,N2], Proposition 7.2 proves that ~ has a support of size N 2 - N1 centered at 1/2. To minimize the size of the support, we must synthesize conjugate mirror filters with as few non-zero coefficients as possible.
Support Versus Moments The support size of a function and the number of vanishing moments are a priori independent. However, we shall see in Theorem 7.5 that the constraints imposed on orthogonal wavelets imply that if ~ has p vanishing moments then its support is at least of size 2p - 1. Daubechies wavelets are optimal in the sense that they have a minimum size support for a given number of vanishing moments. When choosing a particular wavelet, we thus face a tradeoff between the number of vanishing moments and the support size. If f has few isolated singularities and is very regular between singularities, we must choose a wavelet with many vanishing moments to produce a large number of small wavelet coefficients (f, ~j,n). If the density of singularities increases, it might be better to decrease the size of its support at the cost of reducing the number of vanishing moments. Indeed, wavelets that overlap the singularities create high amplitude coefficients. The multiwavelet construction of Geronimo, Hardin and Massupust [ 190] offers more design flexibility by introducing several scaling functions and wavelets. Problem 7.16 gives an example. Better trade-off can be obtained between the multiwavelets supports and their vanishing moments [321 ]. However, multiwavelet decompositions are implemented with a slightly more complicated filter bank algorithm than a standard orthogonal wavelet transform. Regularity The regularity of ~ has mostly a cosmetic influence on the error introduced by thresholding or quantizing the wavelet coefficients. When reconstructing a signal from its wavelet coefficients -4-cr
+c~
f -- Z Z (f' ~)j,n)2/)j,n, j=-cc n=-cr an error e added to a coefficient (f,@j,n) will add the wavelet component f. 2/)j,n to the reconstructed signal. If ~ is smooth, then e~j,n is a smooth error. For image coding applications, a smooth error is often less visible than an irregular error, even though they have the same energy. Better quality images are obtained with wavelets that are continuously differentiable than with the discontinuous Haar wavelet. The following proposition due to Tchamitchian [327] relates the uniform Lipschitz regularity of ~b and ~ to the number of zeros of h(~) at c~ - 7r.
7.2 CLASSESOF WAVELETBASES
245
Proposition 7.3 (TCHAMITCHIAN) Let h(w) be a conjugate mirror filter with p zeros at rc and which satisfies the sufficient conditions of Theorem 7.2. Let us perform the factorization h(w) -- v/2 ( 1 + e i W ) p 2 l(w). / f s u p ~ e ~ I~l(w)l - B then ~ and 0 are uniformly Lipschitz a for (7.80)
a < a0 -- p - log2 B - 1.
Proof3. This result is proved by showing that there exist C1
> 0 and C2 > 0 such that
for all co E IR
I~(~)1
~
C1 (1 + Icol)-p+l~
(7.81)
I~(~)1
~
C2 (1 + Icol)-p+l~
(7.82)
The Lipschitz regularity of q5 and ~b is then derived from Theorem 6.1, which shows that if f + ~ ( 1 + Icol~) If(co)l dco < +oo, then f is uniformly Lipschitz a. We proved in (7.37) that ~(co) -- lrlf~ 2 -1/2 it(Z-Jco). One can verify that -31-OO
H 1 + exp(i2-Jco) _ 1 - exp(ico) j=l
2
ico
hence l~5(co)l = l1-exp(ico) P +o~ ~i7 I I ]l(2-Jco) l"
(7.83)
j=l
Let us now compute an upper bound for Ylf112(2%o)1. At co - - 0 we have ft(0) -- x/~ so l(0) - 1. Since ~t(co) is continuously differentiable at co = 0, l(co) is also continuously differentiable at co -- 0. We thus derive that there exists e > 0 such that if I~oI < e then II(~o)l <_ 1 + g col. Consequently +oo
q--c<)
supl~l<~~.= 12(2-Jc~ I ~ suPi~ot_<~ j=IH (1 + K
2%ol) < eK~.
(7.84)
If I~l > ~, there exists J _> 1 such that 2J-l~ < I~1 ~ 2Je and we decompose +ec
J
+co
H l(2-'co) -- H 11(2-'co)l H ll(2-J-Jco) I" j=l
j=l
(7.85)
j--1
Since sup~o~ II(~)l - B, inserting (7.84) yields for I~1 > -qt-cx3
H l(2-Jco) -< BJ eK' -- eK' 2Jl~ j=l
(7.86)
246
CHAPTER Vll
WAVELET BASES
Since 2J < e-12[co[, this proves that Va~ E R
1-[l(2-Jc~ < er' --
1 + 12c~176 ~log 2 B
"
j=l
Equation (7.81)is derived from (7.83) and this last inequality. Since 2-1/2 i~t(co+ ~)1 I~(~)I, (7.82) is obtained from (7.81).
l&(2~o)lII
This proposition proves that if B < 2 p-1 then a0 > 0. It means that ~b and ~ are uniformly continuous. For any m > 0, if B < 2 p - l - m then a0 > m so ~b and q$ are m times continuously differentiable. Theorem 7.4 shows that the number p of zeros of h(a;) at 7r is equal to the number of vanishing moments of ~b. A priori, we are not guaranteed that increasing p will improve the wavelet regularity, since B might increase as well. However, for important families of conjugate mirror filters such as splines or Daubechies filters, B increases more slowly than p, which implies that wavelet regularity increases with the number of vanishing moments. Let us emphasize that the number of vanishing moments and the regularity of orthogonal wavelets are related but it is the number of vanishing moments and not the regularity that affects the amplitude of the wavelet coefficients at fine scales.
7.2.2
Shannon, Meyer and Battle-Lemari6 Wavelets
We study important classes of wavelets whose Fourier transforms are derived from the general formula proved in Theorem 7.3, 1
a;
w-
1
(-ia~)~t,
aJ
7r)~(-~)
(7.87)
Shannon Wavelet The Shannon wavelet is constructed from the Shannon multiresolution approximation, which approximates functions by their restriction to low frequency intervals. It corresponds to q $ - 1[_~,~] and ~t(co) - ~ 1[-~/2,~/2] (co) for a~ E [-7r, 7r]. We derive from (7.87) that
+(aJ) -
exp(-ia;/2) 0
ifa; C [-27r,-Tr]U[Tr,27r] otherwise
(7.88)
and hence r
=
sin 27r(t - 1/2) 27r(t - 1/2)
sin 7r(t - 1/2) 7r(t - 1/2) "
This wavelet is C ~ but has a slow asymptotic time decay. Since ~(co) is zero in the neighborhood of aJ = 0, all its derivatives are zero at co - 0. Theorem 7.4 thus implies that ~ has an infinite number of vanishing moments. Since + ( ~ ) has a compact support we know that ~(t) is Coo. However [~(t)[ decays only like ]t1-1 at infinity because ~(a;)is discontinuous at • and -+-27r.
7.2 CLASSESOF WAVELETBASES
247
l*leyer Wavelets A Meyer wavelet [270] is a frequency band-limited function whose Fourier transform is smooth, unlike the Fourier transform of the Shannon wavelet. This smoothness provides a much faster asymptotic decay in time. These wavelets are constructed with conjugate mirror filters h(co) that are C n and satisfy
h(co) -
(v/2 0
if co c [-Tr/3,Tr/3] if co E [-Tr,-27r/3] U [27r/3,7r] "
(7.89)
The only degree of freedom is the behavior of ~t(co) in the transition bands [-27r/3,-7r/3] U [7r/3,27r/3]. It must satisfy the quadrature condition Ih(co) 12+ Ih(co -+-7r)12 - 2,
(7.90)
and to obtain C n junctions at Icol - 7r/3 and - 27r/3, the n first derivatives must vanish at these abscissa. One can construct such functions that are C ~. The scaling function ~(co) - I-I p---1 +~ 2 -1/2 kt(2-pco) has a compact support and one can verify that
~(co)-
2 -1/2/~t(co/2)
if I~1
47r/3
0
if col > 47r/3
(7.91)
The resulting wavelet (7.87) is
~(co)--
0
if [co[ <_ 2rr/3
2 -1/2 ~(co/2)
if 2rr/3 _< Icol-< 4rr/3
2 -1/2 exp(-ico/2)h(co/4)
if 4rr/3 _< I~1 ~ 8~/3
0
if Icol > 87r/3
(7.92)
The functions ~ and ~ are C ~ because their Fourier transforms have a compact support. Since ~(co) - 0 in the neighborhood of co - 0, all its derivatives are zero at co - 0, which proves that ~ has an infinite number of vanishing moments. If h is C" then ~ and ~ are also C n. The discontinuities of the (n + 1 )th derivative of/~ are generally at the junction of the transition band /3,27r/3, in which case one can show that there exists A such that I~b(t)l ~ A (1 + Itl) -n-1 and I~(t)l
~
A (1 -+-Itl)- n - ~
.
Although the asymptotic decay of ~ is fast when n is large, its effective numerical decay may be relatively slow, which is reflected by the fact that A is quite large. As a consequence, a Meyer wavelet transform is generally implemented in the Fourier domain. Section 8.4.2 relates these wavelet bases to lapped orthogonal transforms applied in the Fourier domain. One can prove [21] that there exists no orthogonal wavelet that is C ~ and has an exponential decay.
248
CHAPTER VII
WAVELET BASES
r 1
(---
0.8
0.5
0.6 0.4
-0.5
-~
0.2
o
-5
FIGURE 7.8
/
o_i,o
,~
-s
6
5
10
Meyer wavelet ~ and its Fourier transform modulus computed with
(7.94).
Example 7.10 To satisfy the quadrature condition (7.90), one can verify that kt in (7.89) may be defined on the transition bands by -
-~ fl
e2
71"
- 1
for
I~1 ~
[Tr/3,27r/3],
where fl(x) is a function that goes from 0 to 1 on the interval [0,1] and satisfies Vx C [0,1] , / 3 ( x ) + f l ( 1 - x ) -
1.
(7.93)
An example due to Daubechies [21 ] is /~(X) --- X 4 ( 3 5 -- 8 4 X +
70x 2 - 20x3).
The resulting ~t(~) has n - 3 vanishing derivatives at displays the corresponding wavelet ~.
I 1- ~/3,27r/3.
(7.94) Figure 7.8
Haar Wavelet The Haar basis is obtained with a multiresolution of piecewise constant functions. The scaling function is q 5 - 1[0,1]. The filter h[n] given in (7.51) has two non-zero coefficients equal to 2 -1/2 at n - 0 and n - 1. Hence 1
~b
t
+~
( ~ ) -- Z
(-1)l-nh[1-n]~(t-n)
= ~
1
( ~ b ( t - 1 ) - ~b(t)),
n=--(x)
SO
~(t)-
-1 1 0
if0_t
(7.95)
The Haar wavelet has the shortest support among all orthogonal wavelets. It is not well adapted to approximating smooth functions because it has only one vanishing moment.
7.2 CLASSESOFWAVELETBASES
249
1.5 1 0.5 0
-1 -2
FIGURE 7.9
0
2
4
-~
-2
6
2
4
Linear spline Battle-Lemari6 scaling function ~b and wavelet ~.
Battle-Lemari6 Wavelets Polynomial spline wavelets introduced by Battle [89] and Lemari6 [249] are comfluted from spline multiresolution approximations. The expressions of ~(~) and h(~c) are given respectively by (7.23) and (7.53). For splines of degree m, h(~c) and its first m derivatives are zero at co - 7r. Theorem 7.4 derives that ~ has m + 1 vanishing moments. It follows from (7.87) that exp(-ico/2)
com+l
/
$2m+2(co/2 q- 7r) VS2m_k_----7(co---)-S2m------+2(co----/2 )"
This wavelet ~b has an exponential decay. Since it is a polynomial spline of degree m, it is m - 1 times continuously differentiable. Polynomial spline wavelets are less regular than Meyer wavelets but have faster time asymptotic decay. For m odd, ~b is symmetric about 1/2. For m even it is antisymmetric about 1/2. Figure 7.5 gives the graph of the cubic spline wavelet ~b corresponding to m -- 3. For m = 1, Figure 7.9 displays linear splines q5and ~b. The properties of these wavelets are further studied in [93, 15, 125].
7.2.3
Daubechies Compactly Supported Wavelets
Daubechies wavelets have a support of minimum size for any given number p of vanishing moments. Proposition 7.2 proves that wavelets of compact support are computed with finite impulse responseconjugate mirror filters h. We consider real causal filters h[n], which implies that h is a trigonometric polynomial:
N-1 h(~) -- Z h[n] e -in~.
n=0 To ensure that ~ has p vanishing moments, Theorem 7.4 shows that ft must have a zero of order p at co - 7r. To construct a trigonometric polynomial of minimal size, we factor (1 + e-iW) p, which is a minimum size polynomial having p zeros at~o rr" -
~t(cO) -- V/2 (1 + e - / ~ ) p R (e -i~ ). 2
(7.96)
250
CHAPTER VII
WAVELET BASES
The difficulty is to design a p o l y n o m i a l R(e -i~) of m i n i m u m degree m such that satisfies
i~/(~) ]2 § 1i1(~0§ 7i")12 -- 2.
(7.97)
As a result, h has N = m + p § 1 non-zero coefficients. The following t h e o r e m by D a u b e c h i e s [ 144] proves that the m i n i m u m degree of R is m = p - 1. T h e o r e m 7.5 (DAUBECHIES) A real conjugate mirror filter h, such that [~(~) has
p zeros at w = 7r, has at least 2p non-zero coefficients. Daubechies filters have 2p non-zero coefficients. Proof 2. The proof is constructive and computes the Daubechies filters. Since h[n] is real, I/,(~)12 is an even function and can thus be written as a polynomial in cosco. Hence ]e(e-i~)[ 2 defined in (7.96) is a polynomial in cosco that we can also write as a polynomial P(sin 2 e) 2 =
co
P
co)
(7.98)
The quadrature condition (7.97) is equivalent to (1 -
y)P P(y) + yPP ( 1
- y ) - - 1,
(7.99)
for any y -- sin 2(60/2) E [0, 1]. To minimize the number of non-zero terms of the finite Fourier series h(co), we must find the solution P(y) > 0 of minimum degree, which is obtained with the Bezout theorem on polynomials. Theorem 7.6 (BEZOUT) Let Q1 (y) and Q2(y) be two polynomials of degrees nl and n2 with no common zeros. There exist two unique polynomials P1 (Y) and P2(y) of
degrees n2 - 1 and nl - 1 such that P1 (Y) Q1 (y) + P2(y) Q2(y) -- 1.
(7.100)
The proof of this classical result is in [21 ]. Since Q1 (y) -- (1 - y)p and Qz (y) -- yP are two polynomials of degree p with no common zeros, the Bezout theorem proves that there exist two unique polynomials P1 (Y) and P2 (Y) such that (1 - y)P P1 (Y) + YP P2(Y) = 1. The reader can verify that P2 (Y) -- P1 ( 1 - y) -- P(1 - y) with p(y) _ ~-~
k--0
p-l+k k
yk.
(7.101)
Clearly P(y) >__0 for y C [0,1]. Hence P(y) is the polynomial of minimum degree satisfying (7.99) with P(y) > O.
7.2 CLASSESOF WAVELET BASES
Minimum Phase Factorization nomial
25 I
Now we need to construct a minimum degree poly-
m
m
k--0
k=0
R(e -i~) = Zrke-ik~ -- ro 1-[(1--ake -i~)
such that IR(e -i~ )12 = P(sin 2(co/ 2) ). Since its coefficients are real, R* (e -i~~) -- R ( e i~ ) and hence
[R(e-i~),2 _ R(e-i~')R(ei~) = e ( 2-ei~ 4-e-i~ )
-- a ( e - i ~ ) .
(7.102)
This factorization is solved by extending it to the whole complex plane with the variable Z -- e-iw:
m ( ) R(z)R(z-1)=rg I - I ( 1 - - a k z ) ( 1 - - a k z - I ) - - Q ( z ) - - P 2--Z--Z 4 -1 . k=0
(7.103)
Let us compute the roots of Q(z). Since Q(z) has real coefficients if ck is a root, then c~ is also a root and since it is a function of z + z -1 if ck is a root then 1/ck and hence 1/c~ are also roots. To design R(z) that satisfies (7.103), we choose each root ak of R(z) among a pair (ck, 1/Ck) and include a~ as a root to obtain real coefficients. This procedure yields a polynomial of minimum degree m = p - 1, with r~ - Q(0) - P(1/2) = 2 p-1 . The resulting filter h of minimum size has N -- p + m + 1 = 2p non-zero coefficients. Among all possible factorizations, the minimum phase solution R(e ~) is obtained by choosing ak among (ct, 1/ck) to be inside the unit circle lakl < 1 [551. The resulting causal filter h has an energy maximally concentrated at small abscissa n _> 0. It is a Daubechies filter of order p. II The constructive proof of this theorem synthesizes causal conjugate mirror filters of size 2p. Table 7.2 gives the coefficients of these Daubechies filters for 2 < p _< 10. The following proposition derives that Daubechies wavelets calculated with these conjugate mirror filters have a support of m i n i m u m size.
Proposition 7.4 (DAUBECHIES) I f ~ is a wavelet with p vanishing moments that generates an orthonormal basis of L2 (IR), then it has a support of size larger than or equal to 2 p - 1. A Daubechies wavelet has a minimum size support equal to [ - p + 1, p]. The support of the corresponding scaling function 0 is [ 0 , 2 p - 1]. This proposition is a direct consequence of Theorem 7.5. The support of the wavelet, and that of the scaling function, are calculated with Proposition 7.2. When p - 1 we get the Haar wavelet. Figure 7.10 displays the graphs of ~b and ~ for p - 2,3,4. The regularity of ~b and ~ is the same since ~ ( t ) is a finite linear combination of the 4~(2t- n). This regularity is however difficult to estimate precisely. Let B = sup~c~ IR(e-/~)l where R(e -i~) is the trigonometric polynomial defined in (7.96). Proposition 7.3 proves that ~h is at least uniformly Lipschitz c~ for c~ < p - log e B - 1. For Daubechies wavelets, B increases more slowly than p and Figure 7.10 shows indeed that the regularity of these wavelets increases with p.
252
CHAPTER VII
WAVELET BASES
h,,[.] D-"
p=
.332670552950 .806891509311 .459877502118 -.135011020010 -.085441273882 .035226291882
p=
.230377813309 .714846570553 .630880767930 -.027983769417 -.187034811719 .030841381836 .032883011667 -.010597401785
p=
.160102397974 .603829269797 .724308528438 .138428145901 -.242294887066 -.032244869585 .077571493840 -.006241490213 -.012580751999 .003335725285
1~=
.111540743350 .494623890398 .751133908021 .315250351709 -.226264693965 -.129766867567 .097501605587 .027522865530 -.031582039317 .000553842201 .004777257511 -.001077301085
p=
Table 7.2
.482962913145 .836516303738 .224143868042 -.129409522551
.077852054085 .396539319482 .729132090846 .469782287405 -.143906003929 -.224036184994 .071309219267 .080612609151 -.038029936935 -.016574541631 .012550998556 .000429577973 -.001801640704 .000353713800
hp[n] .054415842243 .312871590914 .675630736297 .585354683654 -.015829105256 -.284015542962 .000472484574 .128747426620 -.017369301002 -.04408825393 .013981027917 .008746094047 -.004870352993 -.000391740373 .000675449406 -.000117476784 .038077947364 .243834674613 .604823123690 .657288078051 .133197385825 -.293273783279 -.096840783223 .148540749338 .030725681479 -.067632829061 .000250947115 .022361662124 -.004723204758 -.004281503682 .001847646883 .000230385764 -.000251963189 .000039347320 .026670057901 .188176800078 .527201188932 .688459039454 .281172343661 -.249846424327 -.195946274377 .127369340336 .093057364604 -.071394147166 -.029457536822 .033212674059 .003606553567 -.010733175483 .001395351747 .001992405295 -.000685856695 -.000116466855 .000093588670 -.000013264203
Daubechies filters for wavelets with p vanishing moments.
7.2
253
CLASSESOF WAVELET BASES
r 1.5
1.5
1.5
1
1
1
0.5
0.5
0.5
0
0
o
-0.5
-0.
0
1
2
3
4
-o.
r i
'
1.5~
.
,
.
!
0.5
0
_i
_ _
-2
p=2
FIGURE 7. I 0 moments.
0
-1
0
1
p=3
2
p=4
Daubechies scaling function ~b and wavelet ~ with p vanishing
Daubechies and Lagarias [147] have established a more precise technique that computes the exact Lipschitz regularity of ~. For p = 2 the wavelet ~ is only Lipschitz 0.55 but for p = 3 it is Lipschitz 1.08 which means that it is already continuously differentiable. For p large, ~ and ~ are uniformly Lipschitz c~ for c~ of the order of 0.2 p [ 129].
Symmlets Daubechies wavelets are very asymmetric because they are constructed by selecting the minimum phase square root of Q(e-i~) in (7.102). One can show [55] that filters corresponding to a minimum phase square root have their energy optimally concentrated near the starting point of their support. They are thus highly non-symmetric, which yields very asymmetric wavelets. To obtain a symmetric or antisymmetric wavelet, the filter h must be symmetric or antisymmetric with respect to the center of its support, which means that it(~) has a linear complex phase. Daubechies proved [ 144] that the Haar filter is the only real compactly supported conjugate mirror filter that has a linear phase. The Symmlet filters of Daubechies are obtained by optimizing the choice of the square root R(e -i~) of O(e-iW) to obtain an almost linear phase. The resulting wavelets still have a minimum support [ - p + 1, p] with p vanishing moments but they are more symmetric, as illustrated by Figure 7.11 for p = 8. The coefficients of the Symmlet filters are in WAVELAB.Complex conjugate mirror filters with a compact support and a linear phase can be constructed [251], but they produce complex wavelet coefficients whose real and imaginary parts are redundant when the signal is real.
254
CHAPTER Vll
r
WAVELET BASES
r
1
r
r
1 0.
0.5
-0.5 0
5
1'0
15
-5
~
-0.
0
o -0.5
5
10
15
-1
-5
0
5
FIGURE 7. I I Daubechies (first two) and Symmlets (last two) scaling functions and wavelets with p - 8 vanishing moments. Coiflets
For an application in numerical analysis, Coifman asked Daubechies [ 144] to construct a family of wavelets ~b that have p vanishing moments and a minimum size support, but whose scaling functions also satisfy
L7
f b ( t ) d t - 1 and
t k f S ( t ) d t - 0 for 1 _< k < p.
(7.104)
O0
Such scaling functions are useful in establishing precise quadrature formulas. If f is C k in the neighborhood of 2Jn with k < p, then a Taylor expansion of f up to order k shows that
2 -J/2 (f, ~J,n) "~ f ( 2 Jn) + O(2(k+l)a) 9
(7.105)
At a fine scale 2J, the scaling coefficients are thus closely approximated by the signal samples. The order of approximation increases with p. The supplementary condition (7.104) requires increasing the support of ~b; the resulting Coiflet has a support of size 3 p - 1 instead of 2 p - 1 for a Daubechies wavelet. The corresponding conjugate mirror filters are tabulated in WAVELAB. Audio Filters
The first conjugate mirror filters with finite impulse response were constructed in 1986 by Smith and Barnwell [317] in the context of perfect filter bank reconstruction, explained in Section 7.3.2. These filters satisfy the quadrature condition Ih(~o)12+ ]]/(~O --~-71")12-- 2, which is necessary and sufficient for filter bank reconstruction. However, h(0) ~ ~ so the infinite product of such filters does not yield a wavelet basis ofL z (IR). Instead of imposing any vanishing moments, Smith and Barnwell [317], and later Vaidyanathan and Hoang [337], designed their filters to reduce the size of the transition band, where Ih(~o)l decays from nearly v/2 to nearly 0 in the neighborhood of +7r/2. This constraint is important in optimizing the transform code of audio signals, explained in Section 11.3.3. However, many cascades of these filters exhibit wild behavior. The Vaidyanathan-Hoang filters are tabulated in WAVELAB. Many other classes of conjugate mirror filters with finite impulse response have been constructed [74, 73]. Recursive conjugate mirror filters may also be designed [209] to minimize the size of the transition band for a given number of zeros at ~o = 7r. These filters have a fast but non-causal recursive implementation for signals of finite size.
7.3 WAVELETSAND FILTERBANKS'
7.3
255
WAVELETS A N D FILTER BANKS 1
Decomposition coefficients in a wavelet orthogonal basis are computed with a fast algorithm that cascades discrete convolutions with h and g, and subsamples the output. Section 7.3.1 derives this result from the embedded structure of multiresolution approximations. A direct filter bank analysis is performed in Section 7.3.2, which gives more general perfect reconstruction conditions on the filters. Section 7.3.3 shows that perfect reconstruction filter banks decompose signals in a basis of 12(Z). This basis is orthogonal for conjugate mirror filters. 7.3. I
Fast Orthogonal Wavelet Transform
We describe a fast filter bank algorithm that computes the orthogonal wavelet coefficients of a signal measured at a finite resolution. A fast wavelet transform decomposes successively each approximation Pvj f into a coarser approximation PVj+lf plus the wavelet coefficients carried by Pwj+lf. In the other direction, the reconstruction from wavelet coefficients recovers each P v j f from PVj+l f and
Pwj+lf . are orthonormal bases of Vj and Wj the projection in these spaces is characterized by Since
{r
{r
and
aj[n] -- ( f , Cj,n)
and
dj[n] - ( f , Cj,n> .
The following theorem [253,255] shows that these coefficients are calculated with a cascade of discrete convolutions and subsamplings. We denote 2In] - x[-n] and 2[n] _ ~ x[p] L 0
if n - 2p ifn-- 2p+ 1 "
(7.106)
Theorem 7.7 (MALLAT) At the decomposition -~-(Yd
aj+l[p]
-
Z
h[n-2p]aj[n] - aj,h[2pl,
(7.107)
g[n-2p]aj[n]-aj.~[2p].
(7.108)
gl~---OC +ec
dj+~[p]
-
~ n----(N3
At the reconstruction, -k-oc
aj[p]
--
Z
+oo
h[p-2n]aj+l[n]+
n=--Oo
=
Z
g[p-2n]dj+l[n]
n-----(x3
it j+l * h[p] + dj+l * g[p].
Proof 1. Proof of (7.107) Any ~j+l,p E
(7.109)
Wj+ 1 C Wj can be decomposed in the ortho-
normal basis {Cj,, }ncZ of V j: +ec Cj+l,p -- ~ (r n--- -oc
Cj,n) Cj,n.
(7.110)
CHAPTER VII
2~6
WAVELET BASES
With the change of variable t' -- 2-Jt - 2p we obtain (r
~)j,n)
/]' f]' ((')
~c~(t-2J+IP) -2-7-+i
--
--~ dp
1 (9,(t-2jn) --~ 2J
dt
( t - n + 2p)dt
--~2d? ~ , ( 9 ( t - n + 2p)
/
= h[n-2p].
(7.111)
Hence (7.110) implies that -q-oo
h[n - 2p] Oj,n.
(gj+,,p = Z
(7.112)
n=-~
Computing the inner product of f with the vectors on each side of this equality yields (7.107).
Proof of (7.108) Since ~j+l,p E Wj+I C Vj, it can be decomposed as --Jr-oo
CJ+I'P= Z
n=-c~
As in (7.111), the change of variable t' = 2 -jr - 2p proves that (~j+l,p, qSj,n) ---
, d?(t -- n -I- 2p)
--~b
and hence
= g[n -- 2p]
(7.113)
+~
~j+l,p = ~
g[n - 2p] q~j,,,.
(7.114)
n ~ --(x3
Taking the inner product with f on each side gives (7.108).
Proof of (7.109) Since Wj+I is the orthogonal complement of Vj+I in Vj the union of the two bases {~bj+l,n}n~z and {q~j+1,n},~z is an orthonormal basis of Vj. Hence any ~bj,p can be decomposed in this basis: -q-oo
~)j ,p
-~
Z (r162 n-- --oo
+~
+ ~
<~j,~,~:+l,.> ~j+,,.
n=-c~
Inserting (7.111) and (7.113) yields +cx~
dpj,p = Z n=-c~
-k-oo
h[p - 2n] ~)j+l,n + ~
g[P - 2n] 2/)j+l, n.
n=-cx~
Taking the inner product with f on both sides of this equality gives (7.109).
II
WAVELETSAND
7.3
aj
~
a
j
+
257
FILTER BANKS
1-
~
~
aj+2
dj+2 (a) aj+2
~
[~.
~
~
aj+ 1
~
~
aj
(b) FIGURE 7.12 (a): A fast wavelet transform is computed with a cascade of filterings with h and ~ followed by a factor 2 subsampling. (b): A fast inverse wavelet transform reconstructs progressively each aj by inserting zeros between samples of aj+l and dj+l, filtering and adding the output.
Theorem 7.7 proves that aj+l and dj+l are computed by taking every other sampie of the convolution of aj with h and ~ respectively, as illustrated by Figure 7.12. The filter h removes the higher frequencies of the inner product sequence aj whereas ~ is a high-pass filter which collects the remaining highest frequencies. The reconstruction (7.109) is an interpolation that inserts zeros to expand aj+l and dj+l and filters these signals, as shown in Figure 7.12. An orthogonal wavelet representation of aL - (f, ~bL,n} is composed of wavelet coefficients of f at scales 2L < 2 j < 2J plus the remaining approximation at the largest scale 2J"
[{dj}L < j<j , aj].
(7.115)
It is computed from aL by iterating (7.107) and (7.108) for L < j < J. Figure 7.7 gives a numerical example computed with the cubic spline filter of Table 7.1. The original signal aL is recovered from this wavelet representation by iterating the reconstruction (7.109) for J > j >__L. Initialization Most often the discrete input signal b[n] is obtained by a finite resolution device that averages and samples an analog input signal. For example, a CCD camera filters the light intensity by the optics and each photo-receptor averages the input light over its support. A pixel value thus measures average light intensity. If the sampling distance is N -1, to define and compute the wavelet coefficients, we need to associate to b[n] a function f ( t ) c VL approximated at the scale 2L = N -1, and compute aL[n] -- (f, r Problem 7.6 explains how to compute aL[n] -- ( f , OL,n) SO that b[n] = f ( N - l n ) .
258
CHAPTER VII
WAVELET BASES
A simpler and faster approach considers
f (t) -
Since
{~L,n(t)
--
Z
n=-~
b[n] (9 t - 2Ln 2L
E
VL.
2 -L/2 q~(2-Lt- n))n6Z is orthonormal and 2 L -- N -1,
b[n] - N 1/2 (f, (ilL,n) -- N 1/2 aL[n] . But ~(0) - f _ ~ q~(t)dt- 1, so
N1/2aL[n] --
f(t)
~
N_ 1
dt
0(3
is a weighted average of f in the neighborhood of N - i n over a domain proportional to N -1. Hence if f is regular, b[rt]
-
N 1/2 aL[n] ~ f ( N - l n )
.
(7.116)
If ~ is a Coiflet and f ( t ) is regular in the neighborhood of N - i n , then (7.105) shows that N -1/2 aL[n] is a high order approximation of f ( N - l n ) .
Finite Signals Let us consider a signal f whose support is in [0,1] and which is approximated with a uniform sampling at intervals N -1 . The resulting approximation aL has N = 2 -L samples. This is the case in Figure 7.7 with N -- 1024. Computing the convolutions with h and ~ at abscissa close to 0 or close to N requires knowing the values of aL [hi beyond the boundaries n = 0 and n = N - 1. These boundary problems may be solved with one of the three approaches described in Section 7.5. Section 7.5.1 explains the simplest algorithm, which periodizes aL. The convolutions in Theorem 7.7 are replaced by circular convolutions. This is equivalent to decomposing f in a periodic wavelet basis of L2[0, 1]. This algorithm has the disadvantage of creating large wavelet coefficients at the borders. If ~ is symmetric or antisymmetric, we can use a folding procedure described in Section 7.5.2, which creates smaller wavelet coefficients at the border. It decomposes f in a folded wavelet basis of L 2 [0,1]. However, we mentioned in Section 7.2.3 that Haar is the only symmetric wavelet with a compact support. Higher order spline wavelets have a symmetry but h must be truncated in numerical calculations. The most efficient boundary treatment is described in Section 7.5.3, but the implementation is more complicated. Boundary wavelets which keep their vanishing moments are designed to avoid creating large amplitude coefficients when f is regular. The fast algorithm is implemented with special boundary filters, and requires the same number of calculations as the two other methods.
7.3 WAVELETSAND FILTERBANKS
259
Complexity Suppose that h and g have K non-zero coefficients. Let aL be a signal of size N -- 2 -L. With appropriate boundary calculations, each aj and dj has 2 -j samples. Equations (7.107) and (7.108) compute aj+l and dj+l from aj with 2-JK additions and multiplications. The wavelet representation (7.115) is therefore calculated with at most 2KN additions and multiplications. The reconstruction (7.109) of aj from aj+l and dj+l is also obtained with 2-JK additions and multiplications. The original signal aL is thus also recovered from the wavelet representation with at most 2KN additions and multiplications.
Wavelet Graphs The graphs of r and ~ are computed numerically with the inverse wavelet transform. If f - r then a0[n] - ~[n] and dj[n] - 0 for all L < j < 0. The inverse wavelet transform computes aL and (7.116) shows that N '/2 aL[n] ,.~ r
.
If r is regular and N is large enough, we recover a precise approximation of the graph of r from aL. Similarly, if f -- ~ then a0[n] - 0, d0[n] - 6[n] and dj[n] - 0 for L < j < 0. Then aL[n] is calculated with the inverse wavelet transform and N 1/2 aL[n] ~(N-ln). The Daubechies wavelets and scaling functions in Figure 7.10 are calculated with this procedure. 7.3.2
Perfect Reconstruction Filter Banks
The fast discrete wavelet transform decomposes signals into low-pass and highpass components subsampled by 2; the inverse transform performs the reconstruction. The study of such classical multirate filter banks became a major signal processing topic in 1976, when Croisier, Esteban and Galand [ 141] discovered that it is possible to perform such decompositions and reconstructions with quadrature mirror filters (Problem 7.7). However, besides the simple Haar filter, a quadrature mirror filter can not have a finite impulse response. In 1984, Smith and Barnwell [316] and Mintzer [272] found necessary and sufficient conditions for obtaining perfect reconstruction orthogonal filters with a finite impulse response, that they called conjugate mirror filters. The theory was completed by the biorthogonal equations of Vetterli [338, 339] and the general paraunitary matrix theory of Vaidyanathan [336]. We follow this digital signal processing approach which gives a simple understanding of conjugate mirror filter conditions. More complete presentations of filter banks properties can be found in [ 1, 2, 68, 73, 74]. Filter Bank A two-channel multirate filter bank convolves a signal a0 with a lowpass filter h[n] - hi-n] and a high-pass filter ~,[n] - g[-n] and subsamples by 2 the output: al In] - a0 * h[2n] and dl In] - a0 * ~,[2n]. (7.117)
A reconstructed signal n0 is obtained by filtering the zero expanded signals with a dual low-pass filter h and a dual high-pass filter ~, as shown in Figure 7.13. With
260
CHAPTER VII
• ao[n]
al[n]
WAVELET BASES
~-
~
~
dl[n]
g0[n]
~
FIGURE 7.13 The input signal is filtered by a low-pass and a high-pass filter and subsampled. The reconstruction is performed by inserting zeros and filtering with dual filters h and ~. the zero insertion notation (7.106) it yields
a0[n]- al * ktin] + dl-k ~[n].
(7.118)
We study necessary and sufficient conditions on h, g, kt and ~ to guarantee a perfect reconstruction a0 = a0. Subsampling and Zero Interpolation Subsamplings and expansions with zero insertions have simple expressions in the Fourier domain. Since :~(w)~-]~n=_~x[n] e -in~ the Fourier series of the subsampled signal y[n]- x[2n] can be written --[- O0
)(2w)-
Z
x[2n]e-i2nw=~1 (k(w)+k(w + rr)).
(7.119)
n----- oo
The component k(w + 7r) creates a frequency folding. This aliasing must be canceled at the reconstruction. The insertion of zeros defines
x[p]
it[n]
y[n]
0
ifn-2p ifn- 2p+ 1 '
whose Fourier transform is -AvOO
~y(w)-- Z
x[n]e-i2nw--x(2w)"
(7.120)
n----oo
The following theorem gives Vetterli's [339] biorthogonal conditions, which guarantee that a0 - a0. Theorem 7.8 (VETTERLI) The filter bankperforms an exact reconstruction for any
input signal if and only if
and
h* (w + 7r) h(w) + ~* (w + 7r) ~(w) - O,
(7.121)
^ h*(w)h(w)+ ~,, (w)~(w) = 2.
(7.122)
7.3 WAVELETS AND FILTERBANKS
261
Proof 1. We first relate the Fourier transform of al and dl to the Fourier transform of a0. Since h and g are real, the transfer functions of h and ~, are respectively ~t(-~) - h* (~) and ~ ( - ~ ) - ~*(~). By using (7.119), we derive from the definition (7.117) of a~ and dl that h1(2~)
=
~1 (fi0(~)h* (~)+fi0(~+Tr) h* (~+Tr) ) ,
(7.123)
31(2~)
--
1 ~, ~, ~(a0(~)(~)+fi0(~+Tr)(~+Tr)).
(7.124)
The expression (7.118) of ~o and the zero insertion property (7.120) also imply rio(W) = a, (2~c) h(~) + 3~ (2~) ~(co).
(7.125)
Hence A
ao(~)
1
~(
/~,
"" ~, .-/~/h~/+ (~)~(~/)a0(~)+
To obtain a0 - a0 for all a0, the filters must cancel the aliasing term ao(~ + 7r) and guarantee a unit gain for a0(~), which proves equations (7.121) and (7.122). m Theorem 7.8 proves that the reconstruction filters h and ~r are entirely specified by the decomposition filters h and g. In matrix form, it can be rewritten h(~) h(~+~)
~(~)
~(~+~)
g,(~c)
•
(~)
_
2 0
(7.126) "
The inversion of this 2 x 2 matrix yields
>
(7.127)
:x(~) - h(~) ~(~ + ~) -/,(~ + ~)/~(~).
(7.128)
(aJ)
g*(~)
2
= ~x(~)
/
~(a~ + 7r)
-/,(~+~)
where A ( ~ ) is the determinant
The reconstruction filters are stable only if the determinant does not vanish for all E [-Tr, 7r]. Vaidyanathan [336] has extended this result to multirate filter banks with an arbitrary number M of channels by showing that the resulting matrices of filters satisfy paraunitary properties [73].
Finite Impulse Response When all filters have a finite impulse response, the determinant A(~) can be evaluated. This yields simpler relations between the decomposition and reconstruction filters.
262
CHAPTER VII
WAVELET BASES
Theorem 7.9 Perfect reconstruction filters satisfy
h* (w) h(co) + Jz*(w + rr) h(co + rr) - 2.
(7.129)
For finite impulse response filters, there exist a E R and 1 E Z such that ~,(co) -- ae-i(2l+l)wh
(6o+71-)
and
A
~,(6o) -- a-l e-i(2l+l)wh*(cd-l-Tr).
(7.130)
Proof 1. Equation (7.127) proves that c-, 2 ~(w + 7r) and ,--, - 2 h(w + 7r). h ( w ) - A(w) ~ ( w ) - A(w) Hence
~(~)y(~) =
~x(~ + ~) ---, - A(~o---------~h (w + 7r) h(w + 7r).
(7.131)
(7.132)
The definition (7.128) implies that A(w + 7r) = -A(w). Inserting (7.132) in (7.122) yields (7.129). The Fourier transform of finite impulse response filters is a finite series in exp(+inw). The determinant A(w) defined by (7.128) is therefore a finite series. Moreover (7.131) proves that A-l(w) must also be a finite series. A finite series in exp(q-inw) whose inverse is also a finite series must have a single term. Since A(w) = - A ( w + 7r) the exponent n must be odd. This proves that there exist 1 E Z and a E/~ such that A(w) = - 2 a exp[i(2/+ 1)w]. (7.133) Inserting this expression in (7.131) yields (7.130).
II
The factor a is a gain which is inverse for the decomposition and reconstruction filters and 1 is a reverse shift. We generally set a = 1 and I = 0. In the time domain (7.130) can then be rewritten
g[n]- (-1)'-nh[1-n]
and /r
(-1)l-nh[1-n].
(7.134)
The two pairs of filters (h, g) and (~t, ~,) play a symmetric role and can be inverted.
Conjugate Mirror Filters If we impose that the decomposition filter h is equal to the reconstruction filter h, then (7.129) is the condition of Smith and Barnwell [316] and Mintzer [272] that defines conjugate mirror filters: [~t(co) 12+ ]h(co + 7r)12 - 2.
(7.135)
It is identical to the filter condition (7.34) that is required in order to synthesize orthogonal wavelets. The next section proves that it is also equivalent to discrete orthogonality properties.
7.3
7.3.3
263
WAVELETS A N D FILTER BANKS
Biorthogonal Bases of 12(Z) 2
The decomposition of a discrete signal in a multirate filter bank is interpreted as an expansion in a basis of IZ(z). Observe first that the low-pass and high-pass signals of a filter bank computed with (7.117) can be rewritten as inner products in 12(Z): -~-cxD
al [/]
--
Z
a0[n] h[n- 2/] -- (ao[k],h[k- 2n]),
(7.136)
+oc Z ao[n] g[n- 2/1 - (ao[n], g[n- 2/]).
(7.137)
n----c~
dl [/1
--
F/---- CXD
The signal recovered by the reconstructing filters is a0[n] -
Z
a, [/] h[n - 2/] + Z
1----cxD
dl [/] ~,[n - 2/].
(7.138)
l----oo
Inserting (7.136) and (7.137) yields d-cx~
ao[n] -
Z
-q-c~
(f[k],h[k- 2/]) kt[n- 2/] + Z
1---c~
(f[k], g[k- 2/]) ~[n - 2/]. (7.139)
I=-~
We recognize the decomposition of a0 over dual families of vectors {/t[n- 2/], ~ [ n - 2/]}/~z and {h[n- 21],gin- 2/]}/EZ. The following theorem proves that these two families are biorthogonal. Theorem 7.10 If h, g, it and ~, are perfect reconstruction filters whose Fourier transform is bounded then {~t[n- 21], ~ [ n - 21]}/EZ and {h[n - 21], g i n - 21]}1E2 are biorthogonal Riesz bases ofl2(Z).
Proof2. To prove that these families are biorthogonal we must show that for all n E Z (kt[n],h[n-2/]) (~,[n],g[n-2/])
= --
3[/] 3[/]
(7.140) (7.141)
and
([t[n],g[n- 2/]) -- (~,[n],h[n- 2l]) = 0.
(7.142)
For perfect reconstruction filters, (7.129) proves that /,,
-.
In the time domain, this equation becomes *h[2/] = Z k---~
h[n] h[n - 21] -- 6[1],
(7.143)
264
CHAPTER Vll
WAVELET BASES
which verifies (7.140). The same proof as for (7.129) shows that ..~
(~*(w)~(w)+
g*
t..
(w+rr)~(w+rr)) --1.
In the time domain, this equation yields (7.141). It also follows from (7.127) that 2 and 1
A
(*,*(~) ~(~) +
/~,
^
(~ + ~) ~(~ + ~)) - O.
The inverse Fourier transforms of these two equations yield (7.142). To finish the proof, one must show the existence of Riesz bounds defined in (A. 12). The reader can verify that this is a consequence of the fact that the Fourier transform of each filter is bounded. II Orthogonal Bases A Riesz basis is orthonormal if the dual basis is the same as the original basis. For filter banks, this means that h - tt and g - ~. The filter h is then a conjugate mirror filter
[~t(co) 12 -+-Ih(w -+-7r)12 - 2.
(7.144)
The resulting family { h [ n - 2/], g [ n - 2/]}/~z is an orthogonal basis of 12(Z). Discrete Wavelet Bases The construction of conjugate mirror filters is simpler than the construction of orthogonal wavelet bases of L 2 (~). Why then should we bother with continuous time models of wavelets, since in any case all computations are discrete and rely on conjugate mirror filters? The reason is that conjugate mirror filters are most often used in filter banks that cascade several levels of filterings and subsamplings. It is thus necessary to understand the behavior of such a cascade [290]. In a wavelet filter bank tree, the output of the low-pass filter h is subdecomposed whereas the output of the high-pass filter ~ is not; this is illustrated in Figure 7.12. Suppose that the sampling distance of the original discrete signal is N -1 . We denote aL [n] this discrete signal, with 2 L = N -1 . At the depth j - L _> 0 of this filter bank tree, the low-pass signal aj and high-pass signal dj can be written
aj[1] - aL *$j[2J-L1] -- (aL[n],qbj[n- 2J-Ll]) and
dj[1] = aL *~bj[2J-L1] -- (aL[n], ~bj[n - 2J-L1]). The Fourier transforms of these equivalent filters are j-L-1 -
H p=0
j-L-2
h(ZPw)and ~j(co)-~(zJ-L-lco)
1-I h(ZPc~ p--0
(7.145)
7.4
265
BIORTHOGONAL WAVELET BASES
A filter bank tree of depth J
--
L ___0, decomposes
aL over the family of vectors
I{d?s[n--2S-Ll]}l~Z, {~j[n--2J-L1]}L<j<,,leZI.
(7.146)
For conjugate mirror filters, one can verify that this family is an orthonormal basis of 12(Z). These discrete vectors are close to a uniform sampling of the continuous time scaling functions dpj(t) = 2-J/2(9(2-Jt) and wavelets ~j(t) - 2-J/2(p(2-Jt). When the number L - j of successive convolutions increases, one can verify that c~j[n] and ~j[n] converge respectively to N -1/2 dpj(N-ln) and N -1/2 ~j(N-ln). The factor N-1/2 normalizes the 1z (Z) norm of these sampled functions. I f L - j = 4 then ~j[n] and ~j[n] are already very close to these limit values. The impulse responses q~jIn] and ~j In] of the filter bank are thus much closer to continuous time scaling functions and wavelets than they are to the original conjugate mirror filters h and g. This explains why wavelets provide appropriate models for understanding the applications of these filter banks. Chapter 8 relates more general filter banks to wavelet packet bases. If the decomposition and reconstruction filters of the filter bank are different, the resulting basis (7.146) is non-orthogonal. The stability of this discrete wavelet basis does not degrade when the depth J - L of the filter bank increases. The next section shows that the corresponding continuous time wavelet ~(t) generates a Riesz basis of L2(R). 7.4
B I O R T H O G O N A L WAVELET BASES 2
The stability and completeness properties of biorthogonal wavelet bases are described for perfect reconstruction filters h and h having a finite impulse response. The design of linear phase wavelets with compact support is explained in Section 7.4.2. 7.4. I
Construction of Biorthogonal Wavelet Bases
An infinite cascade of perfect reconstruction filters (h, g) and (/t, ~) yields two scaling functions and wavelets whose Fourier transforms satisfy ~(2w)
=
x/2
~(2co)
=
1
^
1 ~(cu)~(w),
(7.147)
-~
1
-~(w);(co).
(7.148)
~t[n]~ ( 2 t - n)
(7.149)
~[n]~5(2t-n).
(7.150)
~(co)~5(co) , zb(2co) =
In the time domain, these relations become +oo
~(t) -
v/2 Z
+oo
h[n]~5(2t- n)
n ' - ' - - oO
n----oo
+oo
~b(t) = ~
Z / ' / " - - - OO
, ~5(t) = v ~ Z +oo
g[n]oS(2t-n),
~(t) - v/2 Z n------oo
266
CHAPTER VII
WAVELET BASES
The perfect reconstruction conditions are given by Theorem 7.9. If we normalize the gain and shift to a - 1 and l - 0, the filters must satisfy (7.151)
h* (w) h(w) + h* (w + re) h(w + re) - 2, and
~2"*
A
~(co) -- e -i~~h (co + 7t-) , ~(co) -- e -i~~kt*(co -t- 71-).
(7.152)
Wavelets should have a zero average, which means that ~(0) - ~b(0) - 0. This A
is obtained by setting ~(0) - g(0) - 0 and hence h(rr) - kt(rr) - 0. The perfect reconstruction condition (7.151) implies that h* (0)h(O) - 2. Since both filters are defined up to multiplicative constants respectively equal to )~ and 1 -~, we adjust I so that h(O) - h(O) - v ~ . In the following, we also suppose that h and h are finite impulse response filters. One can then prove [21 ] that A
+ ~ ~t(2-pco)
II
^ and ~ ( ~ ) -
p=l
+ ~ ~t(2-pco) H x/~
(7.153)
p=l
are the Fourier transforms of distributions of compact support. However, these distributions may exhibit wild behavior and have infinite energy. Some further _'2"
conditions must be imposed to guarantee that q5 and r are the Fourier transforms of finite energy functions. The following theorem gives sufficient conditions on the perfect reconstruction filters for synthesizing biorthogonal wavelet bases of
T h e o r e m 7.11 (COHEN, DAUBECHIES,FEAUVEAU) Suppose
that there strictly positive trigonometric polynomials P(e i~~ and [:'(ei~~ such that
li,(2)]2e(ei /2)+la(2
Ih(2)
2p(ei(~~
+ Ih(2 + 12/b(ei(~
--
exist
2P(ei~~
(7.154)
2/b(e iW)
(7.155)
and that P and [9 are unique (up to normalization). Suppose that inf
toe [-rr/2,rr/2]
Ih( )l
> 0 ,
inf
toe [-rr/2,rr/2]
Ih(co)l > 0.
(7.156)
-'2"
9 Then the functions ~ and r defined in (7.153) belong to L2(IR), and r satisfy biorthogonal relations (r
~(t - n)) -- 6[n].
(7.157)
7.4 BIORTHOGONALWAVELETBASES 9
267
The two wavelet families (ff)j,n}(j,n)EZ2 and (~)j,n}(j,n)EZ2 are biorthogonal Riesz bases of L2 (]~).
The proof of this theorem is in [131] and [21]. The hypothesis (7.156) is also imposed by Theorem 7.2, which constructs orthogonal bases of scaling functions. The conditions (7.154) and (7.155) do not appear in the construction of wavelet orthogonal bases because they are always satisfied with P(e i~) - [9(eiw) - 1 and one can prove that constants are the only invariant trigonometric polynomials [247]. Biorthogonality means that for any (j, j',n,n') E Z 4, (~pj,,, ~j,,,, ) -- 3In - n'] 6[j - f].
(7.158)
Any f E L2(R) has two possible decompositions in these bases:
:-
Z <:,/:J,.>:J,..
n,j=-c~
(7.159)
n,j=-cx~
The Riesz stability implies that there exist A > 0 and B > 0 such that -3t-OO
A lfll 2 1
[ fl]2
<__
~
<
Z
Il 2<__nlfl] 2,
+~
1
I(f,~j,.>l 2 -< ~ [[f[I 2
(7.160)
(7.161)
?/~jz--OO
Multiresolutions B iorthogonal wavelet bases are related to multiresolution approximations. The family {~(t - n) }nzZ is a Riesz basis of the space V0 it generates, whereas {~(t - n)}nE2~ is a Riesz basis of another space V0. Let Vj and Vj be the spaces defined by
r
f(2Jt) E V0,
f(t) E r162 r
f(2Jt) E Vo.
f ( t ) E Vj
One can verify that {Vj}jzz and {Vj}jzz are two multiresolution approximations of L2(IR). For any j E Z, {~j,n}nzZ and {~j,n}ncZ are Riesz bases of Vj and Vj. The dilated wavelets {~j,. }n~Z and {~j,. }ncZ are bases of two detail spaces Wj and Wj such that Vj | Wj - Vj-1 and Vj | Wj - Vj-1 9 The biorthogonality of the decomposition and reconstruction wavelets implies that W j is not orthogonal to Vj but is to Vj whereas ~lj is not orthogonal to Vj but is to Vj.
268
CHAPTER VII
WAVELET BASES
Fast Biorthogonal Wavelet Transform The perfect reconstruction filter bank studied in Section 7.3.2 implements a fast biorthogonal wavelet transform. For any discrete signal input bin] sampled at intervals N -1 - 2 L, there exists f E VL such that aL[n] - ( f , d?L,,,) -- N -1/2 b[n]. The wavelet coefficients are computed by successive convolutions with h and ~,. Let aj [n] -- (f, c~j,n) and dj [n] - (f, ~j,n ). As in Theorem 7.7, one can prove that
a j+l In] -- aj,h[2n]
The reconstruction is performed with the dual filters h and
aj[n]
-- {lj_k_ 1
(7.162)
, dj+l [n] - a j , ~[2n] .
~:
*h[n] "qt-dj_k_1 * ~[n].
(7.163)
If aL includes N non-zero samples, the biorthogonal wavelet representation [{dj}L<j<_j,aj] is calculated with O(N) operations, by iterating (7.162) for L < j < J. The reconstruction of aL by applying (7.163) for J > j _> L requires the same number of operations.
7.4.2
Biorthogonal Wavelet Design 2
The support size, the number of vanishing moments, the regularity and the symmetry of biorthogonal wavelets is controlled with an appropriate design of h and h.
Support If the perfect reconstruction filters h and h have a finite impulse response then the corresponding scaling functions and wavelets also have a compact support. As in Section 7.2.1, one can show that if h[n] and h[n] are non-zero respectively for N1 < n _< N2 and N1 _< n _
and ~ [ n ] - ( - 1 ) l - n / t [ 1 - n ] ,
the supports of ~ and ~ defined in (7.150) are respectively
N1-]V2+IN2-]VI-k-1] []V1-N2-+-I ]~/2-NI-k-11 ,
~
and
2
'
2
.
(7.164)
Both wavelets thus have a support of the same size and equal to l-
Vanishing Moments
U 2 - U l +/V2 -/V1 . 2
(7.165)
The number of vanishing moments of ~ and ~ depends on A
the number of zeros at a~ - 7r of kt(co) and h(aJ). Theorem 7.4 proves that ~ has vanishing moments if the derivatives of its Fourier transform satisfy @(k)(0) -- 0 for k _< ~. Since ~(0) - 1, (7.4.1) implies that it is equivalent to impose that ~(aJ) has a zero of order ~ at co - 0. Since ~(aJ) - e -i~~h* (a~ + ~-), this means that h(a~) has a zero of order ~ at aJ - 7r. Similarly the number of vanishing moments of ~ is equal to the number p of zeros of h(a~) at ~-.
7.4
269
BIORTHOGONAL WAVELET BASES
Regularity Although the regularity of a function is a priori independent of the number of vanishing moments, the smoothness of biorthogonal wavelets is related to their vanishing moments. The regularity of ~band ~ is the same because (7.150) shows that ~ is a finite linear expansion of q5translated. Tchamitchian's Proposition 7.3 gives a sufficient condition for estimating this regularity. If it(a~) has a zero of order p at 7r, we can perform the factorization 2
l(a~).
(7.166)
Let B -- sup~[_~,~] II(~)I. Proposition 7.3 proves that ~bis uniformly Lipschitz c~ for ct < ct0 p - log 2 B - 1. -
-
Generally, log 2 B increases more slowly than p. This implies that the regularity of ~b and ~ increases with p, which is equal to the number of vanishing moments of ~. Similarly, one can show that the regularity of ~ and ~ increases with ~, which is the number of vanishing moments of ~. If ~t and/t have different numbers of zeros at 7r, the properties of ~ and ~ can therefore be very different.
Ordering of Wavelets Since ~ and ~ might not have the same regularity and number of vanishing moments, the two reconstruction formulas -t-oo
f
=
f
=
Z ( f ' ~J,"> ~J,"' n,j=-co +co ~ (f, ~j,n) 2/)j,n n,j---co
(7.167)
(7.168)
are not equivalent. The decomposition (7.167) is obtained with the filters (h, g) at the decomposition and (/t, ~) at the reconstruction. The inverse formula (7.168) corresponds to (~t,~) at the decomposition and (h, g) at the reconstruction. To produce small wavelet coefficients in regular regions we must compute the inner products using the wavelet with the maximum number of vanishing moments. The reconstruction is then performed with the other wavelet, which is generally the smoothest one. If errors are added to the wavelet coefficients, for example with a quantization, a smooth wavelet at the reconstruction introduces a smooth error. The number of vanishing moments of ~ is equal to the number ~ of zeros at 7r of h. Increasing fi also increases the regularity of ~. It is thus better to use h at the decomposition and/t at the reconstruction if h has fewer zeros at 7r than h.
Symmetry It is possible to construct smooth biorthogonal wavelets of compact support which are either symmetric or antisymmetric. This is impossible for orthogonal wavelets, besides the particular case of the Haar basis. Symmetric or
270
CHAPTER Vll
WAVELET BASES
antisymmetric wavelets are synthesized with perfect reconstruction filters having a linear phase. If h and h have an odd number of non-zero samples and are symmetric about n - O, the reader can verify that 4> and q$ are symmetric about t - 0 while and ~ are symmetric with respect to a shifted center. If h and ~t have an even number of non-zero samples and are symmetric about n - 1/2, then ~b(t) and ~b(t) are symmetric about t - 1/2, while ~ and ~ are antisymmetric with respect to a shifted center. W h e n the wavelets are symmetric or antisymmetric, wavelet bases over finite intervals are constructed with the folding procedure of Section 7.5.2.
7.4.3
Compactly Supported Biorthogonal Wavelets 2
We study the design of biorthogonal wavelets with a m i n i m u m size support for a specified number of vanishing moments. Symmetric or antisymmetric compactly supported spline biorthogonal wavelet bases are constructed with a technique introduced in [ 131 ]. T h e o r e m 7.12
(COHEN,DAUBECHIES,FEAUVEAU) Biorthogonal wavelets ~ and
~b with respectively [7 and p vanishing moments have a support of size at least p + [~ - 1. CDF biorthogonal wavelets have a minimum support of size p + [~ - 1. Proof a. The proof follows the same approach as the proof of Daubechies's Theorem 7.5. One can verify that p and/~ must necessarily have the same parity. We concentrate on filters h[n] and ~t[n] that have a symmetry with respect to n -- 0 or n = 1/2. The general case proceeds similarly. We can then factor h(aJ)
---- x/2 exp
2
cos ~-
L(cosa~) ,
(7.169)
h(a;)
=
2
cos -~-
L(cosu;) ,
(7.170)
x/2 exp
with e = 0 for p and fi even and e = 1 for odd values. Let q = (p + fi)/2. The perfect reconstruction condition h* (~) h(w) + h* (~ + 7r)h(~ + 7r) -- 2 is imposed by writing L(cos~) L ( c o s ~ ) - P (sin 2 ~~) ,
(7.171)
where the polynomial P(y) must satisfy for all y E [0,1]
(1-y)qP(y)+yqP(1-y)=
1.
(7.172)
We saw in (7.101) that the polynomial of minimum degree satisfying this equation is q-1 k--0
The spectral factorization (7.171) is solved with a root attribution similar to (7.103). The resulting minimum support of ~ and ~ specified by (7.165) is then p + ~ - 1. I
7.4
BIORTHOGONALWAVELETBASES
p,f, 0 1, 1 2, - 2 3, 3 4, - 4 0,1 1,2 -2,3 -3,4 -4,5 -5,6 -6,7 -7,8
p=2 ~=4
p=3 fi=7
h[,]
271
i,[,]
0.70710678118655 0.35355339059327
0.99436891104358 0.41984465132951 0.17677669529664 0.06629126073624 0.03314563036812
0.53033008588991 0.17677669529664
0.95164212189718 0.02649924094535 0.30115912592284 0.03133297870736 0.07466398507402 0.01683176542131 0.00906325830378 0.00302108610126
Perfect reconstruction filters h and/t for compactly supported spline wavelets, with h and h having respectively ~ and p zeros at co - 7r.
Table 7.3
Spline Biorthogonal Wavelets
Let us choose
/'t( c o )--v / 2 exp ( - i e c o ) ( 2
cos co)p -2
(7.174)
with e - 0 for p even and e - 1 for p odd. The scaling function computed with (7.153) is then a box spline of degree p - 1
~(co) -- exp (-ieco 2 )(sin(co /2) p
~/2 )
Since ~ is a linear combination of box splines ~b(2t - n), it is a compactly supported polynomial spline of same degree. The number of vanishing moments ~ of ~ is a free parameter, which must have the same parity as p. Let q = (p + ~)/2. The biorthogonal filter ~t of minimum length is obtained by observing that L(cosco) = 1 in (7.169). The factorization (7.171) and (7.173) thus imply that
h(co) - v ~ exp
(-ieco) ( co)f' 2
cos -~
k=O
q-l+k k
sin
co 2k
(7.175)
These filters satisfy the conditions of Theorem 7.11 and thus generate biorthogonal wavelet bases. Table 7.3 gives the filter coefficients for (p - 2,/~ - 4) and (p 3, ~ - 7). The resulting dual wavelet and scaling functions are shown in Figure 7.13.
272
CHAPTER VII
~b(t) ~
WAVELET BASES
~(t)
,
,
~b(t)
1.
~(t)
0.6
-4
_
_
-2
0
1.
j
2
_
4
.
-o.s[
-
-5
r
0
5
r 2
. . . .
1 0
-2
-1
0
1
2
3
-2
p-2,~-4
-1
0
p-2,
1
2
3
-4
/~-4
-2
0
2
4
-4
p-3,~-7
-2
0
2
4
p-3,~-7
FIGURE 7.14 Spline biorthogonal wavelets and scaling functions of compact support corresponding to the filters of Table 7.3.
4,(t)
r 2
15
2
0.5
-0.
:
-2
- "
-
] -
FIGURE 7.15 Biorthogonal wavelets and scaling functions calculated with the filters of Table 7.4, with p - 4 and/~ - 4.
Closer Filter Length Biorthogonal filters h and h of more similar length are obtained by factoring the polynomial P(sin 2 ~) in (7.171) with two polynomial L(cosuJ) and L(cosu:) of similar degree. There is a limited number of possible factorizations. For q - (p + j~)//2 < 4, the only solution is L(cosr - 1. For q - 4 there is one non-trivial factorization and for q - 5 there are two. Table 7.4 gives the resulting coefficients of the filters h and h of most similar length, computed by Cohen, Daubechies and Feauveau [ 131 ]. These filters also satisfy the conditions of Theorem 7.11 and therefore define biorthogonal wavelet bases. Figure 7.15 gives the scaling functions and wavelets corresponding to p - j~ - 4. These dual functions are similar, which indicates that this basis is nearly orthogonal. This particular set of filters is often used in image compression. The quasi-orthogonality guarantees a good numerical stability and the symmetry allows one to use the folding procedure of Section 7.5.2 at the boundaries. There are also enough vanishing moments to create small wavelet coefficients in regular image domains. How to design other compactly supported biorthogonal filters is discussed extensively in [ 131,340].
7.4
h[n]
~,[n]
0 1, 1 -2, 2 3,3 4,4
0.78848561640637 0.41809227322204 -0. 04068941760920 -0.06453888262876 0
0.85269867900889 0.37740285561283 -0.11062440441844 -0. 02384946501956 0.03782845554969
0 1,1 2,2 3,3 4,4 5,5
0.89950610974865 0.47680326579848 -0.09350469740094 -0.13670658466433 -0.00269496688011 0.01345670945912
0.73666018142821 0.34560528195603 -0.05446378846824 0.00794810863724 0.03968708834741 0
0 -1,1 2,2 3,3 4,4 -5,5
0.54113273169141 0.34335173921766 0.06115645341349 0.00027989343090 0.02183057133337 0.00992177208685
1.32702528570780 0.47198693379091 -0.36378609009851 -0.11843354319764 0.05382683783789 0
p,P p=4 ~=4
p=5 ~=5
p=5 ~=5
Table 7.4
7.4.4
273
BIORTHOGONAL WAVELET BASES
Perfect reconstruction filters of most similar length.
Lifting Wavelets 3
A lifting is an elementary modification of perfect reconstruction filters, which is used to improve the wavelet properties. It also leads to fast polyphase implementations of filter bank decompositions. The lifting scheme of Sweldens [325,324] does not rely on the Fourier transform and can therefore construct wavelet bases over non-translation invariant domains such as bounded regions of Rp or surfaces. This section concentrates on the main ideas, avoiding technical details. The proofs are left to the reader. Theorem 7.11 constructs compactly supported biorthogonal wavelet bases from finite impulse response biorthogonal filters (h, g,h, ~) which satisfy
]7"(~) h(w) + ]~*(w + ~) h(w + 7r) - 2
(7.176)
and
~(~)-e-i~h
(w+Tr) , ~ ( ~ ) - e - / ~ t * ( ~ + T r ) .
(7.177)
The filters h and h are said to be dual. The following proposition [209] characterizes all filters of compact support that are dual to h. Proposition 7.5 (HERLEY,VETTERLI) Let h and it be dual filters with a finite support. A filter h I with finite support is dual to kt if and only if there exists a finite filter I such that A$ ~t1(~) -- ~t(~) + e - i ~ / t (~+Tr)l*(2w).
(7.178)
CHAPTER VII
2~4
WAVELET BASES
This proposition proves that if (h,g, ft, ~) are biorthogonal then we can construct a new set of biorthogonal filters (h l, g,]l, ~l) with
]/l ((a3)- ~t(W) + ~(03) l* (2~V)
(7.179)
A
(~v) __ e - i ~ v h l * ( 0 3
~gl
+ 71") - -
g(~v)-/t(03) 1(203).
(7.180)
This is verified by inserting (7.177) in (7.178). The new filters are said to be lifted because the use of 1 can improve their properties. The inverse Fourier transform of (7.179) and (7.180) gives -~-00
hi[n] -- h[n] + ~
g[n-2k]l[-k],
(7.181)
~t[n-2k]l[k].
(7.182)
k=-c~ gl[n]
--
~[n]- ~ k=
--(3(3
Theorem 7.10 proves that the conditions (7.176) and (7.177) are equivalent to the fact that {h[n- 2k],g[n- 2k]}kez and {/~[n - 2k], ~ [ n - 2k]}kcz are biorthogonal Riesz bases of 12(Z). The lifting scheme thus creates new families {ht[n- 2k], gin- 2k] }keZ and {h[n- 2k], g l [ n - 2k] }k6Z that are also biorthogonal Riesz bases of 12(Z). The following theorem derives new biorthogonal wavelet bases by inserting (7.181) and (7.182) in the scaling equations (7.149) and (7.150). Theorem 7.13 (SWELDENS) Let ((9,~b,(9, ~b) be a family of compactly supported biorthogonal scaling functions and wavelets associated to thefilters (h, g, h, ~). Let
l[k] be a finite sequence. A new family of formally biorthogonal scaling functions and wavelets (~b/ , ~bt, ~, ~bl) is defined by q~l(t)
--
V/2 ~
h [ k ] ~ l ( 2 t - k ) d- ~
k-----oo
el(t) -
g[k] 0 l(2t - k)
v/2 ~
l[-k]@l(t-k)
(7.183)
k-----cxD
(7.184)
k---c~ +~
@l(t)
--
~b(t)- ~
l[k]~(t-k).
(7.185)
k=-c~ Theorem 7.11 imposes that the new filter h I should satisfy (7.154) and (7.156) to generate functions ~)l and ~bI of finite energy. This is not necessarily the case for all l, which is why the biorthogonality should be understood in a formal sense. If these functions have a finite energy then {r and (r-I are biorthogonal wavelet bases of L2(N). The lifting increases the support size of ~ and ~ typically by the length of the support of I. Design procedures compute minimum size filters 1to achieve specific
7.4
BIORTHOGONAL WAVELETBASES
275
properties. Section 7.4.2 explains that the regularity of ~band f; and the number of vanishing moments of ~ depend on the number of zeros of ~t(~) at w - 7r, which is also equal to the number of zeros of ~(w) at w - 0. The coefficients l[n] are often calculated to produce a lifted transfer function gl (w) with more zeros at w -- 0. To increase the number of vanishing moment of ~ and the regularity of ~ and we use a dual lifting which modifies/t and hence g instead of h and ~. The corresponding lifting formula with a filter L[k] are obtained by inverting h with g and g with ~ in (7.181) and (7.182): A
--~OO
gI-'[n]
g[nl+ Z
h[n-2k]L[-k],
(7.186)
~[n-
(7.187)
k=-~
ktL[n]
--
kt[n]- Z
2k]L[k].
k---oo
The resulting family ofbiorthogonal scaling functions and wavelets (0, ~bL, ~t~, ~L) are obtained by inserting these equations in the scaling equations (7.149) and (7.150): +c~
OL(t) -
qt-oo
x/2 Z
h[k]OL(2t-k)- Z
k=-oo +~
~L(t)
--
L[k]~L(t-k)
(7.188)
k=-oo
X/2 ~
~,[k]0L(zt-- k)
(7.189)
k=-e~ +c~ ~L(t)
--
@(t)+ Z
L[-k]O(t-k).
(7.190)
k---oo
Successive iterations of liftings and dual liftings can improve the regularity and vanishing moments of both ~ and ~ by increasing the number of zeros of ~(w) and ~(w) at w - 0. A
Lazy Wavelets Lazy filters h[n] - h[n] - 6[n] and ~[n] - g[n] - 6[n- 1] satisfy the biorth0gonality conditions (7.176) and (7.177). Their Fourier transform is A
h(w)
- h(w) - 1 and g(w) - ~(w) - e -i~
(7.191)
The resulting filter bank just separates the even and odd samples of a signal without filtering. This is also called a polyphase decomposition [73]. The lazy scaling functions and wavelets associated to these filters are Diracs 0 ( t ) = 0 ( t ) = 3(t) and ~(t) - ~ ( t ) - 6 ( t - 1/2). They do not belong to L2(R) because g(w) and ~r do not vanish at w - 0. These wavelet can be transformed into finite energy functions by appropriate liftings.
CHAPTER VII
276 Example
WAVELET BASES
7.11 A lifting of a lazy filter g(ca)
-
e -i~~
yields
g (ca) - e -iw -l(2ca). To produce a symmetric wavelet e ic~l(2ca) must be even. For example, to create 4 vanishing moments a simple calculation shows that the shortest filter l has a Fourier transform ~(2ca) _ e_/~o ( 9 cosca - g1 cos 3ca) . Inserting this in (7.178) gives ~tl(ca) -
-
-~e 1 -3ic~ +
~6
e '~~ "
1 - 9e"~- -
i -1~ e 3ia) 9
(7192) .
The resulting q51is the Deslauriers-Dubuc interpolating scaling function of order 4 shown in Figure 7.21(b), and ~ l ( t ) = x/~Ol(2t - 1). These interpolating scaling functions and wavelets are further studied in Section 7.6.2. Both q51 and ~l are continuously differentiable but ~ and ~l are sums of Diracs. A dual lifting can transform these into finite energy functions by creating a lifted filter ~r (ca) with one or more zero at ca = 0. The following theorem proves that lifting lazy wavelets is a general filter design procedure. A constructive proof is based on the Euclidean algorithm [ 148]. 7.14 ( D A U B E C H I E S , S W E L D E N S ) Any biorthogonal filters (h,g,[t, ~) can be synthesized with a succession of lifiings and dual lifiings applied to the lazy filters (7.191), up to shifting and multiplicative constants.
Theorem
Fast Polyphase Transform After lifting, the biorthogonal wavelet transform is calculated with a simple modification of the original wavelet transform. This implementation requires less calculation than a direct filter bank implementation 1 1 I ~t~l of the lifted wavelet transform. We denote aj[k] - ( f , Oj,k) and dj[k] - ( f , -j,k). The standard filter bank decomposition with (hi,it, g, ~l) computes
+oo
a~+ 1[k]
--
Z
hl In - 2k] ajl In] - a jl , hl[2k] ,
(7.193)
l l g i n - 2k] aj[n] - aj,~[2k].
(7.194)
n----(X) +OO
d}+ 1[k]
-
Z n=--Oo
The reconstruction is obtained with l
+oo
aj[n] -- Z k:-oo
+oo
h[n - 2k] a~+ 1[k] + Z k 88
gl[n - 2k]
4+1[k].
(7.195)
7.4
BIORTHOGONAL WAVELET BASES
277
Inserting the lifting formulas (7.181) and (7.182) in (7.193) gives an expression that depends only on the original filter h: --~-o(3 0
aj+,[k] -
Z
l l h[n-Zk]aj[n] - aj.h[Zk]
plus a lifting component that is a convolution with 1 --~oo
a~+, [k] -
a0 j + 1 [k]
+ ~
0 [k]+ d j+l lit - n]d j+l I [ n ] - aj+l l * l[k] 9
n - - --(30
This operation is simply inverted by calculating l a 0j+ 1[k] -- a~+ 1[k] -- dj+ 1 "~l[k]
and performing a reconstruction with the original filters (/~, ~) ur-o~ l aj[n] -- Z
k=-cxz
-k-oo 0 h[n- 2k]aj[k] + Z
l ~[n- 2k]dj[k].
k=-cx~
Figure 7.16 illustrates this decomposition and reconstruction. It also includes the implementation of a dual lifting with L, which is calculated with (7.186)"
djL+l [k] - - d j 1+ 1 [k] q- aS+ 1 * L [ k ] . Theorem 7.14 proves that any biorthogonal family of filters can be calculated with a succession of liftings and dual liftings applied to lazy filters. In this case, the filters h[n] - h[n] - 5[n] can be removed whereas ~,[n] - 5In + 1] and ~[n] - 3[n - 1] shift signals by 1 sample in opposite directions. The filter bank convolution and subsampling is thus directly calculated with a succession of liftings and dual liftings on the polyphase components of the signal (odd and even samples) [73]. One can verify that this implementation divides the number of operations by up to a factor 2 [148], compared to direct convolutions and subsamplings calculated in (7.193) and (7.194). Lifted Wavelets on Arbitrary Domains The lifting procedure is extended to signal spaces which are not translation invariant. Wavelet bases and filter banks are designed for signals defined on arbitrary domains D of •P or on surfaces such as a spheres. Wavelet bases of LZ(D) are derived from a family of embedded vector spaces {Vj}j~z that satisfy similar multiresolution properties as in Definition 7.1. These spaces are constructed from embedded sampling grids {~j }jEZ included in D. For each index j, ~j has nodes whose distance to all its neighbors is of the order of 2 j. Since ~j+l is included in ~j we can define a complementary grid Cj+I that
2~
CHAPTER Vll
~
~1
~
i~l
WAVELET BASES
aj+l c~
a1 j+l
~
aj1
j+l
(a) 0
1
aj+l 1
aj dL j+l
~ d1
j+]
(b) FIGURE 7.16 (a): A lifting and a dual lifting are implemented by modifying the original filter bank with two lifting convolutions, where 1 and L are respectively the lifting and dual lifting sequences. (b): The inverse lifted transform removes the lifting components before calculating the filter bank reconstruction.
regroups all nodes of ~j that are not in ~j+l. For example, if D = [0,N] then Gj is the uniform grid {2Jn}o
-(aj,hj,k)-Zaj[n]hj,k[n],
(7.196)
nEGj
Vm E Cj+ I , dj+ l [m]
-
(aj,gj,m) - ~_~dj[n] gj,m[n].
(7.197)
nE{}j
This decomposition is implemented by linear operators on subsampled grids as in the filter banks previously studied. However, these operators are not convolutions because the basis {hj,k}kc~j+~ L_J{gj,m}m~Cj+l is not translation invariant. The
7.4
BIORTHOGONALWAVELETBASES
279
FIGURE 7.17 Black dots are the nodes of a triangulation grid ~j+l of a polygon domain D. This grid is refined with a subdivision, which adds a complementary grid Cj+l composed of all midpoints indicated with white circles. The finer grid is ~j -- ~j+ 1 I..JCj+ 1. reconstruction is performed with a biorthogonal basis {/tj,~ }keGj+, U {g,j,m}mECj+,"
aj[n]- Z
aj+l[k]hj,k[n]+ Z
kCGj+l
dj+l[m]g,j,m[n].
mECj+l
Scaling functions and wavelets are obtained by cascading filter bank reconstructions over progressively finer scales. As a result, they satisfy scaling equations similar to (7.112) and (7.114)
$j,n
~j+l,k
--
Z hj,k[n] nCGj
, l/)j+l,m -- Z gj,m[n] (fij,n , nE~j
~j+l,k
--
~ ]'lj,k[n] ~j,n , ~)j+l,m -- ~ g,j,m[n] dpj,n 9 nC~j n6~j
(7.198) (7.199)
These wavelets and scaling functions have a support included in D. If they have a finite energy with respect to an appropriate measure d# defined over D then one can verify that for any J _< log 2 N
are biorthogonal bases of L2(D,d#). The discrete lazy basis of 12(Gj) is composed of Diracs hj,k[n] -- ~ [ n - k] for (k,n) C ~j+l • Gj and gj,m[n] - ~ [ n - k] for (k,n) C Cj+I • ~j. This basis is clearly orthonormal so the dual basis is also the lazy basis. The resulting filter bank just separates samples of ~j into two sets of samples that belong respectively to ~j+l and Cj+I. The corresponding scaling functions and wavelets are Diracs located over these sampling grids. Finite energy wavelets and scaling functions are constructed by lifting the discrete lazy basis.
2~0
CHAPTER Vll
WAVELET BASES
Theorem 7.15 (SWELDENS) Suppose
that {hj,k)kEGj+~ U {gj,m}mECj+~ and {]'lj,k}kEGj+l U {~,j,m}mECj+I are biorthogonal Riesz bases ofl2(~j). Let lj[k,m] be a matrix with a finite number of non-zero values. If
Vk E ~j-r
, hlj,k --
~l VmECj+I , gj,m --
hj,k+ E lj[k,m]gm,j mECj+I
(7.200)
~,j,m-- E
(7.201)
lj[k'm]]'lk,J
kEGj+I
then {h~,k}kEGj+~U {gj,m}mECj+~ and {~tj,k)kEGj+l U {~Igj,m}mECj+l are biorthogonal Riesz bases of 12(~j). These formulas generalize the translation invariant lifting (7.181) and (7.182), which corresponds to lj[k,m]- l[k- m]. In the general case, at each scale 2 j, the lifting matrix lj[k,m] can be chosen arbitrarily. The lifted bases generate new scaling functions and wavelets that are related to the original scaling functions and wavelets by inserting (7.200) and (7.201) in the scaling equations (7.198) and (7.199) calculated with lifted filters:
~+l,k
r
=
E hJ,k[nl q~j,n-+- E lj[k,m] ~)j+l,m nEGj mECj+I
1,m ---- E gj,m[n] ~,n nE~j
~3}+1 ,m
~--
~j+l ,m -- E lj[k ~ m] ~j+l,k kEGj+~
9
The dual scaling functions ~j,k are not modified since ]lj,k is not changed by the lifting. The fast decomposition algorithm in this lifted wavelet basis is calculated with the same approach as in the translation invariant case previously studied. However, the lifting blocks illustrated in Figure 7.16 are not convolutions anymore. They are linear operators computed with the matrices lj[k,m], which depend upon the scale 2 j. To create wavelets ~/)j,m with vanishing moments, we ensure that they are orthogonal to a basis of polynomials {pi )i of degree smaller than q. The coefficients l[k,m] are calculated by solving the linear system for all i and m E Cj+l (@j+l,m-I , Pi) -- (@~+l,m,
pg) - ~
lj[k, ml (~+l,k,
Pi) -- O.
kE~j+l
A dual lifting is calculated by modifying ~tj,k and gj,m instead of hj,k and gj,m. It allows one to change ~bj,k.
7.5
281
WAVELET BASES ON AN INTERVAL
Applications Lifting lazy wavelets is a simple way to construct biorthogonal wavelet bases of L2[0, 1]. One may use a translation invariant lifting, which is modified near the left and right borders to construct filters whose supports remains inside D -- [0, 1]. The lifting coefficients are calculated to design regular wavelets with vanishing moments [325]. Section 7.5 studies other ways to construct orthogonal wavelet bases of L2[0, 1]. Biorthogonal wavelet bases on manifolds or bounded domains of R p are calculated by lifting lazy wavelets constructed on embedded sampling grids. Lifted wavelets on the sphere have applications in computer graphics [326]. In finite twodimensional domains, lifted wavelet bases are used for numerical calculations of partial differential equations [ 118]. To optimize the approximation of signals with few wavelet coefficients, one can also construct adaptive wavelet bases with liftings that depend on the signal. Short wavelets are needed in the neighborhood of singularities, but longer wavelets with more vanishing moments can improve the approximation in regions where the signal is more regular. Such a basis can be calculated with a time varying lifting whose coefficients lj[k,m] are adapted to the local signal properties [325]. 7.5
WAVELET BASES O N A N INTERVAL 2
To decompose signals f defined over an interval [0, 1], it is necessary to construct wavelet bases of L2[0,1]. Such bases are synthesized by modifying the wavelets ~j,n(t) - 2-J/2~b(2-Jt - n) of a basis {~j,n}(j,n)~Z 2 of L2(R). The inside wavelets ~bj,n whose support are included in [0,1] are not modified. The boundary wavelets ~j,n whose supports overlap t = 0 or t = 1 are transformed into functions having a support in [0, 1], which are designed in order to provide the necessary complement to generate a basis of L2[0, 1]. If ~ has a compact support then there is a constant number of boundary wavelets at each scale. The main difficulty is to construct boundary wavelets that keep their vanishing moments. The next three sections describe different approaches to constructing boundary wavelets. Periodic wavelets have no vanishing moments at the boundary, whereas folded wavelets have one vanishing moment. The custom-designed boundary wavelets of Section 7.5.3 have as many vanishing moments as the inside wavelets but are more complicated to construct. Scaling functions ~bj,n are also restricted to [0, 1] by modifying the scaling functions ~j,n(t) ---- 2-J/2c~(2-Jt- n) associated to the wavelets ~j,,,. The resulting wavelet basis of L 2 [0,1] is composed of 2 - J scaling functions at a coarse scale 2 J < 1, plus 2 - j wavelets at each scale 2 j <2J: IS ,.hint
t V'J,n}0___~<2-J ,f 7/jint }-~<j_<J 0
~
_
"
(7.202)
On any interval [a, b], a wavelet orthonormal basis of L2[a, b] is constructed with a dilation by b - a and a translation by a of the wavelets in (7.202). Discrete Basis of C s The decomposition of a signal in a wavelet basis over an interval is computed by modifying the fast wavelet transform algorithm of Section
282
CHAPTER Vll
WAVELET BASES
7.3.1. A discrete signal b[n] of N samples is associated to the approximation of a signal f C L2[0,1] at a scale N -1 -- 2 L with (7.116):
N -1/2 b[n]- aL[n]-
for 0 < n < 2 -L ~
9
Its wavelet coefficients can be calculated at scales 1 > 2 j > 2 L. We set
aj [n] --
( f c/) int ~ and v" j,n /
dj In] - -
(f, 7/:int ~ for 0 < n < 2 - j ~" j,n /
(7.203)
The wavelets and scaling functions with support inside [0,1] are identical to the wavelets and scaling functions of a basis of L 2 (R). The corresponding coefficients aj[n] and dj[n] can thus be calculated with the decomposition and reconstruction equations given by Theorem 7.7. These convolution formulas must however be modified near the boundary where the wavelets and scaling functions are modified. Boundary calculations depend on the specific design of the boundary wavelets, as explained in the next three sections. The resulting filter bank algorithm still computes the N coefficients of the wavelet representation [aj, {dj}L<j<_j] of aL with O(N) operations. Wavelet coefficients can also be written as discrete inner products of aL with discrete wavelets: 7hintn[m]) aj[n] __ (aL[mlc~int[m]) and dj[n]__ (aL[m]~j, "r'j~n ~
"
(7.204)
As in Section 7.3.3, we verify that [{c)ijntn[m]}o
, ~f t ~~t/: - j ,int n[m]}L<j<J,O
is an orthonormal basis of C N. 7.5. I
Periodic Wavelets
A wavelet basis {~/)j,n}(j,n)CZ2of L2(R) is transformed into a wavelet basis of L2[0, 1] by periodizing each ~j,n. The periodization of f c Lz(R) over [0,1] is defined by +ec
/per(t) -
Z
f(t + k).
(7.205)
k--'-oo
The resulting periodic wavelets are if)per
j,n(t)
--
1
~~2
( t-2Jn+k ) 2J
For j < 0, there are 2 - j different ~per indexed by 0 < n < 2 -j. If the support j,n m of ~2j,n is included in [0,1] then ~)per j,n ( t ) - ~ j , n ( t ) for t C [0,1]. The restriction to [0, 1] of this periodization thus modifies only the boundary wavelets whose supports overlap t - - 0 or t = 1. As indicated in Figure 7.18, such wavelets are
7.5
WAVELETBASESON AN INTERVAL
283 / t I I
l l
~- t
FIGURE 7.18 The restriction to [0, 1] of a periodic wavelet ~per j,n has two disjoint components near t - 0 and t - 1. transformed into boundary wavelets which have two disjoint components near t = 0 and t - 1. Taken separately, the components near t = 0 and t -- 1 of these boundary wavelets have no vanishing moments, and thus create large signal coefficients, as we shall see later. The following theorem proves that periodic wavelets together with periodized scaling functions t~per j,n generate an orthogonal basis of L2[0,1].
Theorem 7.16 For any J <_ 0 [~f,//jper
t rj,n }-c~<j<J,O
.f q~per
, t
J,n}O
]
(7.206)
is an orthogonal basis of L2 [0, 1]. Proof 2. The orthogonality of this family is proved with the following lemma. Lemma 7.2 Let a(t),/9(t) E L2(R). If (a(t),/9(t + k)) - Ofor all k C Z then
f0
10~per(t)/~per(t)dt
0.
(7.207)
To verify (7.207) we insert the definition (7.205) of periodized functions: OLper (t) ~per (t)dt
=
=
]-i
c~(t) ~per ( t ) d t
~(,) 9(t + ~)dt - 0.
E k=--oo
Since [{l/)j,n}_cx~<j<_J,nEZ , {OJ,n}nEZ] is orthogonal in L2(R), we can verify that any two different wavelets or scaling functions o~per and/~per in (7.206) have necessarily a non-periodized version that satisfies (a(t),/3(t + k)) - 0 for all k E Z. Lemma 7.2 thus proves that (7.206) is orthogonal in L2[0, 1]. To prove that this family generates L2[0, 1], we extend f C L2[0, 1] with zeros outside [0,1] and decompose it in the wavelet basis of L2(~): J
f-
Z
+oo
Z
j = - ~ n=-oo
+oo
(f,~)j,n)~j,n-'l- Z
(f,~J,n)~)J,n.
(7.208)
n---oo
This zero extension is periodized with the sum (7.205), which defines fper (t) -- f(t) for t E [0, 1]. Periodizing (7.208) proves that f can be decomposed over the periodized wavelet family (7.206) in L 2 [0, 1]. I
284
CHAPTER VII
WAVELET BASES
Theorem 7.16 shows that periodizing a wavelet orthogonal basis ofL 2 (R) defines a wavelet orthogonal basis of L2 [0, 1]. I f J = 0 then there is a single scaling function, and one can verify that ~b0,0(t) = 1. The resulting scaling coefficient (f, ~b0,0) is the average of f over [0,1]. Periodic wavelet bases have the disadvantage of creating high amplitude wavelet coefficients in the neighborhood of t = 0 and t = 1, because the boundary wavelets have separate components with no vanishing moments. If f ( 0 ) ~ f(1), the wavelet coefficients behave as if the signal were discontinuous at the boundaries. This can also be verified by extending f E L2[0,1] into an infinite 1 periodic signal fper and by showing that
fO f(t),j,n(t)dt"t/)P.er f+cx~ fper(t)~/j,n(t)dt.
(7.209)
O(3
If f ( 0 ) ~ f ( 1 ) then fper (t) is discontinuous at t = 0 and t = 1, which creates high amplitude wavelet coefficients when Cj,n overlaps the interval boundaries. Periodic Discrete Transform For f E L2[0,1] let us consider
d)per ~ and dj[n]aj[n] -- (f,,j,n,
(f,
2/)per j,n,~.
We verify as in (7.209) that these inner products are equal to the coefficients of a periodic signal decomposed in a non-periodic wavelet basis:
aj[n] =
(fper, Oj,n) and
dj[n] =
(fper,@j,n).
The convolution formulas of Theorem 7.7 thus apply if we take into account the periodicity of fper. This means that aj[n] and dj[n] are considered as discrete signals of period 2 -j, and all convolutions in (7.107-7.109) must therefore be replaced by circular convolutions. Despite the poor behavior of periodic wavelets near the boundaries, they are often used because the numerical implementation is particularly simple. 7.5.2
Folded Wavelets
Decomposing f C L2[0, 1] in a periodic wavelet basis was shown in (7.209) to be equivalent to a decomposition of fper in a regular basis of L2(]~). Let us extend f with zeros outside [0,1]. To avoid creating discontinuities with such a periodization, the signal is folded with respect to t - 0: fo(t) - f(t)+ f(-t). The support of f0 is [-1, 1] and it is transformed into a 2 periodic signal, as illustrated in Figure 7.19
+c~ ff~
-- Z
k=-oo
+~
fo(t--
2k) -- Z
k=-cx~
+~
f(t-
2k)+ Z
k=-oo
f(2k-t).
(7.210)
Clearly ff~ = f(t) if t C [0, 1], and it is symmetric with respect to t = 0 and t = 1. If f is continuously differentiable then ffold is continuous at t = 0 and t = l, but its derivative is discontinuous at t = 0 and t = 1 if f ' (0) r 0 and f ( 1 ) r 0.
7.5
285
WAVELET BASES ON AN INTERVAL
, I
f(t)
,
I i
I
o
1
FIGURE 7.19 The folded signal ff~ and t - 1, and equal to f ( t ) on [0,1].
I I
is 2 periodic, symmetric about t - 0
Decomposing ffold in a wavelet basis {r ) (j,n)EZ2 is equivalent to decomposing f on a folded wavelet basis. Let ~/jfold v- j , n be the folding of Cj,n with the summation (7.210). One can verify that f01 f ( t ) , / , f p l d ( t ) d t w j ,rt
-- . / + c r ff~ (x~
"
(7.211)
Suppose that f is regular over [0,1]. Then ffold is continuous at t = 0, 1 and hence produces smaller boundary wavelet coefficients than fper. However, it is not continuously differentiable at t = 0, 1, which creates bigger wavelet coefficients at the boundary than inside. To construct a basis of L2[0,1] with the folded wavelets qhfold "~j,n, it is sufficient for ~p(t) to be either symmetric or antisymmetric with respect to t = 1/2. The Haar wavelet is the only real compactly supported wavelet that is symmetric or antisymmetric and which generates an orthogonal basis of L2(•). On the other hand, if we loosen up the orthogonality constraint, Section 7.4 proves that there exist biorthogonal bases constructed with compactly supported wavelets that are either symmetric or antisymmetric. Let {~j,n } (j,n)EZ 2 and {flyj, n } (j,n)CZ2 be such biorthogonal wavelet bases. If we fold the wavelets as well as the scaling functions then for J < 0 fold } [{2/)j,n , {A, - c r < j < J_ , O
_
,~fold }0
~ {WJ,n
(7.213)
If J -- 0 then ,.Afold V'0,0 __ ,~fold W0,0 __ 1" Biorthogonal wavelets of compact support are characterized by a pair of finite perfect reconstruction filters (h,/t). The symmetry of these wavelets depends on the symmetry and size of the filters, as explained in Section 7.4.2. A fast folded wavelet transform is implemented with a modified filter bank algorithm, where the treatment of boundaries is slightly more complicated than for periodic wavelets. The symmetric and antisymmetric cases are considered separately. Folded Discrete Transform
For f 6 L2[0, 1], we consider
aj[n] - ( f , 6/)f~ "rj,n / and dj[n] - ( f ~~t/~f~ "rj,n / 9
286
CHAPTERVII WAVELETBASES
We verify as in (7.211) that these inner products are equal to the coefficients of a folded signal decomposed in a non-folded wavelet basis"
aj[n] --
(ffold, Oj,n)
and
dj[n]
--
(ffold, 2/)j,n).
The convolution formulas of Theorem 7.7 thus apply if we take into account the symmetry and periodicity of ffold. The symmetry properties of 4) and ~ imply that aj[n] and dj[n] also have symmetry and periodicity properties, which must be taken into account in the calculations of (7.107-7.109). Symmetric biorthogonal wavelets are constructed with perfect reconstruction filters h and h of odd size that are symmetric about n - 0. Then 4) is symmetric about 0, whereas ~ is symmetric about 1/2. As a result, one can verify that aj[n] is 2 - j + ] periodic and symmetric about n - 0 and n - 2 -j. It is thus characterized by 2-J + 1 samples, for 0 < n < 2-J. The situation is different for dj In] which is 2 -j+l periodic but symmetric with respect to - 1/2 and 2 - j - 1/2. It is characterized by 2 - j samples, for 0 ___n < 2 -j. To initialize this algorithm, the original signal aL [n] defined over 0 < n < N - 1 must be extended by one sample at n - N, and considered to be symmetric with respect to n - 0 and n - N. The extension is done by setting aL [N] - aL I N - 1]. For any J < L, the resulting discrete wavelet representation [{dj}L<j<j,aj] is characterized by N + 1 coefficients. To avoid adding one more coefficient, one can modify symmetry at the fight boundary of aL by considering that it is symmetric with respect to N - 1/2 instead of N. The symmetry of the resulting aj and dj at the right boundary is modified accordingly by studying the properties of the convolution formula (7.162). As a result, these signals are characterized by 2 - j samples and the wavelet representation has N coefficients. This approach is used in most applications because it leads to simpler data structures which keep constant the number of coefficients. However, the discrete coefficients near the right boundary can not be written as inner products of some function f(t) with dilated boundary wavelets. Antisymmetric biorthogonal wavelets are obtained with perfect reconstruction filters h and h of even size that are symmetric about n - 1/2. In this case 4) is symmetric about 1/2 and ~ is antisymmetric about 1/2. As a result aj and dj are 2 -j+l periodic and respectively symmetric and antisymmetric about - 1 / 2 and 2 - J - 1/2. They are both characterized by 2-J samples, for 0 _< n < 2-J. The algorithm is initialized by considering that aL [n] is symmetric with respect to - 1/2 and N - 1/2. There is no need to add another sample. The resulting discrete wavelet representation [{dj}L<j<_j,aj] is characterized by N coefficients. ^
7.5.3
BoundaryWavelets 3
Wavelet coefficients are small in regions where the signal is regular only if the wavelets have enough vanishing moments. The restriction of periodic and folded "boundary" wavelets to the neighborhood of t - 0 and t - 1 have respectively 0 and 1 vanishing moment. These boundary wavelets thus cannot fully take advantage
7.5
287
WAVELET BASES ON AN INTERVAL
of the signal regularity. They produce large inner products, as if the signal were discontinuous or had a discontinuous derivative. To avoid creating large amplitude wavelet coefficients at the boundaries, one must synthesize boundary wavelets that have as many vanishing moments as the original wavelet ~. Initially introduced by Meyer, this approach has been refined by Cohen, Daubechies and Vial [ 134]. The main results are given without proofs. Multiresolution of L2[0, 1] A wavelet basis of L210, 1] is constructed with a multiresolution approximation {V~nt }-o~<j___0. A wavelet has p vanishing moments if it is orthogonal to all polynomials of degree p - 1 or smaller. Since wavelets at a scale 2 j are orthogonal to functions in --j V int , to guarantee that they have p vanishing moments we make sure that polynomials of degree p - 1 are inside V - - j int 9 We define an approximation space __j V int C L2[0, 1] with a compactly supported Daubechies scaling function 0, associated to a wavelet with p vanishing moments. Theorem 7.5 proves that the support of 0 has size 2 p - 1. We translate 0 so that its support is [ - p + 1, p]. Ata scale 2J < (2p) -1, there are 2-J - 2p scaling functions with a support inside [0, 1]"
/ t -2jn) int 1 d~j,n(t) - Oj,n(t) - - - ~ ~ 2J
for p < n < 2 - j - p .
To construct an approximation space --j V int of dimension 2 - j we add p scaling functions with a support on the left boundary near t - 0
~bint(t)_ j,n - -1~ rfileft(~j) ~.,,
for 0 < n < p ,
and p scaling functions on the right boundary near t -- 1"
~bint (t) j,n
1 cfiright - - ~ ,e.2_J_l_
n
(t-I) ~
for 2 -j - p <_ n < 2 -j
The following proposition constructs appropriate boundary scaling functions {Olneft}O_
Proposition 7.6 (COHEN, DAUBECHIES, VIAL) One can construct boundary scaling functions d) left a n d q~2ght s o that if 2 -j > 2p "r n -normal basis of a space -V- j int satisfying
then
{~int r j,n
}0
vint j C - vint -j-1 - lo~2p) lim V int -- Closure j-+-oc --J
j=-oc
) V int --J
-- L 2[0, 1]
and the restrictions to [0 1] of polynomials of degree p - 1 are in -V- j int 9
CHAPTER VII
288
WAVELET BASES
Proof 2. A sketch of the proof is given. All details can be found in [134]. Since the wavelet ~ corresponding to q5has p vanishing moments, the Fix-Strang condition (7.75) implies that +~
qk(t) = ~
(7.214)
n k ~ ( t - n)
n=--(x3
is a polynomial of degree k. At any scale 2J, qk(2-Jt) is still a polynomial of degree k, and for 0 <_ k < p this family defines a basis of polynomials of degree p - 1. To guarantee that polynomials of degree p - 1 are in V~ t we impose that the restriction of qk(2-Jt) to [0,1] can be decomposed in the basis of -Vi. - j ~t"9 d
p-1
qk(2-Jt)l[o,1](t)
=
2-J--p--1
~-~a[n]c~left(2-Jt)+ ~ n=0
nkcb(Z-Jt-n)+
n=p
p-1
Z b[n] q~ght( 2 - J t - 2-J).
(7.215)
n=0
Since the support of q5 is [ - p + 1, p], the condition (7.215) together with (7.214) can be separated into two non-overlapping left and fight conditions. With a change of variable, we verify that (7.215) is equivalent to p
p-1
n k (9(t-n)1[0,+~) (t) -- Za[n]~left(t), and
(7.216)
n=0
n---p-4-1
p--1
p--1
n k q~(t- n) 1(_or n=-p
(t) -- Z
b[n] ~nright(t).
(7.217)
n--0
The embedding property V - - jintc V - - j~pt - 1 is obtained by imposing that the boundary scaling functions satisfy scaling equations. We suppose that 4~~efthas a support [0, p + n] and satisfies a scaling equation of the form p-1
p+2n
2 - , / 2 d)left ( 2 - 1 t ) __ ~ rn
~.,r L/leftl ~)l/eft(t)+ Z l=0
left hn, m~(t-m) '
(7.218)
m=p
whereas ~b~ght has a support [ - p - n, 0] and satisfies a similar scaling equation on /_/fight and hn, fight the fight. The constants L/left "'n,/, hleft --,,,m, "',,,1 m are adjusted to verify the polynomial reproduction equations (7.216) and (7.217), while producing orthogonal scaling vint 9 functions. The resulting family ~f~int t ' r j,n }0_
289
7.5 WAVELETBASESON AN INTERVAL
Wavelet Basis of L 2[0,1 ] Let W- - jint be the orthogonal complement of _Vjint in -vint j - 1. The support of the Daubechies wavelet ~ with p vanishing moments is [ - p + 1, p]. Since ~j,n is orthogonal to any ~ j , l , we verify that an orthogonal basis of .W. j int can be constructed with the 2 - j - 2p inside wavelets with support in [0,1]" ~int
1
j,n(t) -- ~)j,n(t) -- - - ~ ~3
(t--2Jn) 2J
for p _< n < 2 - j -- p,
to which are added 2p left and fight boundary wavelets
int ~j,n(t) int ( t ) =
j,n
1
--~
--
1 ~/)eft( ~ j ) --~~'n
/,right
for 0 <_ n < p ,
(t--l)
"r2-J-l-n
for 2 - j - p _< n < 2 - j .
7
Since __jW int C --j-l,vint the left and fight boundary wavelets at any scale 2 j can be expanded into scaling functions at the scale 2 j-1. For j - 1 we impose that the left boundary wavelets satisfy equations of the form
1 ~d)eft ( l ) =Z "rn
p- 1
p+2n
t''-left "hleft Z Un,l WI (t) +
-left
~n,m r
m)
(7.219)
.
The fight boundary wavelets satisfy similar equations. The coefficients
Gright fight are computed so that n,l , gn,m
~n,lmleft'gn,m,-left
is an orthonormal basis of wint __s . Table 7.5 gives the values of these coefficients for p - 2. For any 2 J _< (2p) -1 the multiresolution properties prove that t~j,n~f'd)nt}0_
L 2 [0,1] - vint
J
W int
which implies that [{ ~.int )
WJ,nfO
,
?/~int
(7.220)
{ ~-j,n.-oo<j<J,O
is an orthonormal wavelet basis of L2[0,1]. The boundary wavelets, like the inside wavelets, have p vanishing moments because polynomials of degree p - 1 are included in the space vif t. Figure 7.20 displays the 2 p - 4 boundary scaling functions and wavelets.
Fast Discrete Algorithm
aj[n] -- (f,
For any f E L2[0,1] we denote
d~ "r int j,n ) and
dj[n] -- (f, 7/jint "rj,n/~ for 0 < __ n < N 2-j
9
Wavelet coefficients are computed with a cascade of convolutions identical to Theorem 7.7 as long as filters do not overlap the signal boundaries. A Daubechies filter h is considered here to have a support located at [ - p + 1, p]. At the boundary, the usual Daubechies filters are replaced by the boundary filters that relate the boundary wavelets and scaling functions to the finer-scale scaling functions in (7.218) and (7.219).
WAVELET BASES CHAPTER VII
k 0 0 1 1 k -2 -2 -1 -2
l 0 1 0 1 1
-2 -1 -2 -1
HfP 0.6033325119 0.690895531 0.03751746045 0.4573276599
HF
0.1901514184 -0.1942334074 0.434896998 0.8705087534 h[-lI 0.482962913145
GF:t
-0.7965436169 0.5463927 140 0.01003722456 0.1223510431
Gy
-0.3639069596 0.3717189665 0.8014229620 -0.2575129195 h PI 0.8365 16303738
k 0 1 1 1
m 2 2 3 4
k
m
-2 -2 -2 -1
-5 -4 -3 -3
h!$, -0.398312997 0.8500881025 0.2238203570 -0.1292227434
left gk,m
-0.2587922483 0.227428117 -0.8366028212 0.4830129218 right gk,m
hp,h' 0.4431490496 0.7675566693 0.3749553316 0.2303890438
0.235575950 0.4010695194 -0.7175799994 -0.5398225007
h[lI 0.224143868042
h PI -0.129409522551
~,~0
Table 7.5 Left and right border coefficients for a Daubechies wavelet with p = 2 vanishing moments. The inside filter coefficients are at the bottom of the table. A table of coefficients for p 2 2 vanishing moments can be retrieved over the Internet at the FTP site ftp://math.princeton.edu/pub/user/ingrid/interval-tables.
7.5
r
291
WAVELET BASES ON AN INTERVAL
(t)
r
r
(t) 1
1. t
0.5
(t)
r
I
I 0.8
0.5
0.6 0.4
0
(t)
0.2 0
1'
05 '
' 15
-0.
2
-0.
r
4eft(t) .
.
.
.
0:~
right
(t) .
.
.
1
05
0
~;lght (t)
if)o (t) 1 .
2
15
.
i
,
.
.
15
i
05
1 0
0
0
-
FIGURE 7.20
2
i
o
~
Boundary scaling functions and wavelets with p -
0
2 vanishing
moments. 7.17 (COHEN, DAUBECHIES, VIAL) IfO<_k
Theorem
p- 1 oj[k]
--
p+2k
E "'k,l l'/left a j-l[1] + E / , , l,,k,maj-l[m], eft /=0 m--p p- 1
p+2k
Z (71eft Uk, l a j - l [1] nt- Z gk,maj-l[m]. _left /--0 m--p
dj[k]-
Ifp
aj[k]
-
E
h[l - 2k]aj_l[/],
l----~ +oc
dj[k]
-
E
g[l - 2klaj-,[/].
l-----~
If-p<_k
<0 -1 Z /4right
aj[Z-J+k]-
dj [2-j -+-k]
"'k,l aj-1
-
l=-p -1
[2 -j+l
~ , (-fight "-'k,t aj_l [2-J+l
l---p
+ l] +
-p-1
/aright
[2 -j+l
E + m] ""k,m a j-1 m---p+2k+ 1 -p-1 + l] -'~ Z ,gright... k,m u j_ 1 [2-J+l -~-m m--- p+2k+ 1
This cascade algorithm decomposes aL into a discrete wavelet transform [aj, {dj}L<j<j] with O(N) operations. The maximum scale must satisfy 2 J _<
292
CHAPTER VII
WAVELET BASES
(2p) -1, because the number of boundary coefficients remains equal to 2p at all scales. The implementation is more complicated than the folding and periodic algorithms described in Sections 7.5.1 and 7.5.2, but does not require more computations. The signal aL is reconstructed from its wavelet coefficients, by inverting the decomposition formula in Theorem 7.17. Theorem 7.18 (COHEN, DAUBECHIES,VIAL)
IfO<_l<_p-1 p-1
p-1
[I] -- ~..r X---'/._/leftaj[k] + E (2-1eft a j-1 Uk, l dj[k]. k=0 k=0
Ifp<_l<_3p-2 aj_,[l]
p-1 Z
=
/,,left
+oo
h[1- 2k] aj[k] +
"'k,l aj[k] + Z
k=(l-p)/2
k=-~
p-1
+oo
Z
_left dj[k]--]-- Z ,~k,l
k=(l-p) /2
g [l -
2k]dj[k].
k=-c~
If 3 p - 1 <_1 <_2 - j + l - 3p aj_, [/1 -- Z
h[1- 2k] aj[k] + Z
k=-cxD
If-p-
g[l - 2k] dj[k].
k=-oo
1 ~ 1> -3p + 1
aj_l[2 -j+l +l]
(l+p-1) /2
=
Z
'*k,l
k=-p (l+p-1)/2 Z k=-p
/,right
+cx~
aJ[2-j + k] + Z
h[1- 2k] aj[2 -j + k] +
k=-~ +c~
gright k,l dJ[2-j + k] + Z
g [l - 2k] dj [2-j + k].
k=-~
If - l >_l>_-p -1
-1 .right "*k,l aJ[2-j + k] + Z (;.right "'k,l dj[2-J + k] 9
k=-p
k=-p
aj-1 [2 -j+l + l] -- Z
The original signal aL is reconstructed from the orthogonal wavelet representation [aj, {dj}L<j<j] by iterating these equations for L < j _<J. This reconstruction is performed with O(N) operations.
7.6 MULTISCALEINTERPOLATIONS
7.6
2
293
MULTISCALE I N T E R P O L A T I O N S 2
Multiresolution approximations are closely connected to the generalized interpolations and sampling theorems studied in Section 3.1.3. The next section constructs general classes of interpolation functions from orthogonal scaling functions and derives new sampling theorems. Interpolation bases have the advantage of easily computing the decomposition coefficients from the sample values of the signal. Section 7.6.2 constructs interpolation wavelet bases. 7.6. I
Interpolation and Sampling Theorems
Section 3.1.3 explains that a sampling scheme approximates a signal by its orthogonal projection onto a space UT and samples this projection at intervals T. The space UT is constructed so that any function in UT can be recovered by interpolating a uniform sampling at intervals T. We relate the construction of interpolation functions to orthogonal scaling functions and compute the orthogonal projector on UT. We call interpolation function any 05 such that { r n)}ncZ is a Riesz basis of the space U1 it generates, and which satisfies 1 0
r
if n - - 0 if n # 0 "
(7.221)
Any f C U1 is recovered by interpolating its samples f(n): -~-oo
f (t) -- Z
f (n) r
- n).
(7.222)
n----oo
Indeed, we know that f is a linear combination of the basis vector { r and the interpolation property (7.221) yields (7.222). The Whittaker sampling Theorem 3.1 is based on the interpolation function r
=
sin 7rt 7rt
In this case, the space U1 is the set of functions whose Fourier transforms are included in [-Tr, 7r]. Scaling an interpolation function yields a new interpolation for a different sampling interval. Let us define Or(t) - r and UT = { f C L2(N) with f(Tt) E U1 }. One can verify that any f CUT can be written -~-oo
f (t) = y ~ f (nT) r n-- ~oo
- nT) .
(7.223)
294
CHAPTER Vll
WAVELET BASES
Scaling Autocorrelation We denote by ~bo an orthogonal scaling function, defined by the fact that {Cbo(t- n)}n~z is an orthonormal basis of a space V0 of a multiresolution approximation. Theorem 7.2 proves that this scaling function is characterized by a conjugate mirror filter ho. The following theorem defines an interpolation function from the autocorrelation of ~o [302]. T h e o r e m 7.19 Let ~o(t) - ~o(-t) and [to[n]- ho[-n]. Iwl) -1) then -+-c~
(p(t) --
f
If I~o(~)1- o ( ( 1 + (7.224)
C~o(U)~o(U-t)du- C~o*~o(t) co
is an interpolation function. Moreover -3I-0(3
( 9 ( 2 ) -- ~
(7.225)
h[n]c~(t-n)
n----:x~
with
--~--oo
h[n] -- Z
(7.226)
ho[m] ho[m - n] - ho * ho[n].
m---cxD
Proof 3. Observe first that d?(n) -- (C~o(t),C~o(t- n)) = c~[n], which prove the interpolation property (7.221). To prove that {q~(t- n)}nEZ is a Riesz basis of the space U1 it generates, we verify the condition (7.10). The autocorrelation ~(t) = ~o * ~o(t) has a Fourier transform ~(w) --]~bo(C~)]2. Condition (7.10) thus means that there exist A > 0 and B > 0 such that V~ ~ [-Tr, Tr]
1
+oo
~ < ~
1
1@o(~-2kTr)l 4 < ,,--
(7.227)
k---cx~
We proved in (7.19) that the orthogonality of a family {C~o(t- n)}ncZ is equivalent to -q- cxD
w c [-~, ~],
~
I~o(~+ 2~)1 ~ = 1.
(7.228)
k---~
The right inequality of (7.227) is therefore valid for A - 1. Let us prove the left inequality. Since I~o(~)1- o((1 + I~j)-~), one can verify that there exists K > 0 such that for all w E [-Tr, Tr], ~-]~tkl>r14~o(W+ 2kTr)l2 < 1/2, so (7.228) implies that
Ek~-K I~o(~ +2kTr)l2 ->
1/2. It follows that logo(c~-q-2kTr) 14
k=-K
which proves (7.227) for B = 4(2K + 1).
4(2K + 1)'
7.6 MULTISCALEINTERPOLATIONS
295
Since q$o is a scaling function, (7.28) proves that there exists a conjugate mirror filter ho such that 1
+~
t
n----do
Computing ~b(t) - q$o* ~o(t) yields (7.225) with h[n] - ho * ho[n].
II
Theorem 7.19 proves that the autocorrelation of an orthogonal scaling function q$o is an interpolation function 4> that also satisfies a scaling equation. One can design ~ to approximate regular signals efficiently by their orthogonal projection in UT. Definition 6.1 measures the regularity of f with a Lipschitz exponent, which depends on the difference between f and its Taylor polynomial expansion. The following proposition gives a condition for recovering polynomials by interpolating their samples with q$. It derives an upper bound for the error when approximating f by its orthogonal projection in UT. Proposition 7.7 (FIx, STRANG) Any polynomial q(t) of degree smaller or equal
to p - 1 is decomposed into -t-OO
q(t) -- Z
q(n) qb(t- n)
(7.229)
n~--o(3
if and only if h(co) has a zero of order p at aJ - 7r. Suppose that this property is satisfied. If f has a compact support and is uniformly Lipschitz a <_ p then there exists C > 0 such that VT > 0 , I I f -
Purfll
~< C T ~
(7.230)
Proof 3. The main steps of the proof are given, without technical detail. Let us set T = 2 j. One can verify that the spaces {Vj = U2J }jcz define a multiresolution approximation of L2(N). The Riesz basis of V0 required by Definition 7.1 is obtained with 0 = q$. This basis is orthogonalized by Theorem 7.1 to obtain an orthogonal basis of scaling functions. Theorem 7.3 derives a wavelet orthonormal basis {~j,n}(j,n)cZ2 of L2(R). Using Theorem 7.4, one can verify that ~ has p vanishing moments if and only if kt(~) has p zeros at 7r. Although q$is not the orthogonal scaling function, the Fix-Strang condition (7.75) remains valid. It is thus also equivalent that for k < p -4-oo
q~(t) -- Z
nk c~(t- n)
n----dO
is a polynomial of degree k. The interpolation property (7.222) implies that qk (n) -- nk for all n E Z so qk(t) = t k. Since {t k}0
296
CHAPTER Vll
WAVELET BASES
We indicate how to prove (7.230) for T = 2j. The truncated family of wavelets is an orthogonal basis of the orthogonal complement of U2j = Vj in L2 (/~). Hence
{r
j
+cr
IIf- eu=jfll 2 = ~
~
I12.
1=-cr162
If f is uniformly Lipschitz c~, since ~ has p vanishing moments, Theorem 6.3 proves that there exists A > 0 such that
IWf(2ln,21)[ = I(f ,r
<-A2(~+1/2)1.
To simplify the argument we suppose that ~ has a compact support, although this is not required. Since f also has a compact support, one can verify that the number of non-zero (f, ~l,,,) is bounded by K 2 -I for some K > 0. Hence
J KA 2 Ilf -Pu2jfll 2 < Y ~ K2-1A22(2a+l)t < ~ 2 2 a J , _
1=-or
_
1
_
2-,~
which proves (7.230) for T = 2j. As long as c~ _< p, the larger the Lipschitz exponent c~the faster the error I]f- PUTfll decays to zero when the sampling interval T decreases. If a signal f is C k with a compact support then it is uniformly Lipschitz k, so Proposition 7.7 proves that
IIf --PUTf[[ < C T k. Example 7.12 A cubic spline interpolation function is obtained from the linear spline scaling function ~bo. The Fourier transform expression (7.5) yields
I o(W)12 =
48sin4(w/2)
(1 -~-2 COS2(W/2)) "
(7.231)
Figure 7.21 (a) gives the graph of ~b, which has an infinite support but exponential decay. With Proposition 7.7 one can verify that this interpolation function recovers polynomials of degree 3 from a uniform sampling. The performance of spline interpolation functions for generalized sampling theorems is studied in [ 123,335].
Example 7.13 Deslaurier-Dubuc [155] interpolation functions of degree 2 p - 1 are compactly supported interpolation functions of minimal size that decompose polynomials of degree 2 p - 1. One can verify that such an interpolation function is the autocorrelation of a scaling function ~bo. To reproduce polynomials of degree 2p - 1, Proposition 7.7 proves that ~t(w) must have a zero of order 2p at 7r. Since h[n] = ho * ho[n] it follows that ~t(w) = Iho@)l2, and hence kto(~O) has a zero of order p at 7r. Daubechies's Theorem 7.5 designs minimum size conjugate mirror filters ho which satisfy this condition. Daubechies filters ho have 2p non-zero coefficients and the resulting scaling function ~bo has a support of size 2 p - 1. The
7.6
MULTISCALEINTERPOLATIONS
0.5
297
0.5
-2
(a)
o
(b)
FIGURE 7.21 (a): Cubic spline interpolation function. (b): Deslaurier-Dubuc interpolation function of degree 3. autocorrelation q5 is the Deslaurier-Dubuc interpolation function, whose support is [ - 2 p + 1 , 2 p - 1]. For p = 1, 4~o = l[0,1] and 4~ is the piecewise linear tent function whose support is [-1,1]. For p = 2, the Deslaurier-Dubuc interpolation function 4~ is the autocorrelation of the Daubechies 2 scaling function, shown in Figure 7.10. The graph of this interpolation function is in Figure 7.21(b). Polynomials of degree 2 p - 1 -- 3 are interpolated by this function. The scaling equation (7.225) implies that any autocorrelation filter verifies h[2n] = 0 for n ~ 0. For any p ___0, the non-zero values of the resulting filter are calculated from the coefficients of the polynomial (7.173) that is factored to synthesize Daubechies filters. The support of h is [ - 2 p + 1,2p - 1] and 2p-1
h [ 2 n + l ] = ( - 1 ) p-n
1-Ik=0 (k - p + 1/2) (n + 1/2) (p - n - 1)! (p + n)!
f o r - p < n < p. (7.232)
Dual Basis If f ~ UT then it is approximated by its orthogonal projection PuT f on UT before the samples at intervals T are recorded. This orthogonal projection is computed with a biorthogonal basis { ~ r ( t - nT)}n~Z, which is calculated by the following theorem [75]. Theorem 7.20 Let r be an interpolation function. We define r to be the function
whose Fourier transform is ~b(co) =
+o~
12
(7.233)
Let ~r(t) - T-I~(T-lt). Then the family {~r(t-nT)}neZ is the biorthogonal basis of {c~r(t - nT) }nEZ in UT. Proof3. Let us set T = 1. Since ~(~) = a(~) ~(~),
(7.234)
298
CHAPTER VII
WAVELET BASES
1 0.5 0 -10
-5
0
5
10
FIGURE 7.22 The dual cubic spline ~(t) associated to the spline interpolation function qS(t) shown in Figure 7.21(a).
where a(co) E L2[-Tr, 7r] is 27r periodic, we derive as in (7.12) that ~ E U1 and hence that ~ ( t - n) E U1 for any n E_ Z. A dual Riesz basis is unique and characterized by biorthogonality relations. Let qS(t) = qS(-t). For all (n,m) E Z 2, we must prove that
(O(t-n),~(t-m)) - ~,q)(n-m) - (~[n-m]. Since the Fourier transform of ~ * ~ ( t ) i s r biorthogonality conditions (7.235) yields
the Fourier transform of the
"qLO0
~..
Z
~(~ + 2kTr)~* (co + 2kTr) - 1.
k---o~
(7.235)
This equation is clearly satisfied for ~bdefined by (7.233). The family {~(t- n)},ez is therefore the dual Riesz basis of {qS(t- n)}neZ- The extension for any T > 0 is easily derived. I Figure 7.22 gives the graph of the cubic spline ~ associated to the cubic spline interpolation function. The orthogonal projection of f over UT is computed by decomposing f in the biorthogonal bases Jl-O0
Puff(t) -- Z
(f(u), ~r(u - nr)) C r ( t - nr).
(7.236)
n---oo
Let ~br(t ) - ~ r ( - t ) . The interpolation property (7.221)implies that
Pu~f(nT)- ( f ( u ) , ~ r ( u - n T ) ) - f *r
(7.237)
This discretization of f through a projection onto UT is therefore obtained by a filtering with q5T followed by a uniform sampling at intervals T. The best linear approximation of f is recovered with the interpolation formula (7.236).
7.6
7.6.2
MULTISCALEINTERPOLATIONS
299
Interpolation Wavelet Basis 3
An interpolation function ~b can recover a signal f from a uniform sampling {f(nT) }ncZ if f belongs to an appropriate subspace UT of Lz(R). Donoho [162] has extended this approach by constructing interpolation wavelet bases of the whole space of uniformly continuous signals, with the sup norm. The decomposition coefficients are calculated from sample values instead of inner product integrals. Subdivision S c h e m e Let ~bbe an interpolation function, which is the autocorrelation of an orthogonal scaling function ~bo. Let ~Pj,n(t) - ( ~ ( 2 - J t - n). The constant 2 -j/2 that normalizes the energy of Oj,n is not added because we shall use a sup norm Ilfl[~ - s l l p t c R If(t)[ instead of the Lz(R) norm, and
[l~j,nll~- I1 11 - I (0)1-1. We define the interpolation space Vj of functions -~-OO
g= Z
a[n](gj,n,
tl~--CX3
where a[n] has at most a polynomial growth in n. Since q5 is an interpolation function, a[n]- g(2Jn). This space Vj is not included in L2(•) since a[n] may not have a finite energy. The scaling equation (7.225) implies that V j+I C V j for any j E Z. If the autocorrelation filter h has a Fourier transform h(~) which has a zero of order p at ~ - 7r, then Proposition 7.7 proves that polynomials of degree smaller than p - 1 are included in Vj. For f ~ V j, we define a simple projector on V j that interpolates the dyadic samples f (2Jn)" +~
Pvjf(t) - ~
f ( U n ) ~ b j ( t - Un).
(7.238)
/'/--- --0<3
This projector has no orthogonality property but satisfies Pv j f (2 Jn) -- f (2 J n). Let Co be the space of functions that are uniformly continuous over R. The following theorem proves that any f E Co can be approximated with an arbitrary precision by Pvjf when 2 j goes to zero. Theorem 7.21 (DONOHO) Suppose that (9 has an exponential decay. If f E Co
then lira I I f - P v j f l l ~ - lira sup If(t) - evjf(t)l - o. j--+-~ j--+-c~ tr~
(7.239)
Proof 3. Let ~(cS,f) denote the modulus of continuity co(a, f) = sup sup [f(t + h) - f(t)l. Ihl<6 tcR
(7.240)
CHAPTER Vll
~00
WAVELET BASES
By definition, f E Co if limco(a, f ) = 0. 6-+0
Any t E IR can be written t - 2j (n + h) with n E Z and Ihl _< 1. Since Pvjf(2Jn) --
f(2Jn), Jf (2J (n + h)) - Pv, f (2J(n + h)) I <__ Jf(2J(n+h))- f(2Jn)J + JPv, f(2 j (n + h)) - Pv, f(2Jn)l <_ co(2J,f) +co(2J,Pvjf). The next lemma proves that co(2J,Pvjf) < C, co(2J,f) where C, is a constant independent of j and f. Taking a sup over t - 2j (n + h) implies the final result:
s u p j f ( t ) - P v j f ( t ) J <_ (1 + C , ) w ( U , f ) --+ 0 when j ~ -oo. tEN
Lemma 7.3 There exists Cep > 0 such that for all j E Z and f E Co co(2a,Pvjf) < C, co(U,f).
(7.241)
Let us set j -- 0. For Ihl _< 1, a summation by parts gives +oo
Pvof(t+h)-Pvof(t) = Z
(f(n+ 1)-f(n))Oh(t--n)
rl----oo
where
+c~
Oh(t) -- Z
(dp(t + h - k) - c~(t- k)) .
k--I
Hence +~
IPvof(t+h)-Pvof(t)l < s u p l f ( n + 1 ) - f ( n ) l ~ nEZ
IOh(t-n)l .
(7.242)
n---oo
Since 4~has an exponential decay, there exists a constant C~ such that if Ihl < 1 and t E IR then Y~'~n=-ooIOh(t -- n)l < Ce. Taking a sup over t in (7.242) proves that co(1,Pv0f) < C e s u p l f ( n + 1 ) - f ( n ) l < Cea~(1,f). nEZ
Scaling this result by 2J yields (7.241).
II
Interpolation Wavelets The projection P v j f ( t ) interpolates the values f(2Jn). When reducing the scale by 2, we obtain a finer interpolation P v j _ l f ( t ) which also goes through the intermediate samples f(2J(n + 1/2)). This refinement can be obtained by adding "details" that compensate for the difference between P v j f ( 2 J ( n + 1/2)) and f(2J(n + 1/2)). To do this, we create a "detail" space W j that provides the values f ( t ) at intermediate dyadic points t - 2J(n + 1/2). This space is constructed from interpolation functions centered at these locations, namely ~bj_],2n+ 1. We call interpolation wavelets ~3j,n
--
~j-l,2n+l
9
7.6 MULTISCALEINTERPOLATIONS
301
Observe that ~bj,n(t) -- ~b(2-Jt- n) with g a ( t ) - q~(2t- I ) . The function ~b is not truly a wavelet since it has no vanishing moment. However, we shall see that it plays the same role as a wavelet in this decomposition. We +oo define W j to be the space of all sums Y2-n=-oo a[n] ~bj,n. The following theorem proves that it is a (non-orthogonal) complement of Vj in V j_l.
Theorem 7.22 For any j E Z Vj-I
=VjOWj
.
If f E V j_ 1 then +oo
f -- Z
+oo
f(2Jn)~j,n
qt_ Z dj[n] ~3j,n
n=-oo
n=-oo
with dj[n] - f (2J (n + 1 / / 2 ) ) - P v , f (2J (n + 1 / 2 ) ) .
(7.243)
Proof 3. Any f E V j_ 1 can be written +(2O
f = Z
f(2J-'n)CJ-',""
n--- --(x)
The function f - Pvjf belongs to Vj-1 and vanishes at {2Jn},,~z. It can thus be decomposed over the intermediate interpolation functions 4}j-~,2n+~ = ~j,n" --~ {x)
f ( t ) - Pv, f ( t ) = Z n=
dj[n] ~j,n(t) E W j . --oo
This proves that Vj_~ c Vj | Wj. By construction we know that Wj C Vj_ 1 so Vj_I = Vj | Wj. Setting t = 2 j-1 (2n + 1) in this formula also verifies (7.243). II Theorem 7.22 refines an interpolation from a coarse grid 2Jn to a finer grid 2J-in by adding "details" whose coefficients dj[n] are the interpolation errors f(2J(n + 1/2)) - Pvjf(2 j (n + 1/2)). The following theorem defines a interpolation wavelet basis of Co in the sense of uniform convergence.
Theorem 7.23 If f E Co then m
lim Ilf - Z m--+--]-oo t-~-~
n=-m
J
f(2Jn)~b,,,, - ~
m
Z
j=l n=-m
dj[n] ~bj,,,[[oo = O.
(7.244)
CHAPTER Vll
~02
WAVELET BASES
The formula (7.244) decomposes f into a coarse interpolation at intervals 2 J plus layers of details that give the interpolation errors on successively finer dyadic grids. The proof is done by choosing f to be a continuous function with a compact support, in which case (7.244) is derived from Theorem 7.22 and (7.239). The density of such functions in Co (for the sup norm) allows us to extend this result to any f in Co. We shall write +c~
J
f - Z
+~
f(2Jn)CJ,,, + Z
n=-oc
Z
dj[n] ~?j,n,
j---c~ n--oc
which means that [{r {r is a basis of Co. In L2 (I~), "biorthogonal" scaling functions and wavelets are formally defined by
f ( 2 J n ) - (f ,$j ,~ ) -
f(t)$j,,(t)dt, (x)
dj[n] - (f , ~2j,n) ~
f (t) Cj,n(t) dt .
(x) L +~176
(7.245)
~
Clearly Sj,n(t) - (5(t- 2Jn). Similarly, (7.243) and (7.238)implies that Cj,,, is a finite sum of Diracs. These dual scaling functions and wavelets do not have a finite energy, which illustrates the fact that [{r {r is not a Riesz basis of L2(IR). If h(a~) has p zeros at 7r then one can verify that ~j,,~ has p vanishing moments. With similar derivations as in the proof of (6.20) in Theorem 6.4, one can show that if f is uniformly Lipschitz a _< p then there exists A > 0 such that
I(f ,@j,n)] = [dj[n]l <- e2aJ. A regular signal yields small amplitude wavelet coefficients at fine scales. We can thus neglect these coefficients and still reconstruct a precise approximation of f . Fast Calculations The interpolating wavelet transform of f is calculated at scale 1 _> 2 j > N -1 -- 2 L from its sample values {f(N-ln)}n~Z. At each scale 2 j, the values of f in between samples {2Jn}nez are calculated with the interpolation (7.238): +oe k=-c~
=
Z
f(2Jk)hi[n - k],
(7.246)
k=-oe
where the interpolation filter (7.226)"
hi
is a subsampling of the autocorrelation filter h in
hi[n] = r
+ 1/2) - h[Zn + 1].
(7.247)
7.7 SEPARABLEWAVELET BASES
303
The wavelet coefficients are computed with (7.243):
The reconstruction of f(N-ln) from the wavelet coefficients is performed recursively by recovering the samples f(2J-ln) from the coarser sampling f(2Jn) with the interpolation (7.246) to which is added dj[n]. If hi In] is a finite filter of size K and if f has a support in [0,1] then the decomposition and reconstruction algorithms require KN multiplications and additions. A Deslauriers-Dubuc interpolation function 4> has the shortest support while including polynomials of degree 2 p - 1 in the spaces V j. The corresponding interpolation filter hi[n] defined by (7.247) has 2p non-zero coefficients for - p < n < p, which are calculated in (7.232). If p - 2 then hi[l] - hi[-2] - - 1 / 1 6 and hi[0] - hi[-1] - 9/16. Suppose that q(t) is a polynomial of degree smaller or equal to 2p - 1. Since q - Pvjq, (7.246) implies a Lagrange interpolation formula
q(2J(n+ l/2)) - E
q(2Jk)hi[n-k] "
k---~ The Lagrange filter hi of size 2p is the shortest filter that recovers intermediate values of polynomials of degree 2p - 1 from a uniform sampling. To restrict the wavelet interpolation bases to a finite interval [0,1] while reproducing polynomials of degree 2 p - 1, the filter hi is modified at the boundaries. Suppose that f(N -1 n) is defined for 0 <_ n < N. When computing the interpolation
+co
Pvjf (2 j (n-'l- l /2)) -- Z f (2Jk) hi[rl - k]' k---do if n is too close to 0 or to 2 -j - I then hi must be modified to ensure that the support of hi[n-k] remains inside [ 0 , 2 - J - 1]. The interpolation Pvjf(2J(n + 1/2)) is then calculated from the closest 2p samples f(2Jk) for 2Jk E [0, 1]. The new interpolation coefficients are computed in order to recover exactly all polynomials of degree 2 p - 1 [324]. For p - 2, the problem occurs only at n - 0 and the appropriate boundary coefficients are hi[0]-
6
15 -5 1 , h i [ - 1 ] - -i-6' h i [ - 2 ] - -]-6-' h ~ [ - 3 ] - ]--6.
The symmetric boundary filter 7.7
hi I-n]
is used on the other side at n - 2-J - 1.
SEPARABLE WAVELET BASES 1
To any wavelet orthonormal basis {~j n}(j n)CZ 2 of L2(]~), one can associate a separable wavelet orthonormal basis of'L 2 ( ~ )2:
( Cjl,n, (Xl)r
(X2) } (jl,jz,nl,nz)6Z4"
(7.248)
304
CHAPTER VII WAVELETBASES
The functions 2/)jl,n , (X1) 2/)jz,n 2 (X2) mix information at two different scales 2J' and 2 j2 along Xl and x2, which we often want to avoid. Separable multiresolutions lead to another construction of separable wavelet bases whose elements are products of functions dilated at the same scale. These multiresolution approximations also have important applications in computer vision, where they are used to process images at different levels of details. Lower resolution images are indeed represented by fewer pixels and might still carry enough information to perform a recognition task. Signal decompositions in separable wavelet bases are computed with a separable extension of the filter bank algorithm described in Section 7.7.3. Non-separable wavelets bases can also be constructed [78,239] but they are used less often in image processing. Section 7.7.4 constructs separable wavelet bases in any dimension, and explains the corresponding fast wavelet transform algorithm.
7.7. I
Separable Multiresolutions
As in one dimension, the notion of resolution is formalized with orthogonal projections in spaces of various sizes. The approximation of an image f(xl ,x2) at the resolution 2-J is defined as the orthogonal projection of f on a space V 2 that is included in L 2(]1~2 ). The space Vj2 is the set of all approximations at the resolution 2 -j. When the resolution decreases, the size of V 2 decreases as well. The formal definition of a multiresolution approximation { V j }2j E x of L2(~ 2) is a straightforward extension of Definition 7.1 that specifies multiresolutions of L2(I~). The same causality, completeness and scaling properties must be satisfied. We consider the particular case of separable mulfiresolufions. Let {Vj}jE Z be a multiresolution of L2(~). A separable two-dimensional multiresolution is composed of the tensor product spaces Vj2 -- Vj | Vj .
(7.249)
The space V j2 is the set of finite energy functions f(xl ,x2) that are linear expansions of separable functions: +cr
f(xl,x2) -
Z
a[m]fm(xl)gm(X2) with fm C Vj , gm E Vj .
m=-c~
Section A.5 reviews the properties of tensor products. If {Vj}j~z is a multiresolution approximation of L2(I~) then {V~}j~z is a multiresolution approximation of L2 (I1~2). Theorem 7.1 demonstrates the existence of a scaling function ~b such that {c~j,m}m~Z is an orthonormal basis of Vj. Since V~ - Vj | Vj, Theorem A.3 proves that for x = (Xl,X2) and n = (nl,n2)
1
- 2Jnl
X2
--
2Jn2 )
7.7 SEPARABLEWAVELET BASES
305
2 It is obtained by scaling by 2 j the two-dimensional is an orthonormal basis of V j. separable scaling function q52(x)- ~b(Xl)qS(x2) and translating it on a twodimensional square grid with intervals 2 j.
Example 7.14 Piecewise constant approximation Let Vj be the approximation space of functions that are constant on [2Jm,2J(m + 1)] for any m c Z. The tensor product defines a two-dimensional piecewise constant approximation. The space Vj2 is the set of functions that are constant on any square [2Jnl ,2J(n] -t- 1)] x [2Jn2,2J(n2 + 1)], for (hi,n2) E Z 2. The two dimensional scaling function is
q~2 (X) -- ~(Xl) q~(X2) --
1
0
ifO < x l < 1 andO_<x2 _< 1 otherwise
Example 7.15 Shannon approximation Let Vj be the space of functions whose Fourier transforms have a support included in [-2-JTr,2-JTr]. The space V~ is the set of functions whose two-dimensional Fourier transforms have a support included in the low-frequency square [-2-JTr,2-JTr] • [-2-JTr,2-JTr]. The twodimensional scaling function is a perfect two-dimensional low-pass filter whose Fourier transform is
@(t'dl ) ~)(OJ2) --
1 if Icvll ___2-JTr and ]co2[ < 2-JTr 0 otherwise
Example 7.16 Spline approximation Let Vj be the space of polynomial spline functions of degree p that are C p-l, with nodes located at 2-Jm for m C Z. The space V~ is composed of two-dimensional polynomial spline functions that are p - 1 times continuously differentiable. The restriction of f(xl ,x2) E V 2j to any square [2Jnl,2J(nl + 1)) • [2Jn2,2J(n2-+- 1))is a separable product ql(xl)q2(x2) of two polynomials of degree at most p. Multiresolution Vision An image of 512 by 512 pixels often includes too much information for real time vision processing. Multiresolution algorithms process less image data by selecting the relevant details that are necessary to perform a particular recognition task [62]. The human visual system uses a similar strategy. The distribution of photoreceptors on the retina is not uniform. The visual acuity is greatest at the center of the retina where the density of receptors is maximum. When moving apart from the center, the resolution decreases proportionally to the distance from the retina center [305]. The high resolution visual center is called thefovea. It is responsible for high acuity tasks such as reading or recognition. A retina with a uniform resolution equal to the highest fovea resolution would require about 10,000 times more photoreceptors. Such a uniform resolution retina would increase considerably the size of the optic nerve that transmits the retina information to the visual cortex and the size of the visual cortex that processes this data.
306
CHAPTER VII
WAVELET BASES
FIGURE 7.23 Multiresolution approximations 2J, for - 5 _> j > - 8 .
aj[nl,n2]
of an image at scales
Active vision strategies [76] compensate the non-uniformity of visual resolution with eye saccades, which move successively the fovea over regions of a scene with a high information content. These saccades are partly guided by the lower resolution information gathered at the periphery of the retina. This multiresolution sensor has the advantage of providing high resolution information at selected locations, and a large field of view, with relatively little data. Multiresolution algorithms implement in software [107] the search for important high resolution data. A uniform high resolution image is measured by a camera but only a small part of this information is processed. Figure 7.23 displays a pyramid of progressively lower resolution images calculated with a filter bank presented in Section 7.7.3. Coarse to fine algorithms analyze first the lower resolution image and selectively increase the resolution in regions where more details are needed. Such algorithms have been developed for object recognition, and stereo calculations [196]. Section 11.5.1 explains how to compute velocity vectors in video sequences with a coarse to fine matching algorithm. 7.7.2
Two-Dimensional Wavelet Bases
A separable wavelet orthonormal basis of L2(R 2) is constructed with separable products of a scaling function 4~and a wavelet ~. The scaling function 4) is associ2 ated to a one-dimensional multiresolution approximation { V j } j E Z. L e t {vj}j~z Let be the separable two-dimensional multiresolution defined by V j2 _ V j ( ~ V j Wj2 be the detail space equal to the orthogonal complement of the lower resolution 2 1. approximation space Vj2 in V j_ V 2 _ l - - V j ~2W j
2 .
(7.250)
To construct a wavelet orthonormal basis of L 2(I~2), the following theorem builds a wavelet basis of each detail space Wj.2
7.7 SEPARABLEWAVELETBASES
307
T h e o r e m 7.24 Let d? be a scaling function and ~b be the corresponding wavelet generating a wavelet orthonormal basis ofL2(IR). We define three wavelets: ~ I (x) = (/)(X1) ~3(X2) , 2/32(X) -- r
~p(X2) , ~_33(X) -- ~J(X1) ~3(X2),
(7.251)
and denote for 1 <_k <_ 3 1 ~l~(xl--gJnl x2--2Jn2) 2J ' 2J "
r
~
The wavelet family {r
, r
r
}nCZ2
(7.252)
}(j,n)GZ3
(7.253)
is an orthonormal basis of W~ and {2/)~,n , r
r
is an orthonormal basis of LZ(IR2). Proof 1. Equation (7.250) is rewritten Vj-1 | Vj-1 = (Vj | Vj) 0 Wj2 .
(7.254)
The one-dimensional multiresolution space V/_ 1 can also be decomposed into V j_ 1 = Vj | W:. By inserting this in (7.254), the distributivity of | with respect to | proves that (7.255) Wj2 __ (Vj | Wj) + (Wj (~)Vj) + (Wj | Wj). Since {~bj,m}m~Zand {~bj,m}m~Zare orthonormal bases of Vj and Wj, we derive that {r
(Xl ) r
(X2) , Cj,nl (Xl ) (/)j,n2 (X2) , Cj,nl (Xl ) r
(Xi) } (nl,n2)EZ2
is an orthonormal basis of W~. As in the one-dimensional case, the overall space L 2(IR2) can be decomposed as an orthogonal sum of the detail spaces at all resolutions: L 2(~2) __ @ j____oo -Coo W 2j .
(7.256)
Hence {r
(X1)2/3j,n2 (X2), Cj,n 1 (X1) Cj,n 2 (X2), Cj,n I (X1)r
2 (X2)}(j,nl,n2)cZ3
is an orthonormal basis of L2(R2).
m
The three wavelets extract image details at different scales and orientations. Over positive frequencies, ~ and (a have an energy mainly concentrated respectively on [0, rr] and [rr, 2rr]. The separable wavelet expressions (7.251)imply that
+1 (C01,C02) -- ~5(r
~3(~2) , +2(C01,C02) -- +(~1) ~5(C02)
and ~3(c01,c02) -~(co~) ~(c02). Hence [~l (col,co2)[ is large at low horizontal frequencies COl and high vertical frequencies c02, whereas [~2 (c01, c02)l is large at high
3()8
CHAPTER Vll
WAVELET BASES
FIGURE 7.24 Fourier transforms of a separable scaling function and of 3 separable wavelets calculated from a one-dimensional Daubechies 4 wavelet.
horizontal frequencies and low vertical frequencies, and 1~3(~1,w2)1 is large at high horizontal and vertical frequencies. Figure 7.24 displays the Fourier transform of separable wavelets and scaling functions calculated from a one-dimensional Daubechies 4 wavelet. Wavelet coefficients calculated with ~1 and ~2 are large along edges which are respectively horizontal and vertical. This is illustrated by the decomposition of a square in Figure 7.26. The wavelet ~b3 produces large coefficients at the comers. Example 7.17 For a Shannon multiresolution approximation, the resulting twodimensional wavelet basis paves the two-dimensional Fourier plane (COl,WE) with dilated rectangles. The Fourier transforms ~ and ~ are the indicator functions respectively of [-Tr, 7r] and [-27r,-Tr] t_J[7r,27r]. The separable space Vj2 contains functions whose two-dimensional Fourier transforms have a support included in the low-frequency square [-2-Jzr,2-Jzr] • [-2-JTr,2-JTr]. This corresponds to ^2 indicated in Figure 7.25. The detail space W j2 is the orthogonal the support of ~bj,~ complement of V~ in V~_ 1 and thus includes functions whose Fourier transforms have a support in the frequency annulus between the two squares [-2-JTr, 2-JTr] x [-2-JTr,2-JTr] and [-2-J+lTr,2-J+lTr] • [--2-J+lTr,2-J+lT1-]. As shown in Figure 7.25, this annulus is decomposed in three separable frequency regions, which are "k for 1 < k < 3. Dilating these supports at all scales 2 j the Fourier supports of Cj,n yields an exact cover of the frequency plane (~1, ~2).
7.7
309
SEPARABLEWAVELET BASES 0}2
A1 ~gj-1
^3
A2
A3
AI
A3
~r
~J
~J
A3
~sj
A 1
~j
~ss A3
A3 ~gj-i
1
A3
A 1
A3
FIGURE 7.25 These dyadic rectangles indicate the regions where the energy of ~,n is mostly concentrated, for 1 <_ k < 3. Image approximations at the scale 2J are restricted to the lower frequency square.
For general separable wavelet bases, Figure 7.25 gives only an indication of the domains where the energy of the different wavelets is concentrated. When the wavelets are constructed with a one-dimensional wavelet of compact support, the resulting Fourier transforms have side lobes that appear in Figure 7.24. Example 7.18 Figure 7.26 gives two examples of wavelet transforms computed using separable Daubechies wavelets with p = 4 vanishing moments. They are calculated with the filter bank algorithm of Section 7.7.3. Coefficients of large amplitude in dj,1 dj2 and dj3 correspond respectively to vertical high frequencies (horizontal edges), horizontal high frequencies (vertical edges), and high frequencies in both directions (corners). Regions where the image intensity varies smoothly yield nearly zero coefficients, shown in grey. The large number of nearly zero coefficients makes it particularly attractive for compact image coding.
Separable Biorthogonal Bases One-dimensional biorthogonal wavelet bases are extended to separable biorthogonal bases of L2(~ 2) with the same approach as in Theorem 7.24. Let r ~ and r ~ be two dual pairs of scaling functions and wavelets that generate biorthogonal wavelet bases of L 2(R). The dual wavelets of if)l, ~2 and ~3 defined by (7.251) are ~l(x)-
~(Xl)~(X2)
, ~fl2(X)--~(Xl)C~(X2)
, ~3(X)--~(Xl)~(X2)
9
(7.257)
One can verify that (7.258)
310
CHAPTER Vll
WAVELET BASES
FIGURE 7.26 Separable wavelet transforms of Lena and of a white square in a black background, decomposed respectively on 3 and 4 octaves. Black, grey and white pixels correspond respectively to positive, zero and negative wavelet coefficients. The disposition of wavelet image coefficients d~ In, m ] - (f, Cj,n) k is illustrated at the top.
and
, Cj,n, Cj,n
}
(j,n)eZ3
(7.259)
are biorthogonal Riesz bases of Lz(~2).
7.7.3
Fast Two-Dimensional Wavelet Transform
The fast wavelet transform algorithm presented in Section 7.3.1 is extended in two dimensions. At all scales 2J and for any n - (nl ,n2), we denote
aj[n]-
(f, ~,n) and
djk [ n ] -
(f,
k ~j,n)
for 1 < k < 3.
For any pair of one-dimensional filters y[m] and z[m] we write the product filter yz[n] = y[nl]z[n2], and y [ m ] - y[-m]. Let him] and g[m] be the conjugate mirror filters associated to the wavelet ~. The wavelet coefficients at the scale 2 j+l are calculated from aj with twodimensional separable convolutions and subsamplings. The decomposition formula are obtained by applying the one-dimensional convolution formula (7.108)
7.7
SEPARABLEWAVELET BASES
311
and (7.107) of Theorem 7.7 to the separable two-dimensional wavelets and scaling functions for n - (nl ,n2)"
aj+l[n]
-
aj,hh[2n],
(7.260)
dJ+l[n ]
--
aj.h~,[2n],
(7.261)
dj2+l [n]
-
a j , ~,h[2n],
(7.262)
aj,~[Zn].
(7.263)
d3+l[n]-
We showed in (3.53) that a separable two-dimensional convolution can be factored into one-dimensional convolutions along the rows and columns of the image. With the factorization illustrated in Figure 7.27(a), these four convolutions equations are computed with only six groups of one-dimensional convolutions. The rows of aj are first convolved with h and ~, and subsampled by 2. The columns of these two output images are then convolved respectively with h and ~, and subsampled, 1 2 3 which gives the four subsampled images aj+l, dj+ 1, dj+ 1 and dj+ 1. We denote by ~ [ n ] - ~[nl,n2] the image twice the size of y[n], obtained by inserting a row of zeros and a column of zeros between pairs of consecutive rows and columns. The approximation aj is recovered from the coarser scale approxk 1 with two-dimensional separable imation aj+l and the wavelet c o e f f i c i e n t s dj+ convolutions derived from the one-dimensional reconstruction formula (7.109) ~1 "2 "3 aj[n] -- aj+l * hh[n] + dj+ 1 , hg[n] + dj+ 1 , gh[n] + dj+ 1 , gg[n] .
(7.264)
These four separable convolutions can also be factored into six groups of onedimensional convolutions along rows and columns, illustrated in Figure 7.27(b). Let b[n] be an input image whose pixels have a distance 2 L - N -1 . We associate to b[n] a function f (x) c V 2 approximated at the scale 2 L. Its coefficients aL [n] (f, ~2,n ) a r e defined like in (7.116) by
b[n] - Nat[n] ,,~ f ( N - l n ) .
(7.265)
The wavelet image representation of at is computed by iterating (7.260-7.263) for L<j<J: (7.266) [aj, {d},d2,dj 3}t<j_<j] . The image at is recovered from this wavelet representation by computing (7.264) f o r J > j >_L. Finite Image and Complexity When aL is a finite image of N 2 pixels, we face boundary problems when computing the convolutions (7.260-7.264). Since the decomposition algorithm is separable along rows and columns, we use one of the three one-dimensional boundary techniques described in Section 7.5. The resulting values are decomposition coefficients in a wavelet basis of Lz[0, 1]2. Depending on the boundary treatment, this wavelet basis is a periodic basis, a folded basis or a boundary adapted basis.
312
CHAPTER VII WAVELET BASES
Columns
Rows
(a) Columns
Rows
~,--- aj d]+l
(b) FIGURE 7.27 (a): Decomposition of aj with 6 groups of one-dimensional convolutions and subsamplings along the image rows and columns. (b): Reconstruction of aj by inserting zeros between the rows and columns of aj+l and djk+l, and filtering the output.
The resulting images aj and d~ have 2 -2j samples. The images of the wavelet representation (7.266) thus include a total ofN 2 samples. If h and g have size K, the reader can verify that 2K2 -2(j-l) multiplications and additions are needed to compute the four convolutions (7.260-7.263) with the factorization of Figure 7.27(a). The wavelet representation (7.266) is thus calculated with fewer than 8KN 2 operations. The reconstruction of aL by factoring the reconstruction equation (7.264) requires the same number of operations. Fast Biorthogonal Wavelet Transform The decomposition of an image in a biorthogonal wavelet basis is performed with the same fast wavelet transform algorithm. Let (h, ~) be the perfect reconstruction filters associated to (h, g). The inverse wavelet transform is computed by replacing the filters (h, g) that appear in (7.264) by (h, ~).
313
7.7 SEPARABLEWAVELET BASES
7.7.4
Wavelet Bases in Higher Dimensions 2
Separable wavelet orthonormal bases of L2(R p) are constructed for any p >_ 2, with a procedure similar to the two-dimensional extension. Let 4~ be a scaling function and ~ a wavelet that yields an orthogonal basis of L2(I~). We denote 0 ~ - ~band 01 - ~. To any integer 0 _< ~ < 2 p written in binary form ~ = e l . . . , Ep we associate the p-dimensional functions defined in x = (Xl, . . . ,Xp) by
r163
= 0s
Os
For e -- 0, we obtain a p-dimensional scaling function
~(~)... ~(~).
r
Non-zero indexes e correspond to 2 p - 1 wavelets. At any scale 2 j and for n (nl, ,rip) we denote .
.
.
Cj,n(X ) __ 2_pj/2r
1 -- 2Jnl 2J
Xp--2Jnp) ' "
2J
T h e o r e m 7.25 The family obtained by dilating and translating the 2 p - 1 wavelets
for ~ # O {~b' }
j,n I<e<2P,(j,n)EZP+I
(7.267)
is an orthonormal basis of L2 (Ii~P). The proof is done by induction on p. It follows the same steps as the proof of Theorem 7.24 which associates to a wavelet basis of L2(I~) a separable wavelet basis of L z (R 2). For p -- 2, we verify that the basis (7.267) includes 3 elementary wavelets. For p - 3, there are 7 different wavelets.
Fast Wavelet Transform Let bin] be an input p-dimensional discrete signal sampled at intervals N -1 - 2 L. We associate to b[n] an approximation f at the scale 2 L whose scaling coefficients aL [n] -- ( f , r 0 satisfy
b i n ] - N p/2 aL[n] ~ f ( N - l n ) . The wavelet coefficients of f at scales 2 j > 2 L are computed with separable convolutions and subsamplings along the p signal dimensions. We denote
aj[n] -- ( f , ~j,n) o and d j~[ n ] - ( f , ~j,n) for 0 < e < 2 p . The fast wavelet transform is computed with filters that are separable products of the one-dimensional filters h and g. The separable p-dimensional low-pass filter is h~ h [ n l ] . . , h[np].
314
CHAPTER VII
WAVELET BASES
Let us denote u~ - h[m] and u 1[m] - g[m]. To any integer e - e l . . . ep written in a binary form, we associate a separable p-dimensional band-pass filter -
[n;]
Let ~ [n] - g'[-n]. One can verify that
aj+l[n]
--
d~+l[n ]
-
(7.268)
aj,ft~ aj,~'[2n].
(7.269)
We denote by ~[n] the signal obtained by adding a zero between any two samples of y[n] that are adjacent in the p-dimensional lattice n - (nl, . . . ,np). It doubles the size of y[n] along each direction. If y[n] has Mp samples, then ~[n] has (2M) p samples. The reconstruction is performed with
2P--1
aj[n]
-
-
aj+l-k h~
+ Z
dJ+ "~ 1. g~ [n].
(7.270)
The 2p separable convolutions needed to compute aj and {d~ }1 <,<2p as well as the reconstruction (7.270) can be factored in 2 p+I - 2 groups of one-dimensional convolutions along the rows of p-dimensional signals. This is a generalization of the two-dimensional case, illustrated in Figures 7.27. The wavelet representation of aL is
[{d~}l
.
(7.271)
It is computed by iterating (7.268) and (7.269) for L < j < J. The reconstruction of aL is performed with the partial reconstruction (7.270) for J > j _> L. If aL is a finite signal of size N p, the one-dimensional convolutions are modified with one of the three boundary techniques described in Section 7.5. The resulting algorithm computes decomposition coefficients in a separable wavelet basis of L2[0,1]p. The signals aj and d~ have 2 -pj samples. Like aL, the wavelet representation (7.271) is composed of N p samples. If the filter h has K non-zero samples then the separable factorization of (7.268) and (7.269) requires pK2 -p(j-1) multiplications and additions. The wavelet representation (7.271) is thus computed with fewer than p(1 - 2-P) -1KN p multiplications and additions. The reconstruction is performed with the same number of operations.
7.8
PROBLEMS 7.1. 1 Let h be a conjugate mirror filter associated to a scaling function ~b. (a) Prove that if ~t(co) has a zero of order p at rr then ~(l)(2krr) -- 0 for any k C Z - { 0 } a n d / < p. (b) Derive that if q < p then ~-~n=-~ nq ~(n) fWcx3 ~176 t q qb(t)dt. +c~ 7.2. 1 Prove that ~--~n=-o~~b(t- n) = 1 if ~bis an orthogonal scaling function. -
-
7.8 PROBLEMS 7.3.
~ 15
1 Let Cm be the Battle-Lemari6 scaling function of degree m defined in (7.23). Let 4~ be the Shannon scaling function defined by q5 = 1[_.,~]. Prove that lim ] q~m-4~ll-0. m-++oc
7.4.
1 Suppose that h[n] is non-zero only for 0 <_ n < K. We denote re[n] = x/2h[n]. The scaling equation is ~b(t) = ~--~n:0 K-1 m[n] qS(2t- n). (a) Suppose that K -- 2. Prove that if t is a dyadic number that can be written in binary form with/digits: t - 0.~IQ'"~i, with ek E {0, 1}, then q~(t)is the product qS(t) -- m[e0] x m[e,] x - - . x m[ei] x c~(O). (b) For K = 2, show that if m[0] = 4/3 and m[1] = 2/3 then q~(t) is singular at all dyadic points. Verify numerically with WAVELAB that the resulting scaling equation does not define a finite energy function qS. (c) Show that one can find two matrices M[0] and M[1] such that the Kdimensional vector q~(t) = [qS(t), qS(t + 1 ) , . . . , qS(t + K - 1)] r satisfies (I)(t) -- M[0] (I)(2t)+M[1] (I,(2t- 1). (d) Show that one can compute ~(t) at any dyadic number t - 0. E1s a product of matrices: ( I , ( t ) - M[e0] • M[e,] •
7.5.
1 Let us define
9 9 9s
with
M[ei] • 42(0).
-J-o~
Ok+l (t) -- x/2 Z
h[n] O ~ ( 2 t - n ) ,
(7.272)
n = --oo
with qS0 -- l[0,1], and akin] - (Ok(t),Ok(t--n)). (a) Let
P~f(w)---~
1(
a~ ~ CO I]7(-~)12f(-~)+ h(-~+Tr)
[2
C0
f(-~+~-)
)
.
Prove that ak+l (w) = Pak(~). (b) Prove that if there exists r such that limk__++o~lick - r -- 0 then 1 is an eigenvalue of P and ~(w) - lip=, +~ 2-1/2h(2-Pw) 9 What is the degree of freedom on r in order to still converge to the same limit r (c) Implement in MATLAB the computations of Ok(t) for the Daubechies conjugate mirror filter with p -- 6 zeros at 7r. How many iterations are needed to obtain ]]~bk- 4)]1 < 10-4? Try to improve the rate of convergence by modifying qS0. 7.6.
' Let b[n] - f ( N - 2 n ) with 2 L = N -1 and f E VL. We want to recover aL[n] = (f, q~L,,) from b[n] to compute the wavelet coefficients of f with Theorem 7.7. (a) Let qSc[n] -- 2-L/Zqs(Z-Ln). Prove that b[n] = aL *qSL[n]. (b) Prove that if there exists C > 0 such that for all oJ C [-Tr, zr] +oc
~d(CO) -- Z
~(~ + 2kTr) >_ C,
k---e~
then aL can be calculated from b with a stable filter q~L1[n].
316
CHAPTER VII
WAVELET BASES
(c) If q~ is a cubic spline scaling function, compute numerically OLl[n]. For a given numerical precision, compare the number of operations needed to compute aL from b with the number of operations needed to compute the fast wavelet transform of at. (d) Show that calculating at from b is equivalent to performing a change of basis in VL, from a Riesz interpolation basis to an orthonormal basis. 7.7.
1 Quadrature mirror filters We define a multirate filter bank with four filters h, g, h, and ~, which decomposes a signal a0[n] a, [n] -- a0 * h[2n] , d, [n] = a0 * g[2n]. Using the notation (7.106), we reconstruct rio[n] -- fi, * h[n] + t t , . ~[n].
(a) Prove that ri0[n] = ao[n -l] if
/~(~) =/,(~ + ~ ) , h(~) = / , ( ~ ) ,
~,(~) = - h ( ~ + ~),
and h satisfies the quadrature mirror condition h2(~o) - h2(w + 7r) --- 2e -il~ . (b) Show that l is necessarily odd. (c) Verify that the Haar filter (7.51) is a quadrature mirror filter (it is the only finite impulse response solution). 7.8.
1 Let f be a function of support [0,1], that is equal to different polynomials of degree q on the intervals {[7-~,7-k+l]}0_k
7.9.
1 Let 0 be a box spline of degree m obtained by m + 1 convolutions of 110,1] with itself. (a) Prove that
1
m+,
O(t) : m.l ~--~(--1
)k
( m+l ) k
([t-k]+)m'
k=0
where [x]+ = max(x,0). Hint: write 1[0,1] = 1[0,+o~)- 1(~,+~). (b) Let Am and Bm be the Riesz bounds of {O(t- n)},,ez. With Proposition 7.1, prove that limm_,+~ Bm = -+-oG. Compute numerically Am and Bm for m E { 0 , . . . , 5 }, with MATLAB. 7.10.
1 Prove that if {~bj,n}(j,n)eZ: is an orthonormal basis of L2(/~) then for all
~~
- {o} ~ j =+~ _ ~ J~,(2Jov)l2 = 1. Find an example showing that the converse is not true.
7.8 PROBLEMS
3 17
7.11. 2 Let us define (co) =
1 0
if 4rr/7 < Ico[ < rr or 4rr _< [coI < 4rr + 4rr/7 otherwise
Prove that {~bj,n}O,n)eZ2 is an orthonormal basis of L2(IR). Prove that ~b is not associated to a scaling function ~bthat generates a multiresolution approximation. 7.12.
1 Express the Coiflet property (7.104) as an equivalent condition on the conjugate mirror filter h(ei~~
7.13.
1 Prove that ga(t) has p vanishing moments if and only if for all j > 0 the discrete wavelets ~bj[n] defined in (7.145) have p discrete vanishing moments +or
n k~bj[n] -- 0 for 0 < k < p. n=-oo
7.14.
1 Let ga(t) be a compactly supported wavelet calculated with Daubechies conjugate mirror filters (h,g). Let ~b'. j,n (t) -- 2-J/e~b'(2-Jt - n) be the derivative wavelets. (a) Verify that hi and gl defined by ktl(co) -- 2h(co) (e i~~ 1)-' , ~l(CO) -- 2(e i~'- 1)~(co) are finite impulse response filters. (b) Prove that the Fourier transform of ~b' (t) can be written
~%(co)- g~(2-1co) I-[
hi (2-Pco)
p=2
(c) Describe a fast filter bank algorithm to compute the derivative wavelet coefficients (f, ga},n)[95]. 7.15. 2 Let ~b(t) be a compactly supported wavelet calculated with Daubechies conjugate mirror filters (h,g). Let ~ta(co) = Ikt(co)2. We verify that +a(~.3) = ~(co) ha(col4- rr/2) is an almost analytic wavelet. (a) Prove that 2~a is a complex wavelet such that Real[~b a] -- ~b. (b) Compute ~ba(co) in MATLAB for a Daubechies wavelet with four vanishing moments. Explain why 2/3a (CO) ~ 0 for co < 0. (c) L e t ~ , n ( t ) - 2-J/2~a(2-Jt- n). Using the fact that ~a (CO)
~(2-1co) h(2-2co)Ih(2-2co-2-1rr)l 2 ~ ~r-~
V/~
~
kt(2-kco)
k=3 .I..I.
V/~
show that we can modify the fast wavelet transform algorithm to compute the "analytic" wavelet coefficients (f, ~b~,n) by inserting a new filter. (d) Let ~b be the scaling function associated to ~b. We define separable twodimensional "analytic" wavelets by: ~ I ( x ) -- I/)a(xI)~(X2) , r
-- ~(Xl),l~a(x2),
318
CHAPTER VII
WAVELET BASES
2/33(X) --- ~)a (X 1 ) 2/3a(X 2 ) , 2/34(X) --- 2/3a (X 1 ) 2/)a (--X 2 ) .
Let 2/)k,n(X)
-" 2 - J ~ k ( 2 - J x - n) for n C Z 2. Modify the separable wavelet filter bank algorithm of Section 7.7.3 to compute the "analytic" wavelet coefficients (f, ~k,n). (e) Prove that {~,n}l_
7.16. z Multiwavelets We define the following two scaling functions: q~l(t)
=
qSl(2t)+qSl(2t-1)
(a) Compute the functions ~bl and q52. Prove that {q51( t - n ) , qSz(t- n)}neZ is an orthonormal basis of a space V0 that will be specified. (b) Find ~1 and ~2 with a support on [0,1] that are orthogonal to each other and to qS1 and ~b2. Plot these wavelets. Verify that they have 2 vanishing moments and that they generate an orthonormal basis of L2(IR). 7.1 7. 2 Let ffold be the folded function defined in (7.2 10). (a) Let c~(t),/3(t) E L2(N) be two functions that are either symmetric or antisymmetric about t = 0. If (c~(t),/3(t + 2k)) = 0 and (c~(t),/3(2k- t)) = 0 for all k E Z, then prove that f0 l a fold (t) flf~
O.
(b) Prove that if ~, ~, ~b, ~ are either symmetric or antisymmetric with respect to t -- 1/2 or t --0, and generate biorthogonal bases of L2(I~), then the folded bases (7.212) and (7.213) are biorthogonal bases of L2[0, 1]. Hint: use the same approach as in Theorem 7.16. 7.18.
~ A recursive filter has a Fourier transform that is a ratio of trigonometric polynomials as in (2.31). (a) Let p[n] = h , h[n] with h[n] = h[-n]. Verify that if h is a recursive conjugate mirror filter then/~(w) +/5(w + 7r) = 2 and there exists r(03) -- ~-~'K-1 ~k=or[k] e -ik~ such that
21~(w)l 2 /~(~) - I~(~)12 + I~(~ + ~)12
(7.273)
(b) Suppose that K is even and that r [ K / 2 - 1 - k] = r [ K / 2 + k]. Verify that
I~(w)l 2 /3(w) = 2 I?(w) + ?(w + 7r)12.
(7.274)
(c) If ~(w) = (1 + e-iw) K-1 with g • 6, compute kt(w) with the factorization (7.274), and verify that it is a stable filter (Problem 3.8). Compute numerically and plot with WAVELAB the graph of the corresponding wavelet
r
7.8 PROBLEMS 7.19.
3 19
1 Balancing Suppose that h, h define a pair of perfect reconstruction filters satisfying (7.129). (a) Prove that
1(
hnew[n] - -~ h[n]-4-h[n- 1]
)
1
, ]lnew[n ] -- -~ (]'/[n] "3t" h[n--1])
defines a new pair of perfect reconstruction filters. Verify that
hnew(W) and
h~w(W) have respectively 1 more and 1 less zero at r than h(w) and h(w) [68]. (b) The Deslauriers-Dubuc filters are h(~) - 1 and h(w) --
( - e -3i"~ + 9e -i~ + 1 6 + 9e i~ - e3i"~).
hnew and hnew as well as the corresponding biorthogonal wavelets .... ~h,,ew,after one balancing and after a second balancing. 7.20. 1 Lifting The filter (7.192) is calculated by lifting lazy filters. Find a dual lifting Compute
that produces a lifted filter with a support of size 9 so that ht(~o) has 2 zeros at 7r. Compute the resulting lifted wavelets and scaling functions. Implement in WAVELAB the corresponding fast wavelet transform and its inverse with the polyphase decomposition illustrated in Figure 7.16. 7.21.
1 For a Deslaurier-Dubuc interpolation wavelet of degree 3, compute the dual wavelet ~ in (7.245), which is a sum of Diracs. Verify that it has 4 vanishing moments.
7.22.
1 Prove that a Deslaurier-Dubuc interpolation function of degree 2 p - 1 converges to a sinc function when p goes to +co.
7.23.
2 Let r be an autocorrelation scaling function that reproduces polynomials of degree p - 1 as in (7.229). Prove that if f is uniformly Lipschitz ~ then under the same hypotheses as in Theorem 7.21, there exists K > 0 such that ]f -
7.24.
1 Let basis space Hint:
r
7.25.
Pv~flloo <~K 2 '~j.
r be an interpolation function that generates an interpolation wavelet of C0(R). Construct a separable interpolation wavelet basis of the C0(I~P) of uniformly continuous p-dimensional signals f ( x l , . . . ,xp). construct 2 v - 1 interpolation wavelets by appropriately translating
r
2 Fractional Brownian Let ~(t) be a compactly supported wavelet with p vanishing moments that generates an orthonormal basis of L2 (If{). The covariance of a fractional Brownian motion BH(t) is given by (6.93). (a) Prove that E{I
320
CHAPTERVII WAVELETBASES
(c) In two dimensions, synthesize "approximate" fractional Brownian motion images BH with wavelet coefficients (BH, ~bk,n) that are independent Gaussiam random variables, whose variances are proportional to 2 j(2n+2) . Adjust H in order to produce textures that look like clouds in the sky. 7.26. l Image mosaic Let fo[nl,n2] and f l [nl,n2] be two images of N 2 pixels. We want to merge the center of fo[n~,n2] for N/4 < hi,n2 < 3N/4 in the center of f~. Compute in WAVELABthe wavelet coefficients of f0 and f~. At each scale 2J and orientation 1 ___k < 3, replace the 2 -2j/4 wavelet coefficients corresponding to the center of f~ by the wavelet coefficients of f0. Reconstruct an image from this manipulated wavelet representation. Explain why the image f0 seems to be merged in f l, without the strong boundary effects that are obtained when replacing directly the pixels of f l by the pixels of f0. 7.27. 2 Foveal vision A foveal image has a maximum resolution at the center, with a resolution that decreases linearly as a function of the distance to the center. Show that one can construct an approximate foveal image by keeping a constant number of non-zero wavelet coefficients at each scale 2 j. Implement this algorithm in WAVELAB.You may build a highly compact image code from such an image representation. 7.28. 1 High contrast We consider a color image specified by three color channels: red r[n], green g[n], and blue b[n]. The intensity image (r + g + b)/3 averages the variations of the three color channels. To create a high contrast image f , for each wavelet ~,,, we set (f, ~bk,,,) to be the coefficient among (r, ~k,n), (g, ~bk,,,) and (b, ~j,,,), k which has the maximum amplitude. Implement this algorithm in WAVELAB and evaluate numerically its performance for different types of multispectral images. How does the choice of ~ affect the results? 7.29. 2 Restoration Develop an algorithm that restores the sharpness of a smoothed image by increasing the amplitude of wavelet coefficients. Find appropriate amplification functionals depending on the scale and orientation of the wavelet coefficients, in order to increase the image sharpness without introducing important artifacts. To improve the visual quality of the result, study the impact of the wavelet properties: symmetry, vanishing moments and regularity. 7.30. a Smooth extension Let f[n] be an image whose samples are known only over a domain D, which may be irregular and may include holes. Design and implement an algorithm that computes the wavelet coefficients of a smooth extension of f over a square domain that includes D, and compute f from these. Choose wavelets with p vanishing moments. Set to zero all coefficients corresponding wavelets whose support do not intersect D, which is equivalent to impose that f is locally a polynomial of degree p. The coefficients of wavelets whose support are in D are calculated from f. The issue is therefore to compute the coefficients of wavelets whose support intersect the boundary of D. You must guarantee that f -- f on D as well as the numerical stability of your extension.
V/l/ WAVELET PACKET A N D LOCAL COSINE BASES
ifferent types of time-frequency structures are encountered in complex signals such as speech recordings. This motivates the design of bases whose time-frequency properties may be adapted. Wavelet bases are one particular family of bases that represent piecewise smooth signals effectively. Other bases are constructed to approximate different types of signals such as highly oscillatory waveforms.
D
Orthonormal wavelet packet bases use conjugate mirror filters to divide the frequency axis in separate intervals of various sizes. A discrete signal of size N is decomposed in more than 2s/2 wavelet packet bases with a fast filter bank algorithm that requires O(N log 2N) operations. If the signal properties change over time, it is preferable to isolate different time intervals with translated windows. Local cosine bases are constructed by multiplying these windows with cosine functions. Wavelet packet and local cosine bases are dual families of bases. Wavelet packets segment the frequency axis and are uniformly translated in time whereas local cosine bases divide the time axis and are uniformly translated in frequency.
321
322
CHAPTER VIII
8.1
WAVELET PACKET AND LOCAL COSINE BASES
WAVELET PACKETS z
8.1.1
Wavelet Packet Tree
Wavelet packets were introduced by Coifman, Meyer and Wickerhauser [ 139] by generalizing the link between multiresolution approximations and wavelets. A space Vj of a multiresolution approximation is decomposed in a lower resolution space V j+I plus a detail space W j+I. This is done by dividing the orthogonal basis {~j(t--2Jn)}n6g of Vj into two new orthogonal bases
{~j+l(t--2J+ln)}n6g of Vj+l
and
{~j+l(t-2J+ln)}n6i of Wj+l.
The decompositions (7.112) and (7.114) of ~bj+l and ~hj+l in the basis { @ ( t - 2Jn)},cz are specified by a pair of conjugate mirror filters h[n] and
g[n]--(-1)l-nh[1-n]. The following theorem generalizes this result to any space U j that admits an orthogonal basis of functions translated by n2 j, for n E Z. Theorem 8.1 (COIFMAN,MEYER,WICKERHAUSER)Let {Oj(t - 2Jn) }ncZ be an
orthonormal basis of a space U j. Let h and g be a pair of conjugate mirror filters. Define -I-~
0~ (t) -- Z
+cxD
h[n] Oj(t - 2Jn) and 0}+ 1(t) -
n=-c~
Z
g[n] Oj(t - 2Jn).
(8.1)
n=-co
The family
{00+1 ( t - 2JWln), 0}+ 1( t - 2JWln)}nEZ is an orthonormal basis of Uj. Proof 2. This proof is very similar to the proof of Theorem 7.3. The main steps are outlined. The fact that {Oj(t- 2in)}n~Z is orthogonal means that
5)-,/
2J k = - o o
1
(8.2)
We derive from (8.1) that the Fourier transform of 0j+~ 0 is --t-0(3
/)~ (~) = bj(~) ~--~ h[n] exp(-i2Jnw) -- h(2J~)bj(~).
(8.3)
n=--oc
Similarly, the Fourier transform o f 0~+1 is b3+ 1 (03) - -
~(2J~)bj(~).
(8.4)
8.1
323
WAVELET PACKETS
Proving that {Oj+l~( t - 2J+ln) } and {Oj+ 11 ( t - 2j+ln)}.cz are two families of orthogonal vectors is equivalent to showing that for I - 0 or I - 1 ^ 2J+1
2
2kTr
= 1.
(8.5)
k----oc
These two families of vectors yield orthogonal spaces if and only if 1 + E~ ~^0 ( 2J+1 2kTr ) ^1, 2kTr ) 0J+l c o + 2 - ~ 0:+l c o + 2 - ~ - 0 .
(8.6)
k-- -oo
The relations (8.5) and (8.6) are verified by replacing 0j+ ^~ 1 and Oj 1"1 _{._ by (8.3) and (8.4) respectively, and by using the orthogonality of the basis (8.2) and the conjugate mirror filter properties Ih(co)l 2 -+-Iiz(co-+- 71")12 Ig(co)[ 2 + Ig(co-k-Tr)[ 2 ~(~) i,* (~o) +/~(~o + ~) f,* (~o + ~)
-~
2, 2,
-
0.
--
To prove that the family {0~ ( t - 2j+' n), 0}+, ( t - 2j+, n) }ncz generates the same space as {Oj(t- 2in)}ncz, we must prove that for any a[n] E I2(Z) there exist b[n] E 12(Z) and c[n] C I2(Z) such that +~
Z
+~
a[n] Oj(t- 2Jn) -- ~
n----oo
To
+~
bin] 0~ ( t - 2J+ln)+ Z
n~--oo
c[n]0J+ l ( t - 2J+ln). (8.7)
n~--oo
do this, we relate b(co) and ~(co) to &(co). The Fourier transform of (8.7) yields a(2Jco) b:(c,) - b(2J+lco) oj+,(co)+b(zJ+,co) ^~ ^, 0j+l(CO).
(8.8)
One can verify that
b(2J+l~)-~ a ( 2 J ~ ) ( 2 J ~ ) + a ( 2 J a : + T r ) ( 2 J ~ + T r ) and ~(2J+lco)- 1 (a(2Jco) ~*(2Jco) + a(2Jw + rr) ~* (2'co + ~-)) satisfy (8.8).
m
Theorem 8.1 proves that conjugate mirror filters transform an orthogonal basis {Oj(t- 2:n)},cz in two orthogonal families {0~ ( t - 2J+ln)},~z and {0}+ 1( t 2 j+' n)},,oz. Let U~ and U}+ 1 be the spaces generated by each of these families. 0 1 and Uj+ 1 1 are orthogonal and Clearly Uj+ U~+ 1 @ U j1+ I -- U j .
324
CHAPTER VIII WAVELET PACKET AND LOCAL COSINE BASES
Computing the Fourier transform of (8.1) relates the Fourier transforms and 0~+ 1 to the Fourier transform of Oj"
b~ 1(a;) -
h(2Ja;) 0j(a;)
^1 1(a;) = ~(2Jw)0j(~). Oj+
of
00+1
(8.9)
Since the transfer functions/~(2J~) and ~(2Ja~) have their energy concentrated in different frequency intervals, this transformation can be interpreted as a division of the frequency support of 0j. Binary Wavelet Packet Tree Instead of dividing only the approximation spaces V j to construct detail spaces W j and wavelet bases, Theorem 8.1 proves that we can set U j - W j and divide these detail spaces to derive new bases. The recursive splitting of vector spaces is represented in a binary tree. If the signals are approximated at the scale 2 L, to the root of the tree we associate the approximation space VL. This space admits an orthogonal basis of scaling functions {qSL(t2Ln) }nEZ with ~bL(t) ----2-U2 ~b(2-Lt). Any node of the binary tree is labeled by (j, p), where j - L >_ 0 is the depth of the node in the tree, and p is the number of nodes that are on its left at the same depth j - L. Such a tree is illustrated in Figure 8.1. To each node (j, p) we associate a space W p, which admits an orthonormal basis { ~ P ( t - 2Jn))ncZ, by going down the tree. At the root, we have W ~ - VL and ~o _ ~bL. Suppose now that we have already constructed W p and its orthonormal basis/3 p - {~bP(t - 2Jn)}n~Z at the node (j, p). The two wavelet packet orthogonal bases at the children nodes are defined by the splitting relations (8.1): --~-oo
~ _ l (t) -- ~
h[n] ~jP ( t - 2 J n )
(8.10)
n=-cxz and ~bZP +1 j + l (t)--
Z
g[n]~bjP(t_2Jn).
(8.11)
n-----o~
Since {~pP (t - 2Jn) }nEZ is orthonormal,
h[n] - ( ~ _ l ( U ) , ~ ; ( u - 2 J n ) )
/o/2p+1 (u),ej P (u - 2Jn)). , g[n] - \q~j+l
Theorem 8.1 proves that /3~ 1 - { ~ l ( t - 2 J + l n ) } n c Z
(8.12)
r22p+ 1 and ~'j+l
--" 2p
{~j+l~/'2p+l(t - 2J+ln)}n~Z are orthonormal bases of two orthogonal spaces Wj+ 1 P+ 1 and , ,,I ~ 2j+l such that 2p Wj+l
llj2p+ 1 p (~) "" j + l -- Wj.
(8.13)
This recursive splitting defines a binary tree of wavelet packet spaces where each parent node is divided in two orthogonal subspaces. Figure 8.2 displays the 8
8. I
WAVELET
PACKETS
325
W ~L
/~V~+I~~1 1 2 3 W 0+2 WL+2 w L+2 W L+2
~0
F I G U R E 8. I
Binary tree of wavelet packet spaces. /~l (t)
3(t)
0.4
"
0.4
"
0.3
0.5
0.2
0.2
0
0.1
0
-0.2
0 -0.1 40
-20
60
r 0.5
0
-0.5
"
"
0
20
40
0
-0"2 t -0.4
-0.4 20
"
0.2
0
20
(j35(t) 0"51
-40
-20
-0.5
0.5
"
'
"
0
o
-0.5
20
~6(t)
..... 0.5
~
0
-0.5
-0.5
FIGURE 8.2 Wavelet packets computed with the Daubechies 5 filter, at the depth j - L -- 3 of the wavelet packet tree, with L - 0. They are ordered from low to high frequencies. wavelet packets CP at the depth j - L -- 3, calculated with the Daubechies filter of order 5. These wavelet packets are frequency ordered from left to right, as explained in Section 8.1.2. Admissible Tree
We call admissible tree any binary tree where each node has either 0 or 2 children, as shown in Figure 8.3. Let {ji, Pi}l
i .
The union of the corresponding wavelet packet bases
{r
(t - 2J'n) }nEZ,l
thus defines an orthogonal basis of W ~ - VL.
(8.14)
326
CHAPTER VIII WAVELET PACKET AND LOCAL COSINE BASES
w.O
w FIGURE 8.3
w
w% w
E x a m p l e of admissible wavelet packet binary tree.
Number of Wavelet Packet Bases The n u m b e r of different wavelet packet orthogonal bases of VL is equal to the n u m b e r of different admissible binary trees. The following proposition proves that there are more than 2 2J-' different wavelet packet orthonormal bases included in a full wavelet packet binary tree of depth J. P r o p o s i t i o n 8.1 The number Bj of wavelet packet bases in a full wavelet packet
binary tree of depth J satisfies 2 2J-~ < Bj < 2 ~2J-~.
(8.15)
Proof z. This result is proved by induction on the depth J of the wavelet packet tree. The number Bj of different orthonormal bases is equal to the number of different admissible binary trees of depth at most J, whose nodes have either 0 or 2 children. For J = 0, the tree is reduced to its root so B0 = 1. Observe that the set of trees of depth at most J + 1 is composed of trees of depth at least 1 and at most J + 1 plus one tree of depth 0 that is reduced to the root. A tree of depth at least 1 has a left and a right subtree that are admissible trees of depth at most J. The configuration of these trees is a priori independent and there are Bj admissible trees of depth J so Bj+I -- Bj2 -1- 1. (8.16) Since B1 = 2 and Bj+I >_B2, we prove by induction that Bj >_22J-1 . Moreover log2Bj+ 1 - 2log2B J + log2(1 + B j2).
If J > 1 then Bj > 2 so 1
log2Bj+ 1 < 2logzB J -~- ~.
(8.17)
Since B1 -- 2, 1 J-1 2j log2Bg+l < 2 g -k- ~ ~ 2 j < 2 J -~- -~-, j=0
so Oj < 2 ~2J-1 .
II
For discrete signals of size N, we shall see that the wavelet packet tree is at most of depth J -- log 2 N. This proposition proves that the n u m b e r of wavelet packet bases satisfies 2N/2 < Blog2N _< 25N/8.
8.1
327
WAVELETPACKERS
Wavelet Packets on Intervals
To construct wavelet packets bases of L2[0,1], we use the border techniques developed in Section 7.5 to design wavelet bases of Lz[0, 1]. The simplest approach constructs periodic bases. As in the wavelet case, the coefficients of f E Lz[0, 1] in a periodic wavelet packet basis are the same as the decomposition coefficients of fper(t) - f~k=_~f(t +~ + k) in the original wavelet packet basis of L z (~). The periodization of f often creates discontinuities at the borders t -- 0 and t = 1, which generate large amplitude wavelet packet coefficients. Section 7.5.3 describes a more sophisticated technique which modifies the filters h and g in order to construct boundary wavelets which keep their vanishing moments. A generalization to wavelet packets is obtained by using these modified filters in Theorem 8.1. This avoids creating the large amplitude coefficients at the boundary, typical of the periodic case.
Biorthogonal Wavelet Packets Non-orthogonal wavelet bases are constructed in Section 7.4 with two pairs of perfect reconstruction filters (h, g) and (/t, ~) instead of a single pair of conjugate mirror filters. The orthogonal splitting Theorem 8.1 is extended into a biorthogonal splitting by replacing the conjugate mirror filters with these perfect reconstruction filters. A Riesz basis {Oj(t-2Jn)}n~z of Uj is transformed into two Riesz bases {0~ (t- 2J+ln)}ncZ and {0~+ 1(t- 2J+ln)}ncZ of two non-orthogonal spaces U ~j+ 1 and U j+ 1 such that U~+ 1 O U j1+ 1 -- Uj.
A binary tree of non-orthogonal wavelet packet Riesz bases can be derived by induction using this vector space division. As in the orthogonal case, the wavelet packets at the leaves of an admissible binary tree define a basis of W ~ but this basis is not orthogonal. The lack of orthogonality is not a problem by itself as long as the basis remains stable. Cohen and Daubechies proved [ 130] that when the depth j - L increases, the angle between the spaces W jP located at the same depth can become progressively smaller. This indicates that some of the wavelet packet bases constructed from an admissible binary tree become unstable. We thus concentrate on orthogonal wavelet packets constructed with conjugate mirror filters. 8.1.2
Time-Frequency Localization
Time Support If the conjugate mirror filters h and g have a finite impulse response of size K, Proposition 7.2 proves that q5has a support of size K - 1 so ~b~ -- ~bLhas a support of size ( K - 1)2 L. Since
~b~_l(t)-- Z h[n]~bjP(t-2Jn) n----c~
, o/,2p+l Wj+l ( t ) -
g[n]~bjP(t-2Jn) ,
Z n-
(8.18)
--cx~
an induction on j shows that the support size of ~bp is ( K - 1)2 j. The parameter j thus specifies the scale 2 j of the support. The wavelet packets in Figure 8.2 are
328
CHAPTER VIII WAVELETPACKETAND LOCAL COSINE BASES
constructed with a Daubechies filter of K -- 10 coefficients with j - 3 and thus have a support of size 23 (10 - 1) - 72. Frequency Localization The frequency localization of wavelet packets is more complicated to analyze. The Fourier transform of (8.18) proves that the Fourier transforms of wavelet packet children are related to their parent by "2p 1 ((.O) -2/)j+
" p (w) , v-'j+l f , 2 p + l (co) -- g(2Jo.;)?/)j" P((a)) . f,(2Jw)~bj
(8.19)
The energy of ~P is mostly concentrated over a frequency band and the two filters kt(2Jw) and ~(2Jco) select the lower or higher frequency components within this band. To relate the size and position of this frequency band to the indexes (p, j), we consider a simple example. Shannon Wavelet Packets Shannon wavelet packets are computed with perfect discrete low-pass and high-pass filters
Ih(c~ =
{v~ 0
if co C [-re/2 + 2krr, rr/2 + 2krr] with k C Z otherwise
(8.20)
Ig(c~ -
{x/2 0
if co E [rr/2 + 2krr, 3rr/2 + 2krr] with k C Z otherwise .
(8.21)
and
In this case it is relatively simple to calculate the frequency support of the wavelet packets. The Fourier transform of the scaling function is /~L0 = &L = l[-2-Lrr,2-rrr] 9
(8.22)
Each multiplication with ~t(2Jco) or ~(2Jco) divides the frequency support of the wavelet packets in two. The delicate point is to realize that kt(2Jw) does not always play the role of a low-pass filter because of the side lobes that are brought into the interval [--2-Lrr,2-Lrr] by the dilation. At the depth j - L, the following proposition proves that ~ is proportional to the indicator function of a pair of frequency intervals, that are labeled 1~. The permutation that relates p and k is characterized recursively [76]. Proposition 8.2
(COIFMAN,WICKERHAUSER)For any j - L > 0 and 0 <_ p <
2 j-L, there exists 0 <_k < 2 j-L such that
I Y( )l = 2j/21,~ (co),
(8.23)
where I~ is a symmetric pair of intervals 1) -- [-(k + 1)rr2 -j, -krr2 -j] U [krr2-j, (k + 1)rr2-J].
(8.24)
8.1
329
WAYELETPACKETS
The permutation k - G[p] satisfies for any 0 <_ p < 2 j-L G[2p]
2G[p] 2G[p] + 1
ifG[p] is even if G[p] is odd
(8.25)
G[2p + 1]
2G[p] + 1 2G[p]
if G[p] is even if G[p] is odd
(8.26)
Proof 3. The three equations (8.23), (8.25) and (8.26) are proved by induction on the depth j - L. For j - L - 0, (8.22) shows that (8.23) is valid. Suppose that (8.23) is valid for j -- 1 >_ L and any 0 _< p < 2 t-L. We first prove that (8.25) and (8.26) are verified for j - l. From these two equations we then easily carry the induction hypothesis to prove that (8.23) is true for j -- l + 1 and for any 0 < p < 2 / + I - L . Equations (8.20) and (8.21) imply that
Ih(2/w)l
=
{x/2 0
ifco E [ - 2 - 1 - 1 ( 4 m otherwise
Ig(2/c~ I
=
{x/~ 0
ifc~ E [-2-1-1(4m+ 1)rr, Z-/-l(4m+3)rr] withm E Z (8.28) otherwise
- 1)rr,2-/-l(am-+ -
1)rr] withm E Z
(8.27)
Since (8.23) is valid for 1, the support of ~O~'is # = [-(2k + 2)rr2 -/-1 , -2krr2 -t-l] tO[2krr2 -/-1 , (2k + 2)rr2-1-1]. The two children are defined by
+2~1 (CO)--- ~(2/C0) +pl (co) , ~,2p+l v-'t+, (co)- ~(2tco)~'(co). We thus derive (8.25) and (8.26) by checking the intersection of I~ with the supports of kt(2Jco) and ~(2Jco) specified by (8.27) and (8.28). HI For Shannon wavelet packets, Proposition 8.2 proves that ~P has a frequency support located over two intervals of size 2-Jrr, centered at + ( k + 1/2)rr2-J. The Fourier transform expression (8.23) implies that these Shannon wavelet packets can be written as cosine modulated windows ~bP(t) = 2 -j/2+l O(2-Jt) cos [2-Jrr(k + 1 / 2 ) ( t - rj,p)], with o(t)
-
sin(rrt/2) 7rt
andhence
(8.29)
/9(~) -- 1[_~/2:/2](~ ).
The translation parameter "rj,p can be calculated from the complex phase of ~ ; .
Frequency Ordering It is often easier to label r
a wavelet packet ~b; whose Fourier transform is centered at + ( k + 1/2)Tr2-J, with k - G[p]. This means changing its position in the wavelet packet tree from the node p to the node k. The resulting wavelet packet tree is frequency ordered. The left child always
330
CHAPTER VIII WAVELET PACKET AND LOCAL COSINE BASES
corresponds to a lower frequency wavelet packet and the right child to a higher frequency one. The permutation k -- G[p] is characterized by the recursive equations (8.25) and (8.26). The inverse permutation p = G -1 [k] is called a Gray code in coding theory. This permutation is implemented on binary strings by deriving the following relations from (8.25) and (8.26). If Pi is the i th binary digit of the integer p and ki the i th digit of k = G[p] then
(8.30) and Pi - - (ki -k-
ki+l) mod 2.
(8.31)
Compactly Supported Wavelet Packets Wavelet packets of compact support have a more complicated frequency behavior than Shannon wavelet packets, but the previous analysis provides important insights. If h is a finite impulse response filter, h does not have a support restricted to [-7r/2, 7r/2] over the interval [-Tr, 7r]. It is however true that the energy of h is mostly concentrated in [-7r/2, 7r/2]. Similarly, the energy of ~ is mostly concentrated in [-Tr,-7r/2] U [7r/2, 7r], for E [-Tr, 7r]. As a consequence, the localization properties of Shannon wavelet packets remain qualitatively valid. The energy of ~P is mostly concentrated over
1~ -- [-(k + 1)7r2-j, -kTr2 -)] U [kTr2-), (k + 1)Tr2-J], with k = G[p]. The larger the proportion of energy of h in [-7r/2, 7r/2], the more concentrated the energy of ~P in I~. The energy concentration of h in [-7r/2, 7r/2] is increased by having more zeroes at 7r, so that h(w) remains close to zero in [-Tr,-7r/2] U [7r/2, 7r]. Theorem 7.4 proves that this is equivalent to imposing that the wavelets constructed in the wavelet packet tree have many vanishing moments. These qualitative statements must be interpreted carefully. The side lobes of ~P beyond the intervals I~ are not completely negligible. For example, wavelet packets created with a Haar filter are discontinuous functions. Hence [+P (w)] decays like ]w]-1 at high frequencies, which indicates the existence of large side lobes outside I~. It is also important to note that contrary to Shannon wavelet packets, compactly supported wavelet packets cannot be written as dilated windows modulated by cosine functions of varying frequency. When the scale increases, wavelet packets generally do not converge to cosine functions. They may have a wild behavior with localized oscillations of considerable amplitude. Walsh Wavelet Packets
Walsh wavelet packets are generated by the Haar conju-
gate mirror filter
ifn-0,1 h[n]-
0
otherwise
8. I WAVELETPACKETS
~)0 0.4
33 I ~3
3(t)
1 %(t)
9
0.3
0.
O.
O.
0.2 o~~
. . . .
0
2
-0"2I ~
-0"2I ] 4
6
8
~4
-0.4
8
-0.4
-0"211
-0.4
O0!kll 00i //353( t )
0.
_ _
00i
~b36 (t)
2
,
~b37 (t)
-0.2[ ~_ [ _
-0.4
2
4
6
8
-0.4 ~
2
4
6
8
- "
--
4
6
8
-0.4
FIGURE 8.4 Frequency ordered Walsh wavelet packets computed with a Haar filter, at the depth j - L = 3 of the wavelet packet tree, with L -- 0. They have very different properties from Shannon wavelet packets since the filter h is well localized in time but not in frequency. The corresponding scaling function is 4~- 1[0,1] and the approximation space VL -- W ~ is composed of functions that are constant over the intervals [2Ln, 2 L (n + 1)), for n E Z. Since all wavelet packets created with this filter belong to VL, they are piecewise constant functions. The support size of h is K - 2, so Walsh functions ~bjp. have a support of size 2 j. The wavelet packet recursive relations (8.18) become
, (t) - ~ and
,P (t) + ~
~2p+l 1 j+l (t) - ~ ~bP(t)
,P (t - 2J),
1 ~/~ ~bP(t - 2J).
(8.32)
(8.33)
Since ~bp has a support of size 2J, it does not intersect the support of ~bp ( t - 2J). These wavelet packets are thus constructed by juxtaposing ~bp with its translated version whose sign might be changed. Figure 8.4 shows the Walsh functions at the depth j - L -- 3 of the wavelet packet tree. The following proposition computes the number of oscillations of ~bp. Proposition 8.3 The support of a Walsh wavelet packet ~bp is [0,2J].
support, ~bP(t)- +2 -j/2. It changes sign k permutation defined by (8.25) and (8.26).
Over its G[p] times, where G[p] is the
Proof z. By induction on j, we derive from (8.32) and (8.33) that the support is [0,2 j] and that ~bp (t) - +2 -j/2 over its support. Letk be the number of times that ~bp changes sign. The number of times that ~b~ 1 and ,~h2P+ "~j+l 1 change sign is either 2k or 2k + 1 depending on the sign of the first and last non-zero values of ~bp. If k is even, then
332
CHAPTER VIII WAVELETPACKETAND LOCAL COSINE BASES
FIGURE 8.5 The wavelet packet tree on the left divides the frequency axis in several intervals. The Heisenberg boxes of the corresponding wavelet packet basis are on the fight. the sign of the first and last non-zero values of ~P are the same. Hence the number of 2p 2p-k-1 times ~j+l and ,~h vj+l change sign is respectively 2k and 2k + 1. If k is odd, then the sign of the first and last non-zero values of ~P are different. The number of times ~2iP1 2 p-k-1 and ,Th Vj+l change sign is then 2k + 1 and 2k. These recursive properties are identical to (8.25) and (8.26). ll , j /
A Walsh wavelet packet ~P is therefore a square wave with k - G[p] oscillations over a support of size 2 j. This result is similar to (8.29), which proves that a Shannon wavelet packet ~P is a window modulated by a cosine of frequency 2-JkTr. In both cases, the oscillation frequency of wavelet packets is proportional to 2-Jk.
Heisenberg Boxes For display purposes, we associate to any wavelet packet rectangle which indicates the time and frequency domains where the energy of this wavelet packet is mostly concentrated. The time support of the rectangle is set to be the same as the time support of a Walsh wavelet packet ~pP(t- 2Jn), which is equal to [2Jn,2J(n + 1)]. The frequency support of the rectangle is defined as the positive frequency support [kTr2-j, (k + 1)7r2-j] of Shannon wavelet packets, with k = G[p]. The scale 2J modifies the time and frequency elongation of this time-frequency rectangle, but its surface remains constant. The indices n and k give its localization in time and frequency. General wavelet packets, for example computed with Daubechies filters, have a time and a frequency spread that is much wider than this Heisenberg rectangle. However, this convention has the advantage of associating a wavelet packet basis to an exact paving of the time-frequency plane. Figure 8.5 shows an example of such a paving and the corresponding wavelet packet tree. Figure 8.6 displays the decomposition of a multi-chirp signal whose spectrogram was shown in Figure 4.3. The wavelet packet basis is computed with the Daubechies 10 filter. As expected, the coefficients of large amplitude are along the trajectory of the linear and the quadratic chirps that appear in Figure 4.3. We
~pP(t- 2Jn) a Heisenberg
8. I
WAVELET PACKETS
333
FIGURE 8.6 Wavelet packet decomposition of the multi-chirp signal whose spectrogram is shown in Figure 4.3. The darker the gray level of each Heisenberg box the larger the amplitude ](f, CP)I of the corresponding wavelet packet coefficient.
f (a)
(b)
FIGURE 8.7 (a): Wavelet packet tree of a dyadic wavelet basis. (b): Wavelet packet tree of an M-band wavelet basis with M -- 2.
also see the trace of the two modulated Gaussian functions located at t - 512 and t - 896. 8.1.3
Particular Wavelet Packet Bases
Among the many wavelet packet bases, we describe the properties of M-band wavelet bases, "local cosine type" bases and "best" bases. The wavelet packet tree is frequency ordered, which means that ~ has a Fourier transform whose energy is essentially concentrated in the interval [kTr2-J, (k + 1)7r2-J], for positive frequencies.
,3,34
CHAPTER VIII WAVELETPACKETAND LOCAL COSINE BASES
M-band Wavelets The standard dyadic wavelet basis is an example of a wavelet packet basis of VL, obtained by choosing the admissible binary tree shown in Figure 8.7(a). Its leaves are the nodes k = 1 at all depth j - L and thus correspond to the wavelet packet basis
{ffa~(t -- 2Jn) }neZ,j>L constructed by dilating a single wavelet ~1. 1 1 ~j(t)----~
~1
t (~]).
The energy of ~1 is mostly concentrated in the interval [-27r,-Tr] U [Tr,27r]. The octave bandwidth for positive frequencies is the ratio between the bandwidth of the pass band and its distance to the zero frequency. It is equal to 1 octave. This quantity remains constant by dilation and specifies the frequency resolution of the wavelet transform. Wavelet packets include other wavelet bases constructed with several wavelets having a better frequency resolution. Let us consider the admissible binary tree of Figure 8.7(b), whose leaves are indexed by k = 2 and k -- 3 at all depth j - L. The resulting wavelet packet basis of VL is
2Jn), g2~(t- 2Jn)}neZ,j>L+l.
{~b2(t -
These wavelet packets can be rewritten as dilations of two elementary wavelets ~bz and ~b3"
1
~2 ~,{ t
'
3
1
~b3
(~ t ) 9
Over positive frequencies, the energy of ~32 and ~3 is mostly concentrated respectively in [rr,3rr/2] and [3rr/Z, Zrr]. The octave bandwidths of ~2 and ~3 are thus respectively equal to 1/2 and 1/3. These wavelets ~2 and ~b3 have a higher frequency resolution than ~b1, but their time support is twice as large. Figure 8.8(a) gives a 2-band wavelet decomposition of the multi-chirp signal shown in Figure 8.6, calculated with the Daubechies 10 filter. Higher resolution wavelet bases can be constructed with an arbitrary number of M - 21 wavelets. In a frequency ordered wavelet packet tree, we define an admissible binary tree whose leaves are the indexes 2 l _< k < 21+1 at the depth j - L > I. The resulting wavelet packet basis
{~b~(t - 2in)}M<_kL+I can be written as dilations and translations of M elementary wavelets k
1
~bk
t
8. I WAVELE+PACKERS
335
FIGURE 8.8 (a): Heisenberg boxes of a 2-band wavelet decomposition of the multi-chirp signal shown in Figure 8.6. (b): Decomposition of the same signal in a pseudo-local cosine wavelet packet basis.
The support size of ~ is proportional to M -- 2 I. Over positive frequencies, the energy of ~ is mostly concentrated in [kTr2-l, (k + 1)7r2-/]. The octave bandwidth is therefore 7rZ-I/(kTr2 -l) -- k -1, forM < k < 2M. The M wavelets {~k}M 0. The leaves are the nodes indexed by 0 _< k < 2 J-L and the resulting wavelet packet basis is
{@jk(t -
2Jn)}ncg,O
(8.34)
If these wavelet packets are constructed with a conjugate mirror filter of size K, they have a support of size ( K - 1)2 J. Over positive frequencies, the energy of ~ is concentrated in [kTr2-J, (k + 1)Tr2-J]. The bandwidth of all these wavelet packets is therefore approximately constant and equal to 7r2-J. The Heisenberg
336
CHAPTER VIII
WAVELET PACKET AND LOCAL COSINE BASES
.O
---"t
FIGURE 8.9 Admissible tree and Heisenberg boxes of a wavelet packet pseudo local cosine basis. boxes of these wavelet packets have the same size and divide the time-frequency plane in the rectangular grid illustrated in Figure 8.9. Shannon wavelet packets ~ak are written in (8.29) as a dilated window 0 modulated by cosine functions of frequency 2 -J (k + 1/2)7r. In this case, the uniform wavelet packet basis (8.34) is therefore a local cosine basis, with windows of constant size. This result is not valid for wavelet packets constructed with different conjugate mirror filters. Nevertheless, the time and frequency resolution of uniform wavelet packet bases (8.34) remains constant, like that of local cosine bases constructed with windows of constant size. Figure 8.8(b) gives the decomposition coefficients of a signal in such a uniform wavelet packet basis. Best Basis Applications of orthogonal bases often rely on their ability to efficiently approximate signals with only a few non-zero vectors. Choosing a wavelet packet basis that concentrates the signal energy over a few coefficients also reveals its time-frequency structures. Section 9.4.2 describes a fast algorithm that searches for a "best" basis that minimizes a Schur concave cost function, among all wavelet packet bases. The wavelet packet basis of Figure 8.6 is calculated with this best basis search. 8.1.4
Wavelet Packet Filter Banks
Wavelet packet coefficients are computed with a filter bank algorithm that generalizes the fast discrete wavelet transform. This algorithm is a straightforward iteration of the two-channel filter bank decomposition presented in Section 7.3.2. It was therefore used in signal processing by Croisier, Esteban and Galand [ 141] when they introduced the first family of perfect reconstruction filters. The algorithm is presented here from a wavelet packet point of view. To any discrete signal input bin] sampled at intervals N -1 -- 2L, like in (7.116) we associate f c VL whose decomposition coefficients aL[n] = ( f , qbL,,,) satisfy b[n] - N 1/2 at.[n] '~ f ( N - l n )
.
(8.35)
For any node (j, p) of the wavelet packet tree, we denote the wavelet packet
8. I
WAVELET PACKETS
337
coefficients
djP[n] - (f (t), ~jP(t_ZJn)). At the root of the tree
d~
= aL[n] is computed from bin] with (8.35).
Wavelet Packet Decomposition We denote ~ [ n ] - x[-n] and by ,~ the signal obtained by inserting a zero between each sample of x. The following proposition generalizes the fast wavelet transform Theorem 7.7.
Proposition 8.4 At the decomposition dj+ 2p l [k ] -- djP .
h[2k] and
r/2p+l ~-'j+l [k] - d;*~[2k].
(8.36)
At the reconstruction ,S/2p+ 1 dP[k] - djZ~l ,h[k] +~,j+ 1 , g[k].
(8.37)
The proof of these equations is identical to the proof of Theorem 7.7. The ,42P+ 1 are obtained by subsampling coefficients of wavelet packet children dj2~_land ~.j+l the convolutions of djP with h and ~,. Iterating these equations along the branches of a wavelet packet tree computes all wavelet packet coefficients, as illustrated by Figure 8.10(a). From the wavelet packet coefficients at the leaves {ji, Pi}l
Finite Signals If aL is a finite signal of size 2 -L - N, we are facing the same border convolution problems as in a fast discrete wavelet transform. One approach explained in Section 7.5.1 is to periodize the wavelet packet basis. The convolutions (8.36) are then replaced by circular convolutions. To avoid introducing sharp transitions with the periodization, one can also use the border filters described in Section 7.5.3. In either case, d p has 2 - j samples. At any depth j - L of the tree, the wavelet packet signals {d;}0
338
CHAPTER VIII WAVELETPACKET AND LOCAL COSINE BASES
0 dE
v
1~~~~-d~i--]
[
~
~
d3L+2
(a)
d3L+2~~~I
~ ~-- L
~
~
(b) FIGURE 8.10 (a): Wavelet packet filter-bank decomposition with successive filterings and subsamplings. (b): Reconstruction by inserting zeros and filtering the outputs. Discrete Wavelet Packet Bases of 12(Z) The signal decomposition in a conjugate mirror filter bank can also be interpreted as an expansion in discrete wavelet packet bases of 12(Z). This is proved with a result similar to Theorem 8.1.
Theorem 8.2 Let {Oj[m- 2J-Ln]}nEZ be an orthonormal basis of a space Uj, with
j - L E N. Define 00+
l[m] --
Z
1 l[m] -- Z h[n] Oj[m- 2J-Ln] , Oj+
n=-cr
g[n] Oj[m- 2J-Ln]. (8.38)
n=-cr
The family { oj+i o [ m - 2 j+l-Ln] , Oj+l 1 [m - 2 j+l -%]}n~Z
is an orthonormal basis of Uj. The proof is similar to the proof of Theorem 8.1. As in the continuous time case, we derive from this theorem a binary tree of discrete wavelet packets. At the root of the discrete wavelet packet tree is the space W ~ - 12(Z) of discrete signals obtained with a sampling interval N -1 - 2 L. It admits a canonical basis of Diracs {~~ n ] - c~[m- n]}nEZ. The signal aL[m] is specified by its sample values in this basis. One can verify that the convolutions and subsamplings (8.36) compute
d~[n] - (aL[m], ~ [ m - 2J-Ln]),
8.2
IMAGEWAVELETPACKETS
339
where { ~ P [ m - 2J-Ln]}nEZ is an orthogonal basis of a s p a c e W jP. These discrete wavelet packets are recursively defined for any j > L and 0 _< p < 2 J-L by
~_
h[n]~jP[m- 2J-Ln] , ~/,2p+, wj+l [m] -
l[m] -- Z /1~--CX3
Z
g[n]~bjP[m- 2J-Ln].
/ ~ ' - - - - OQ
(8.39) 8.2
IMAGE WAVELET PACKETS 2
8.2. I
Wavelet Packet Quad-Tree
We construct wavelet packet bases of L 2 (]~2) w h o s e elements are separable products of wavelet packets ~ P ( x l - 2 J n l ) ~ q ( x 2 - 2Jn2) having the same scale along x~ and x2. These separable wavelet packet bases are associated to quad-trees, and divide the two-dimensional Fourier plane (~ol, CO2) into square regions of varying sizes. Separable wavelet packet bases are extensions of separable wavelet bases. If images are approximated at the scale 2L, to the root of the quad-tree we associate the approximation space V 2 - VL | V~. C L2(]R 2) defined in Section 7.7.1. Section 8.1.1 explains how to decompose VL with a binary tree of wavelet packet spaces WjP c VL, which admit an orthogonal basis {~bP(t- 2Jn)},~z. The twodimensional wavelet packet quad-tree is composed of separable wavelet packet spaces. Each node of this quad-tree is labeled by a scale 2 j and two integers 0 <_p < 2 j-L and 0 <_ q < 2j-L, and corresponds to a separable space WjP,q - WjP | Wj.q
(8.40)
The resulting separable wavelet packet for x - (Xl ,x2) is
Theorem A.3 proves that an orthogonal basis of W jP'q is obtained with a separable product of the wavelet packet bases of W jP and W qj, which can be written
At the root W ~176 - V 2 and the wavelet packet is a two-dimensional scaling function : , 0 (x) -
- +, (Xl) +,
One-dimensional wavelet packet spaces satisfy p
2p
v~lZp+ 1
Wj - Wj+ 1 | .. j+l
q 2q wZq+ 1 a n d W j - Wj_k_1 ~) ,, j + l "
Inserting these equations in (8.40) proves that WjP'q is the direct sum of the four orthogonal subspaces Wj
p , q __ , l ~ 1 2 p , 2 q
"" j + l
(~) W j
2p+ 1,2q
~ 2 p , 2 q + 1 V/12p+ 1,2q+ 1 O ,, j + l O "" j + l "
(8.41)
340
CHAPTER VIII WAVELETPACKETAND LOCAL COSINE BASES
Wjp,q W 2p,2q 2 p + l , 2 q 2p,2q+l~txr2p+l,2q+l j+l Wj+l W j+l v v j+l
FIGURE 8. I I A wavelet packet quad-tree for images is constructed recursively by decomposing each separable space W p'q in four subspaces. These subspaces are located at the four children nodes in the quad-tree, as shown by Figure 8.11. We call admissible quad-tree any quad-tree whose nodes have either 0 or 4 children. Let {ji, pi,qi}o
-
I WPi ,qi
~)i=l
The union of the corresponding wavelet packet bases
(2/3jPi'qi(x--2Jin)}(nl,n2)EZ2,1
Proposition 8.5 The number Bs of wavelet packet bases in a full wavelet packet
quad-tree of depth J satisfies 49AJ- 1 24s-1 _< Bs < 2~.
Proof 3. This result is proved with induction, as in the proof of Proposition 8.5. The reader can verify that Bj satisfies an induction relation similar to (8.16):
Bs+l -- B4 + 1.
(8.42)
Since B0 -- 1, B1 = 2, and Bs+l > B~s,we derive that Bs >_2 4s-1 . Moreover, for J _> 1 log2njq_l _.. 41og2B J -~-log2( 1 + B j 4 ) ~ 41og2B J + 1
which implies that Bs _> 2 ~ 4J-1 .
J-1 <~ 4j.q - ~6 ~ ' ~ 4 j ' j=0
II
8.2 IMAGEW A V E L E T PACKETS
341
For an image of N 2 pixels, we shall see that the wavelet packet quad-tree has a depth at most log2 N. The number of wavelet packet bases thus satisfies N2
49 N 2
2-r _< Blog2N < 248
4
(8.43)
.
Spatial and Frequency Localization The spatial and frequency localization of two-dimensional wavelet packets is derived from the time-frequency analysis performed in Section 8.1.2. If the conjugate mirror filter h has K non-zero coefficients, we proved that ~P has a support of size 2J (K - 1) hence ~P (Xl) ~q (x2) has a square support of width 2J (K - 1). We showed that the Fourier transform of ~P has its energy mostly concentrated in [ - ( k + 1)2-JTr,-k2-JTr] U [k2-JTr, (k + 1)2-JTr], where k - G[p] is specified by Proposition 8.2. The Fourier transform of a twodimensional wavelet packet cP'q therefore has its energy mostly concentrated in (8.44)
[kl2-JTr, (kl-t- 1)2-JTr] x [kz2-JTr, (k2 + 1)2-JTr],
with kl - a[p] and k2 = G[q], and in the three squares that are symmetric with respect to the two axes CO1 = 0 and CO2= 0. An admissible wavelet packet quadtree decomposes the positive frequency quadrant into squares of dyadic sizes, as illustrated in Figure 8.12. For example, the leaves of a full wavelet packet quadtree of depth j - L define a wavelet packet basis that decomposes the positive frequency quadrant into squares of constant width equal to 2-JTr. This wavelet packet basis is similar to a two-dimensional local cosine basis with windows of constant size.
8.2.2
Separable Filter Banks
The decomposition coefficients of an image in a separable wavelet packet basis are computed with a separable extension of the filter bank algorithm described in Section 8.1.4. Let b[n] be an input image whose pixels have a distance 2 L = N -1 . We associate to b[n] a function f C V 2 approximated at the scale 2 L, whose decomposition coefficients aL [n] -- ( f (x), r (x -- 2Ln)} are defined like in (7.265):
b[n] - NaL[n] ,-~ f ( N - ' n )
.
The wavelet packet coefficients
djP'q [n] -- (f, ~bjP'q ( X characterize the orthogonal projection of f
in
--
2Jn) )
wjP'q. At the root, d ~176 aL -
-
342
CHAPTER VIII
WAVELET PACKET AND LOCAL COSINE BASES
0,0
WE
W~176 ~ / / ~ o , ~ , x
m2
r 1,1
Cg~, ',,,
2-Err m7
FIGURE 8.12 A wavelet packet quad-tree decomposes the positive frequency quadrant into squares of progressively smaller sizes as we go down the tree.
Separable Filter Bank
From the separability of wavelet packet bases and the one-dimensional convolution formula of Proposition (8.4), we derive that for any
(nl,n2) dj2p,2q +1 [n]
--
d p'q.hh[2n] , ,42p+ ~'j+l 1,2q [ n ] = d jP'q . ~/t[2n],
(8.45)
d2p,2q+l j+l [n]
--
"42p+l'2q+l [n] djP'q -k h~' [2n] , ~'j+l
(8.46)
- d j P'q . ~,$[2n].
The coefficients of a wavelet packet quad-tree are thus computed by iterating these equations along the branches of the quad-tree. The calculations are performed with separable convolutions along the rows and columns of the image, illustrated in Figure 8.13. At the reconstruction
djP,q In]
1 -k hh[n] + ,7/2p+ clj+ 2p'zq W+I 1,2q , gh[n] ,7/2p,2q+l nt- '~j+l "k hg[n]
,~/2p+ 1,2q+ 1
+ ~j+l
,gg[n].
(8.47)
The image aL -- d ~176 is reconstructed from wavelet packet coefficients stored at the leaves of any admissible quad-tree by repeating the partial reconstruction (8.47) in the inside nodes of this quad-tree.
Finite Images If the image aL has N 2 = 2 - 2 L pixels, the one-dimensional convolution border problems are solved with one of the two approaches described in Sections 7.5.1 and 7.5.3. Each wavelet packet image d; 'q i n c l u d e s 2 -2j pixels. At the depth j - L, there are N 2 wavelet packet coefficients in {djP'q }O<_p,q<2J-L. A quad-tree of maximum depth log 2 N thus includes N 2 log 2 N coefficients. If h
8.3
Rows
Columns ~
P,q
~ ]
~
343
BLOCK TRANSFORMS
~
~,2p,2q+l.._
dj
.~
~-'-
(a) Columns
~A
d2pi2q OJ+1 1,2q j+l 2p+l,2q+l uj+ 1
Rows
j+l 2p,2q+1 , V T dj+l
- - ~ ~'2
d2p+l
.~
i
2p+1,2q+1
~ - - d .P'q J
(b) FIGURE 8.13 (a): Wavelet packet decomposition implementing (8.45) and (8.46) with one-dimensional convolutions along the rows and columns of d~ 'q. (b): Wavelet packet reconstruction implementing (8.47).
and g have K non-zero coefficients, the one-dimensional convolutions that implement (8.45) and (8.46) require 2K2 -2j multiplications and additions. All wavelet packet coefficients at the depth j + 1 - L are thus computed from wavelet packet coefficients located at the depth j - L with 2 K N 2 calculations. The N 2 log 2 N wavelet packet coefficients of a full tree of depth log 2 N are therefore obtained with 2 K N 2 log 2 N multiplications and additions. The numerical complexity of reconstructing aL from a wavelet packet basis depends on the number of inside nodes of the corresponding quad-tree. The worst case is a reconstruction from the leaves of a full quad-tree of depth log 2 N, which requires 2 K N 2 log 2 N multiplications and additions. 8.3
BLOCK T R A N S F O R M S 1
Wavelet packet bases are designed by dividing the frequency axis in intervals of varying sizes. These bases are thus particularly well adapted to decomposing signals that have different behavior in different frequency intervals. If f has properties that vary in time, it is then more appropriate to decompose f in a block basis that segments the time axis in intervals whose sizes are adapted to the signal structures. The next section explains how to generate a block basis of L2(R) from
344
CHAPTER Vlll
WAVELET PACKET AND LOCAL COSINE BASES
any basis of L2[0,1]. The cosine bases described in Sections 8.3.2 and 8.3.3 define particularly interesting block bases. 8.3. I
Block Bases
Block orthonormal bases are obtained by dividing the time axis in consecutive intervals [ap, ap+l] with lim a e - - c ~
and
p--+-c~
lim a e = +c~.
p--++cx~
The size lp -- a p + l -- a p of each interval is arbitrary. Let g -- 1[0,1]. An interval is covered by the dilated rectangular window
g p ( t ) - l[ap,ap+~](t)- g
(t-ap). lp
(8.48)
The following theorem constructs a block orthogonal basis of L2 (I~) from a single orthonormal basis of L 2 [0,1]. Theorem 8.3 /f {ek}k~z is an orthonormal basis of L210,1] then {
gp,k(t) -- gp(t)
} 1_
~_ t p
ek ( --lpap )
(8.49) (p,k)EZ
is a block orthonormal basis of L2 (R). Proof 1. One can verify that the dilated and translated family
-~p ek
lp
keZ
(8.50)
is an orthonormal basis of L2[ap,ap+l]. If p # q then (gp,k,gq,k) = 0 since their supports do not overlap. The family (8.49) is thus orthonormal. To expand a signal f in this family, it is decomposed as a sum of separate blocks +~
f (t) -- ~
f (t) gp(t),
p=-oo
and each block f(t)gp(t) is decomposed in the basis (8.50). Block Fourier Basis
II
A block basis is constructed with the Fourier basis of L 2 [0,1]: { e k ( t ) - exp(i2kTrt) }ke z.
The time support of each block Fourier vector gp,k is [ap,ap+l], of size Ip. The Fourier transform of g - 110,1] is ~(w)--
sin(co/2) (ico) co/2 exp -~-
8.3
345
BLOCK TRANSFORMS
and
~p,k(03) -- ~c/-i-p~,(lp03- 2kTr) exp ( -i27rkap ) lp It is centered at 2kTrlp 1 and has a slow asymptotic decay proportional to lp 11031-1. Because of this bad frequency localization, even though a signal f is smooth, its decomposition in a block Fourier basis may include large high frequency coefficients. This can also be interpreted as an effect of periodization. Discrete Block Bases For all p C Z, we suppose that ap C Z. Discrete block bases are built with discrete rectangular windows whose supports are [ap~ap+l - 1]
gpfn] = l[ap,ap+l_l](n ). Since dilations are not defined in a discrete framework, we generally cannot derive bases of intervals of varying sizes from a single basis. The following theorem thus supposes that we can construct an orthonormal basis of C l for any 1 > 0. The proof is straightforward. Theorem 8.4
Suppose that {ek,l}O O.
The family (8.51)
{ gp,k[n] -- gp[n] ek,lp [n -- ap] }O<_k
is a block orthonormal basis ofl 2(Z). A discrete block basis is constructed with discrete Fourier bases
{
1 (i27rkn)) ek,t[n]- --~ exp l
0
The resulting block Fourier vectors gp,k have sharp transitions at the window border, and are thus not well localized in frequency. As in the continuous case, the decomposition of smooth signals f may produce large amplitude high frequency coefficients because of border effects. Block Bases of Images General block bases of images are constructed by partitioning the plane/t~ 2 into rectangles {[ap,bp] • [cp,dp]}p~z of arbitrary length Ip = bp- ap and width Wp - - d p - %. Let {ek}k~Z be an orthonormal basis of L2[0, 1] and g - 1[0,1]. We denote
) q(y
Wp
1 e,
v/lpWp
lp
)e (Y --Cp)
The family {gp,k,j}(k,j)~Z2 is an orthonormal basis of L2([ap,bp] hence { gp,k,j}(p,k,j)~Z3 is an orthonormal basis of L2(R2).
.
Wp
• [cp,dp]), and
346
CHAPTER Vlll
,
WAVELET PACKET AND LOCAL COSINE BASES
,,
I
f(t)
,
I
-1
I
0
1
,
I
2
FIGURE 8.14 The function )~(t) is an extension of f(t); it is symmetric about 0 and of period 2.
For discrete images, we define discrete windows that cover each rectangle gp -- l[ap,bp_l]x[cp,dp_l].
If {ek,l}O<~ O, then { gp,k,j[nl,n2] -- gp[nl,n2] ek,lp[nl -- ap] ej,wp[n2 -- Cp] }
(k,j,p)cZ3"
is a block basis of 12(Z2). 8.3.2
Cosine Bases
If f C L2[O, 1] and f(O) ~ f(1), even though f might be a smooth function, the Fourier coefficients (f(u), e i2t~Tru) --
1
f0
f (u) e -i2tcTrudu
have a relatively large amplitude at high frequencies 2kTr. Indeed, the Fourier series expansion
f (t) -- Z (f(u), e i21cTru)e i2kTrt k=-oo is a function of period 1, equal to f over [0, 1], and which is therefore discontinuous if f(0) ~ f(1). This shows that the restriction of a smooth function to an interval generates large Fourier coefficients. As a consequence, block Fourier bases are rarely used. A cosine I basis reduces this border effect by restoring a periodic extension f of f which is continuous if f is continuous. High frequency cosine I coefficients thus have a smaller amplitude than Fourier coefficients. Cosine I Basis We define f to be the function of period 2 that is symmetric about 0 and equal to f over [0,1]"
~f(t)-
f(t) f(-t)
for t C [0, 1] fort C ( - 1 , 0 )
(8.52)
If f is continuous over [0, 1] then f is continuous over I~, as shown by Figure 8.14. However, if f has a non-zero right derivative at 0 or left derivative at 1, then f is non-differentiable at integer points.
8.3 BLOCKTRANSFORMS
347
The Fourier expansion of f over [0,2] can be written as a sum of sine and cosine terms:
)(t) -- E
a[k] cos
~
+Zb[klsin
k=-0
k--1
The sine coefficients b[k] are zero because f is even. Since f ( t ) - f ( t ) over [0, 1], this proves that any f C LZ[0, 1] can be written as a linear combination of the cosines {cos(kTrt)}~eN. One can verify that this family is orthogonal over [0, 1]. It is therefore an orthogonal basis of L2[0,1], as stated by the following theorem. T h e o r e m 8.5 (COSINEI) The family
cos( :t)
with Ak --
2 1/2 1
ifk-O if k r O
is an orthonormal basis of L2[O, 1]. Block Cosine Basis Letus divide the real line with square windows gp Theorem 8.3 proves that
{
- g (tl
--
l[ap,ap+l].
t - ap I
Ip ) kcN,pcZ
is a block basis of L2(R). The decomposition coefficients of a smooth function have a faster decay at high frequencies in a block cosine basis than in a block Fourier basis, because cosine bases correspond to a smoother signal extension beyond the intervals [ a p , a p + l ] . Other cosine bases are constructed from Fourier series, with different extensions of f beyond [0, 1]. The cosine IV basis appears in fast numerical computations of cosine I coefficients. It is also used to construct local cosine bases with smooth windows in Section 8.4.2. Any f E L2[0, 1] is extended into a function f of period 4, which is symmetric about 0 and antisymmetric about 1 and -1" Cosine IV Basis
f(t)-
f(t) f(-t) -f(2-t) -f(2+t)
if t E [0, 1] if t E ( - 1,0) iftc[1,2) iftE[-1,-2)
If f(1) ~ 0, the antisymmetry at 1 creates a function f that is discontinuous at f ( 2 n + 1) for any n E Z, as shown by Figure 8.15. This extension is therefore less regular than the cosine I extension (8.52).
348
CHAPTER VIII WAVELETPACKET AND LOCAL COSINE BASES
I
I
I
I
I
I
i
FIGURE 11.15 A cosine IV extends f(t) into a signal f(t) of period 4 which is symmetric with respect to 0 and antisymmetric with respect to 1. Since f is 4 periodic, it can be decomposed as a sum of sines and cosines of period 4:
+~ f(t)--Za[k]c~
(27rkt
+~
(27rkt).
4 )+Zb[k]sin\---4--, /
k=0
k=l
The symmetry about 0 implies that
b[k]=~
2) ( t ) s i n T
at=o.
For even frequencies, the antisymmetry about 1 and - 1 yields If 2 (27r(2k)t) a[2k] -- ~ 2 f(t) cos 4
dt = O.
The only non-zero components are thus cosines of odd frequencies: +~
f(t) - Z a[Zk + 11 cos
( ( 2 k + 1)27rt) 4 "
(8.53)
k=0
Since f(t) - f(t) over [0, 1], this proves that any f E L2[0,1] is decomposed as a sum of such cosine functions. One can verify that the restriction of these cosine functions to [0,1] is orthogonal in L 2 [0,1], which implies the following theorem. Theorem 8.6 (COSINE IV)
The family {V~cos[(k+ ~)Trt] lk~ N
is an orthonormal basis of L210,1]. The cosine transform IV is not used in block transforms because it has the same drawbacks as a block Fourier basis. Block Cosine IV coefficients of a smooth f have a slow decay at high frequencies because such a decomposition corresponds to a discontinuous extension of f beyond each block. Section 8.4.2 explains how to avoid this issue with smooth windows.
8.3
8.3.3
349
BLOCK TRANSFORMS
Discrete Cosine Bases
Discrete cosine bases are derived from the discrete Fourier basis with the same approach as in the continuous time case. To simplify notations, the sampling distance is normalized to 1. If the sampling distance was originally N -1 then the frequency indexes that appear in this section must be multiplied by N. Discrete Cosine I A signal f[n] defined for 0 < n < N is extended by symmetry with respect to - 1 / 2 into a signal fin] of size 2N:
fin]-
f[n]
f[-n-1]
for 0 < n < N for - N < n <__- I
"
(8.54)
The 2N discrete Fourier transform of f can be written as a sum of sine and cosine terms: Nil
i[n] -- E a[k] cos k=0
[~(1) n+
N-1
+ Z b[k] sin
[_~(1) n+
k=O
Since f is symmetric about - 1/2, necessarily b[k] - 0 for 0 <_ k < N. Moreover f[n] - f[n] for 0 <_ n < N, so any signal f C C N can be written as a sum of these cosine functions. The reader can also verify that these discrete cosine signals are orthogonal in C u. We thus obtain the following theorem. T h e o r e m 8.7
{
(COSINEI) The family
' }
2 1/2 0
with A t -
1
ifk = 0 otherwise
is an orthonormal basis of C N. This theorem proves that any f C (~N can be decomposed into
f [ n ] - -~ E is[k] )t~ cos
n+ ~
(8.55)
,
k=O where
-
Z
n--0
. +
(8.56)
is the discrete cosine transform I (DCT-I) of f . The next section describes a fast discrete cosine transform which computes f i with O(N log 2 N) operations.
350
CHAPTER VIII
WAVELET PACKET AND LOCAL COSINE BASES
Discrete Block Cosine Transform Let us divide the integer set Z with discrete windows gp[n] = l[ap,ap_l](n), with ap C Z. Theorem 8.4 proves that the corresponding block basis
gp,~[n]--gp[n]Ak
~pcos--~p(n+-~-ap)
0___k
is an orthonormal basis of Iz(z). Over each block of size I p =- a p + l - - ap, the fast DCT-I algorithm computes all coefficients with O(lplog 2 lp) operations. Section 11.4.3 describes the JPEG image compression standard, which decomposes images in a separable block cosine basis. A block cosine basis is used as opposed to a block Fourier basis because it yields smaller amplitude high frequency coefficients, which improves the coding performance. To construct a discrete cosine IV basis, a signal f of N samples is extended into a signal f of period 4N, which is symmetric with respect to - 1 / 2 and antisymmetric with respect to N - 1/2 and - N + 1/2. As in (8.53), the decomposition of f over a family of sines and cosines of period 4N has no sine terms and no cosine terms of even frequency. Since f[n] - f[n], for 0 < n < N, we derive that f can also be written as a linear expansion of these odd frequency cosines, which are orthogonal in C N. We thus obtain the following theorem. Discrete Cosine IV
Theorem 8.8 (COSINE IV) The family
(n+ O
is an orthonormal basis of C u. This theorem proves that any f E C u can be decomposed into N-1
f[n] - -~ 2 E flv[k] cos I N ( k + ~ ) ( n + 51)1 '
(8.57)
k=0
where
N-1
f,v[kl-Ef[nlcos
7r( 1)( 1)1 ~ k+~ n+
(8.58)
n--0
is the discrete cosine transform IV (DCT-IV) of f. 8.3.4
Fast Discrete Cosine Transforms 2
The discrete cosine transform IV (DCT-IV) of a signal of size N is related to the discrete Fourier transform (DFT) of a complex signal of size N/2 with a formula introduced by Duhamel, Mahieux, and Petit [ 176, 42]. By computing this DFT with the fast Fourier transform (FFT) described in Section 3.3.3, we need O(Nlog 2N) operations to compute the DCT-IV. The DCT-I coefficients are then calculated through an induction relation with the DCT-IV, due to Wang [346].
8.3 BLOCKTRANSFORMS
351
Fast DCT-IV To clarify the relation between a DCT-IV and a DFT, we split fin] in two half-size signals of odd and even indices:
b[n]c[n] -
f[2n], f[N-1-2n].
The DCT-IV (8.58) is rewritten
[
'
b[n] cos (2n + ~ ) ( k + ~)
+
n=0
N/2-1 ~
c[~l ~o~ ( N - 1 - 2 n +
~) ( k + ~)
n=0
N/2-1
z~co~
(rt -q--~1
)(~+ -~1 ) 27r] +
n--0
(--1)k Z
[
1
l.
c[n]sin ( n + ~ ) ( k + ~ )
n=0
The even frequency indices can thus be expressed as a real part f i r [2k] -
[-i27rkn]} N/2
Real { exp [~_k ] X---,N/2-1 i z__,n=0 (b[n]+ic[n])exp[--i(n+-a)N]exp
'
(8.59) whereas the odd coefficients correspond to an imaginary part
)clv[N - 2k - 1] -I 7r exp +ic[n])exp [ - i ( n + ~)~] - I m { exp[Zd~] X-~N/2-1(b[n] z_,~=o
[-i27rknl} N/2 ]
" (8.60)
For 0 < n < N/2, we denote
g[n] -- (b[n] + ic[n])exp - i ( n + -~)
.
The DFT ~[k] of g[n] is computed with an FFT of size N/2. Equations (8.59) and (8.60) prove that flv[2k]-Real
exp
N
and
)clv[N- 2 k - 1] - - I m {exp
g[kl '
-irck
~-
CHAPTER VIII WAVELETPACKETAND LOCAL COSINE BASES
The DCT-IV coefficients f/v[k] are thus obtained with one FFT of size N/2 plus O(N) operations, which makes a total of O(Nlog 2 N) operations. To normalize / - - - . -
the DCT-IV, the resulting coefficients must be multiplied by X/2. An efficient implementation of the DCT-IV with a split-radix F F r requires [42] v
N
(8.61)
lZDCT_Iv(N) -- -~ log 2 N + N, real multiplications and 3N
aDCT-Iv(N) -- - ~ log2 N
(8.62)
additions. The inverse DCT-IV of ~ftv is given by (8.57). Up to the proportionality constant 2IN, this sum is the same as (8.58), where f / v and f are interchanged. This proves that the inverse DCT-IV is computed with the same fast algorithm as the forward DCT-IV. ^
Fast DCT-I A DCT-I is calculated with an induction relation that involves the DCT-IV. Regrouping the terms f[n] and f[N - 1 - n] of a DCT-I (8.56) yields
fl[2k]
-
Ak Z
(/[n] + f [ N -
1 -nl)cos
n+
,
(8.63)
n--0
N/2-1 -
.
(8.64
n=0
The even index coefficients of the DCT-I are thus equal to the DCT-I of the signal f[n] + fIN - 1 - n] of length N/2. The oaa coefficients are equal to the DCT-IV of the signal f[n] - Z[N - 1 - n] of length N/2. The number of multiplications of a DCT-I is thus related to the number of multiplications of a DCT-IV by the induction relation
]s
-- I.ZDCT-I(N/2) + #DCT-Iv(N/2),
(8.65)
while the number of additions is
Owcr-i(N) = aoCr-l(N/2) + aoCr-lv(N/2) + N.
(8.66)
Since the number of multiplications and additions of a DCT-IV is O(N log 2 N) this induction relation proves that the number of multiplications and additions of this algorithm is also O(N log 2 N). If the DCT-IV is implemented with a split-radix FFT, inserting (8.61) and (8.62) in the recurrence equations (8.65) and (8.66), we derive that the number of multiplications and additions to compute a DCT-I of size N is N
Izocr-i(N) - ~ log2 N + 1,
(8.67)
8.4 LAPPEDORTHOGONALTRANSFORMS
and
3N
OLDCT-I(N) -- - ~ log2 N - N + 1.
353
(8.68)
The inverse DCT-I is computed with a similar recursive algorithm. Applied to f i , it is obtained by computing the inverse DCT-IV of the odd index coefficients ft[2k + 1] with (8.64) and an inverse DCT-I of a size N/2 applied to the even coefficients )~l[2k] with (8.63). From the values fin] + fIN- 1 - n ] and f[n]fIN- 1 - n ] , we recover fin] and fiN- 1 - n ] . The inverse DCT-IV is identical to the forward DCT-IV up to a multiplicative constant. The inverse DCT-I thus requires the same number of operations as the forward DCT-I.
8.4
LAPPED O R T H O G O N A L T R A N S F O R M S 2
Cosine and Fourier block bases are computed with discontinuous rectangular windows that divide the real line in disjoint intervals. Multiplying a signal with a rectangular window creates discontinuities that produce large amplitude coefficients at high frequencies. To avoid these discontinuity artifacts, it is necessary to use smooth windows. The Balian-Low Theorem 5.6 proves that for any u0 and ~0, there exists no differentiable window g of compact support such that
{ g(t- nuo) exp(ik{ot)} (n,k)~z2 is an orthonormal basis of L 2 (R). This negative result discouraged any research in this direction, until Malvar discovered in discrete signal processing that one could create orthogonal bases with smooth windows modulated by a cosine IV basis [262, 263]. This result was independently rediscovered for continuous time functions by Coifman and Meyer [ 138], with a different approach that we shall follow here. The roots of these new orthogonal bases are lapped projectors, which split signals in orthogonal components with overlapping supports [46]. Section 8.4.1 introduces these lapped projectors; the construction of continuous time and discrete lapped orthogonal bases is explained in the following sections. The particular case of local cosine bases is studied in more detail.
8.4. I
Lapped Projectors
Block transforms compute the restriction of f to consecutive intervals [ap,ap§ and decompose this restriction in an orthogonal basis of [ap,ap+l]. Formally, the restriction of f to [ap,ap+l] is an orthogonal projection on the space W p of functions with a support included in [ap,ap+l]. To avoid the discontinuities introduced by this projection, we introduce new orthogonal projectors that perform a smooth deformation of f . Projectors on Half Lines Let us first construct two orthogonal projectors that decompose any f E L2(]~) in two orthogonal components P+f and P-f whose
~,,~4
CHAPTER VIII
WAVELET PACKET AND LOCAL COSINE BASES
supports are respectively [-1, +c~) and (-cr 1]. For this purpose we consider a monotone increasing profile function/3 such that /3(t) - ( 0 if t < - 1 / 1 ift> 1
(8.69)
Vt C [-1, 1] , /32(t) +/32(-t) = 1.
(8.70)
and A naive definition
P+ f(t) =/32(t) f(t)
and P- f(t) =/32(-t) f(t)
satisfies the support conditions but does not define orthogonal functions. Since the supports of P+ f(t) and P - f (t) overlap only on [- 1,1], the orthogonality is obtained by creating functions having a different symmetry with respect to 0 on
[-1,1]:
P+f(t) =/~(t) [/3(t) f ( t ) + / 3 ( - t )
f ( - t ) ] =/3(t) p(t),
(8.71)
P - f (t) = / 3 ( - t ) [/3(-t)f(t) - fl(t) f (-t)] = / 3 ( - t ) q(t) .
(8.72)
and
The functions p(t) and q(t) are respectively even and odd, and since/3(t)~(-t) is even it follows that
,(P+ f ,P- f ) --
L 1f l ( t ) ~ ( - t ) p ( t ) q * ( t ) d t - O .
(8.73)
1
Clearly P + f belongs to the space W + of functions f E L2(IR) such that there exists p(t) = p ( - t ) with
f(t)
0 /3(t)p(t)
if t < - 1 iftc[-1,1]
"
Similarly P - f is in the space W - composed of f E Lz(R) such that there exists q(t) - - q ( - t ) with
f(t) -- {0 /3(-t)q(t)
ift > 1 ift E [-1,1]
"
Functions in W + and W - may have an arbitrary behavior on [1,+c~) and (-c~z,-1] respectively. The following theorem characterizes P+ and P - We denote b y / d the identity operator. Theorem 8.9 (COIFMAN,MEYER) The operators P+ and P- are orthogonal projectors respectively on W + and W - . The spaces W + and W - are orthogonal and P+ + P- = Id. (8.74)
8.4
I~ a-rl
0 FIGURE 8.16
355
LAPPEDORTHOGONAL TRANSFORMS
I
a
a+rl
t
A multiplication with/3(t-a --~--) and/3( ___u)a-trestricts the support of
functions to [ a - ~7, + c ~ ) and ( - c ~ , a + r#].
Proof 2. To verify that P+ is a projector we show that any f E W + satisfies P+ f = f. If t < - 1 then P+ f (t) = f (t) = 0 and if t > 1 then P+ f (t) = f (t) = 1. If t E [- 1,1] then f(t) =/3(t) po(t) and inserting (8.71) yields
P+f(t) =/3(t) [/32(t) po (t) + /32( - t ) p0(-t)] =/3(t) po(t), because po(t) is even and/3(t) satisfies (8.70). The projector P+ is proved to be orthogonal by showing that it is self-adjoint:
{P+ f ,g)
=
/32(t) f(t) g*(t)dt + 1
/3(t)/3(-t) f ( - t ) g*(t)dt + 1
l'+~ f (t) g* (t) dt. A change of variable t' = - t in the second integral verifies that this formula is symmetric in f and g and hence (P+ f, g) -- (f,P+ g). Identical derivations prove that Pis an orthogonal projector on W-. The orthogonality of W - and W + is proved in (8.73). To verify (8.74), for f E L2(]~) we compute
P+ f(t) + P-f(t) -- f(t)[/32(t) +/72(-t)] -- f(t). I
These half-line projectors are generalized by decomposing signals in two orthogonal components whose supports are respectively [a - ~7, + c r and ( - c ~ , a + r/]. For ---U)' so that it increases this purpose, we scale and translate the profile function/3(t-a from 0 to 1 on [ a - ~7,a + ~7], as illustrated in Figure 8.16. The symmetry with respect to 0, which transforms f(t) in f ( - t ) , becomes a symmetry with respect to a, which transforms f(t) in f ( Z a - t). The resulting projectors are
t-a
t-a
a-t
(8.75)
and
vl [ l-vl
a-t
a-t
Vl
t-a
')l
(8.76)
356
CHAPTERVIII WAVELETPACKETAND LOCALCOSINE BASES
A straightforward extension of Theorem 8.9 proves that P+,7 is an orthogonal projector on the space W a,r/ + of functions f c Lz(R) such that there exists p(t) p ( 2 a - t) with
f ( t ) --
0 /3(7]_l(t_a) )p(t)
ift < a - 7 ] if t C [a - 7], a + 7]] "
(8.77)
Similarly P~,~ is an orthogonal projector on the space W~,,7 composed of f c L 2 (R) such that there exists q(t) = - q ( 2 a - t) with
f(t)-
0 /3(7]_l(a_t))q(t )
ift < - 1 if t E [ a - 7], a + 7]] "
(8.78)
The spaces W+a,r/and W~.,7, are orthogonal and
P+a,v+ P2,,,~- Id.
(8.79)
Projectors on Intervals A lapped projector splits a signal in two orthogonal components that overlap on [ a - 7],a + 7]]. Repeating such projections at different locations performs a signal decomposition into orthogonal pieces whose supports overlap. Let us divide the time axis in overlapping intervals: Ip -- [ap -- 7]p, a p + l + 7]p+l]
with l i m ap = - o < 3 p~-o~
and
lim ap = + o c .
p~+c~
(8.80)
To ensure that Ip-1 and Ip+l do not intersect for any p E Z, we impose that a p + l -- 7]p+l _~ ap -Jr-Tip,
and hence
(8.81)
lp -- ap+ 1 -- ap ~ 7]p+1 Jr- 7]p. The support of f is restricted to Ip by the operator p p - p +ap,oe Pap+,,,p+1.
(8.82)
+ and Wap+l,r/P+1' it Since P+,,Tp and eap+l,rlp+l are orthogonal projections on W ap,rlp follows that Pp is an orthogonal projector on W p
+ A Wap+l,~p+1. - Wap,~Tp
Let us divide Ip in two overlapping intervals O p, Ip = [ap -- 7]p,ap+l §
O p+l
(8.83)
and a central interval Cp:
= OpUCpUOp+l
(8.84)
8.4
357
LAPPEDORTHOGONALTRANSFORMS
g-1 (t)
gp(t)
,A,
ap-rlp
a+rl
gp+l(t)
)L
ap+l--l]p+ 1 ap+lnt-l]p+1
P
FIGIJRI: 8.17 Each window gp has a support [ a p - ~]p,ap+l n t- Tip-t-1] with an increasing profile and a decreasing profile over l a p - ~Tp,ap -+- rip] and [ a p + l r/p+l , ap+ l -Jr-r/p+l].
with Op =- [ap -- rlp,ap nt- ~Tp] and
Cp = [ap -Jr-rIp,ap+l - Tip-k-1] . The space W p is characterized by introducing a window gp whose support is Ip, and which has a raising profile on Op and a decaying profile on Op+l: 0 gp(t)
~(/lp 1( t - ap)) I
1
/3(~p_~1 (ap+l - t))
ift~Ip if t E Op if t E Cp if t E Op+l
(8.85)
This window is illustrated in Figure 8.17. It follows from (8.77), (8.78) and (8.83) that W p is the space of functions f E L 2 (~) that can be written
f(t) - gp(t)h(t) with h(t) -
if t E Op if t E Op+l
h(2ap - t) -h(2ap+l - t )
(8.86)
The function h is symmetric with respect to ap and antisymmetric with respect Cp. The projector Pp on W p defined in (8.82) can be rewritten
tO a p + l , with an arbitrary behavior in
if t E Op
I Pap,~f(t) Ppf ( t ) f (t) P~+~,rlp+l f ( t )
if t E Cp if t E Op+l
= Up(t) hp(t),
(8.87)
where hp(t) is calculated by inserting (8.75) and (8.76):
hp(t) -
gp(t) f (t) + gp(2ap - t ) f ( 2 a p - t ) f (t) Up(t) f (t) - gp(Zap+l - t) f (Zap+l - t)
if t E Op if t E Cp . if t E Op-+-I
(8.88)
The following proposition derives a decomposition of the identity. Proposition 8.6 The operator Pp is an orthogonal projector on W p. If p ~ q then
W p is orthogonal to W q and +~ Pp -p----oo
Id.
(8.89)
3S8
CHAPTER VIII WAVELETPACKETAND LOCAL COSINE BASES
Proof 2. If p # q and [p - q[ > 1 then functions in W p and W q have supports that do not overlap so these spaces are orthogonal. If q - p + 1 then W p = W ap + ,rip F)
WS+lap,0p+l and
Since WT+~,,p,0p+~ is orthogonal to W ap+ +
W p + I --- W-++l,r/p+lap F"I W - +2 2 a, r / p +
1,rip+ 1 it follows
that W p is orthogonal to W p+I
To prove (8.89), we first verify that Pp + Pp+l = P+ap ,FIp P-ap+ 2 ,r/p+2 "
(8.90)
This is shown by decomposing Pp and Pp+l with (8.87) and inserting P~+,,~p+, + Pa,+l,,lp+, = Id. As a consequence
m ~'~ep p=n
(8.91)
--- e~an,TIneam,rlm 9
For any f E L 2(~), [if _ p +
an,tin e-am,rlm
l
an +tin m J -oo
fl[2 >
oo [f(t)12dt + faro ~---rim [f(t)[2dt
and inserting (8.80) proves that lim [ I f - P+an ,tin Pare ,rim fll 2 = 0.
n--+-o~ m--~--~-oo
II
The summation (8.91) implies (8.89).
Discretized Projectors Projectors Pp that restrict the signal support to [ap - rip , ap+l + Flp+l] are easily extended for discrete signals. Suppose that {ap}pEZ are half integers, which means that ap + 1/2 E Z. The windows gp(t) defined in (8.85) are uniformly sampled gp[n] - gp(n). As in (8.86) we define the space W p c 12(Z) of discrete signals
f[n] - gp[n]h[n]
with h[n] =
h[2ap - n] -h[2ap+l-n]
if n E Op i f n E Op+l
(8.92)
The orthogonal projector Pp on W p is defined by an expression identical to (8.87, 8.88): Ppf[n] - gp[n] hp[n] (8.93) with
hp [n] -
gp[n] f[n] + gp[2ap - n] f[2ap - n] f [n] gp[n] f[n] - gp[2ap+, - n] f[2ap+l - n]
i f n E Op i f n E Cp if n E O p+l
(8.94)
Finally we prove as in Proposition 8.6 that if p # q, then W p is orthogonal to W q and
E PP -- Id. p=-c~
(8.95)
8.4 LAPPEDORTHOGONAL TRANSFORMS
8.4.2
359
Lapped Orthogonal Bases
An orthogonal basis of L2 (JR) is defined from a basis {ek}keN of L2[0, 1] by multiplying a translation and dilation of each vector with a smooth window gp defined in (8.85). A local cosine basis of L 2 (IR) is derived from a cosine-IV basis of L 2 [0,1]. The support of gp is [ap -- ~Tp,ap+l nt- Tip+l], w i t h lp -- ap+l - a p , as illustrated in Figure 8.17. The design of these windows also implies symmetry and quadrature properties on overlapping intervals:
gp(t) = gp+l (2ap+l -- t) for t C [ap+l - flp+l,ap+l nt- ~]p+l] and
(8.96)
2 2 gp(t) + gp+l (t) - 1 for t c [ap+l - rlp+l,ap+l + rip+l].
Each ek E L2[0,1] is extended over R into a function Ok that is symmetric with respect to 0 and antisymmetric with respect to 1. The resulting 0k has period 4 and is defined over [ - 2 , 2] by
Ok(t) --
ek(t) ek(--t) --ek(Z--t) --ek(2 + t)
if t E [0, 1] if t C (--1,0) iftc[1,2) " if t E [--1,--2)
The following theorem derives an orthonormal basis of Lz(R). T h e o r e m 8.10 (COIFMAN, MALVAR, MEYER) Let {ek }k~N be an orthonormal basis of LZ[0, 1]. The family
gp,k(t) = gp(t) --~p ek
(8.97)
Ip kcN,pEZ
is an orthonormal basis of L2 (N). Proof z. Since Ok(lpl(t--ap)) is symmetric with respect to ap and antisymmetric with respect to ap+l it follows from (8.86) that gp,k E W p for all k c N. Proposition 8.6 proves that the spaces W p and W q are orthogonal for p -~ q and that Lz(R) = | p. To prove that (8.97) is an orthonormal basis of L2(N) we thus need to show that
{ gp,k(t) = gp(t) -~p, Ok (, ip
(8.98) kEN,pEZ
is an orthonormal basis of W p. Let us prove first that any f E W p can be decomposed over this family. Such a function can be written f(t) = gp(t)h(t) where the restriction of h to [ap,ap+l] is arbitrary, and h is respectively symmetric and antisymmetric with respect to ap and ap+l. Since {ek }ken is an orthonormal basis of L2[0,1], clearly
{1 ~p
ek
lp
/
kEN
(8.99)
CHAPTER VIII WAVELET PACKET AND LOCAL COSINE BASES
~ 0
is an orthonormal basis of L 2 [ap, ap+ 1]. The restriction of h to [ap, ap+l] can therefore be decomposed in this basis. This decomposition remains valid for all t E [aprlp,ap+l + ~Tp+l] since h(t) and the lpl/e~k(l-pl(t-ap)) have the same symmetry with respect to ap and ap+l. Therefore f(t) = h(t)gp(t) can be decomposed over the family (8.98). The following lemma finishes the proof by showing that the orthogonality of functions in (8.98) is a consequence of the orthogonality of (8.99) in L2[ap,ap+l]. Lemma 8.1 If f b(t) --- hb(t) gp(t) E W p and f c(t) - hc(t) gp(t) E W p, then
(f b,f c) --
l
ap+ I +rlp+ 1
f b(t) f c(t)dt=
a ap-rlp
lap+
1
hb(t)h~(t)dt.
(8.100)
J ap
Let us Let us evaluate evaluate ap+l +r/P+ 1
(f b,f c) --
*
2
hb(t)hc(t ) gp(t)dt.
(8.101)
J ap--rlp
We know that hb(t) and he(t) are symmetric with respect to ap so
ap+~p hb(t)h*(t) gp(t)dt 2 J9 ap--rip
9 ) [g2p(t)+ gp2(2ap_t)]d t . hb(t)hc(t ~ ap
2 2 Since gp(t) + gp(2ap+l - t) = 1 over this interval, we obtain
ap+~Phb(t) h*c(t) gep(t)dtJ ap--rlp
hb(t)hc(t)dt.
(8.102)
J ap
The functions hb(t) and hc(t) are antisymmetric with respect to ap+l so hb(t)hc(t ) is symmetric about ap+ 1. We thus prove similarly that l a P + I +rlp+ I
hb(t) h*~(t) gp+l(t)dt 2 --
,I ap+ 1--r}p+ 1
[
ap+ l
9 hb(t)hc(t)dt.
(8.103)
"! ap+ l --~Tp+ 1
Since gp(t) -- 1 for t E [ap + rlp,ap+~ - ~Tp+l], inserting (8.102) and (8.103) in (8.101) proves the lemma property (8.100). II Theorem 8.10 is similar to the block basis Theorem 8.3 but it has the advantage of using smooth windows gp as opposed to the rectangular windows that are indicator functions of lap, ap+l]. It yields smooth functions gp,k only if the extension ek of ek is a smooth function. This is the case for the cosine IV basis {e~ (t) = x/~cos[(k + 1/2)Trt]}kcr~ of L2[0,1] defined in Theorem 8.6. Indeed cos[(k + 1/2)Trt] has a natural symmetric and antisymmetric extension with respect to 0 and 1 over N. The following corollary derives a local cosine basis. C o r o l l a r y 8.1 The family of local cosine functions
{gp,k(t)-gp(t)~
]} COS I T r ( k + ~ ) t - a plp
(8.104) kEN,pEZ
is an orthonormal basis of L2 (IR).
8.4
361
LAPPEDORTHOGONALTRANSFORMS
Other bases can be constructed with functions having a different symmetry. To maintain the orthogonality of the windowed basis, we must ensure that consecutive windows gp and gp+l are multiplied by functions that have an opposite symmetry with respect to a p + l . For example, we can multiply g2p with functions that are symmetric with respect to both ends a2p and a2p+l, and multiply g2p+l with functions that are antisymmetric with respect to a2p+l and a2p+2. Such bases can be constructed with the cosine I basis { x/~/~k cos(Trkt)}~z defined in Theorem 8.5, with )~0 = 2-1/2 and )~k = 1 for k :/: 0, and with the sine I family {v~sin(Trkt)}k~N,, which is also an orthonormal basis of L2[0, 1]. The reader can verify that if Cosine-Sine I Basis
g2p+l,k(t)
--
g2p+l(t)
2
/2p+l
sin [Trk t - a E p + l
/2p+l
then {gp,k}kcN,pcZ is an orthonormal basis of L2(R). Lapped Transforms in Frequency Lapped orthogonal projectors can also divide the frequency axis in separate overlapping intervals. This is done by decomposing the Fourier transform f ( ~ ) of f(t) over a local cosine basis defined on the frequency axis {gp,k(~)}p~Z,kcr~. This is also equivalent to decomposing f(t) on its 1 inverse Fourier transform {~--~gp,k(--t)}pEZ,kE N. As opposed to wavelet packets, which decompose signals in dyadic frequency bands, this approach offers complete flexibility on the size of the frequency intervals [ap -- 17p,ap+ 1 q-/]p+l]. A signal decomposition in a Meyer wavelet or wavelet packet basis can be calculated with a lapped orthogonal transform applied in the Fourier domain. Indeed, the Fourier transform (7.92) of a Meyer wavelet has a compact support and {l~b(2J~)l}j~z can be considered as a family asymmetric windows, whose supports only overlap with adjacent windows with appropriate symmetry properties. +c~ 1~(2J~) ]2 - 1. As a reThese windows cover the whole frequency axis" ~--]~j=_~ sult, the Meyer wavelet transform can be viewed as a lapped orthogonal transform applied in the Fourier domain. It can thus be efficiently implemented with the folding algorithm of Section 8.4.4. ^
8.4.3
Local Cosine Bases
The local cosine basis defined in (8.104) is composed of functions
cos [
,3~2
CHAPTER Vlll
WAVELETPACKETAND LOCAL COSINE BASES
with a compact support [ap -- ~Tp,ap+l nt- T]p+l ] . The energy of their Fourier transforms is also well concentrated. Let ~p be the Fourier transform of gp,
-
exp(--iap{p,k) A(~p(co_~p,k ) + 2
gp(co-[-~p,k))
where
~p,k ~
7r(k + 1/2)
lp
The bandwidth of gp,k around {p,k and --{p,k is equal to the bandwidth of ~p. If the sizes r/p and r/p+1 of the variation intervals of gp are proportional to lp, then this bandwidth is proportional to lp 1. For smooth functions f , we want to guarantee that the inner products (f, gp,k) have a fast decay when the center frequency {p,k increases. The Parseval formula proves that
(f , gp,k) = e• 2rr
?(co) ( ~p(co- {p,,) + ip(co + {p,k)) dco. oo
The smoothness of f implies that If(~)l has a fast decay at large frequencies co. This integral will therefore become small when (p,k increases if gp is a smooth window, because Igp (co)] has a fast decay. Window Design The regularity of gp depends on the regularity of the profile/3 which defines it in (8.85). This profile must satisfy /32(t) + / 3 2 ( - t ) = 1 for t E [-1, 1],
(8.1o5)
plus/3(t) - 0 if t < - 1 and fl(t) - 1 if t > 1. One example is /30(t) - sin ( T~r ( l + t ) )
f o r t E [-1 1],
but its derivative at t = -+-1 is non-zero so/3 is not differentiable at + 1. Windows of higher regularity are constructed with a profile/3k defined by induction for k _> 0 by
/3k+l(t)--~k
sin-~-
for t ~ [-1,1].
For any k _> 0, one can verify that/3k satisfies (8.105) and has 2 k - 1 vanishing derivatives at t - + 1. The resulting/3 and gp are therefore 2 k - 1 times continuously differentiable.
8.4
363
LAPPED ORTHOGONALTRANSFORMS
CO
l
>t
gp(t) 0
ap-1 ap <
lp
ap+l
FIGURE 8.18 The Heisenberg boxes of local cosine vectors define a regular grid over the time-frequency plane. Heisenberg Box A local cosine basis can be symbolically represented as an exact paving of the time-frequency plane. The time and frequency region of high energy concentration for each local cosine vector g p,k is approximated by a Heisenberg rectangle [ LtpTr ~Tr] [ap,ap+l] X ~ p , k - -g--f-, ,~p,k -Jr,
as illustrated in Figure 8.18. A local cosine basis {gp,k}k6H,pcZ corresponds to a time-frequency grid whose size varies in time. Figure 8.19(a) shows the decomposition of a digital recording of the sound "grea" coming from the word "greasy". The window sizes are adapted to the signal structures with the best basis algorithm described in Section 9.4.2. High amplitude coefficients are along spectral lines in the time-frequency plane, which correspond to different harmonics. Most Heisenberg boxes appear in white, which indicates that the corresponding inner product is nearly zero. This signal can thus be approximated with a few non-zero local cosine vectors. Figure 8.19(b) decomposes the same signal in a local cosine basis composed of small windows of constant size. The signal time-frequency structures do not appear as well as in Figure 8.19(a). Cosine modulations as opposed to complex exponentials do not provide easy access to phase information. The translation of a signal can induce important modifications of its decomposition coefficients in a cosine basis.
Translation and Phase
364
CHAPTER Vlll
WAVELET PACKET AND LOCAL COSINE BASES
Consider for example
f ( t ) - gp,k(t)- gp(t)
~cos[Tr(k+~)t-ap 1 lp
Since the basis is orthogonal, (f, gp,k) - 1, and all other inner products are zero. After a translation by 7- - lp/(2k + 1)
fr(t) -- f ( t -
lp )
2k+l
- g p (t)
[ (1)t-ap] sin 7r k + ~ lk
~
"
The opposite parity of sine and cosine implies that (f~-, gp,k) ~ O. In contrast, (fr,gp,k-1) and (fT-,gp,k+l) become non-zero. After translation, a signal component initially represented by a cosine of frequency 7r(k + 1/2)/lp is therefore spread over cosine vectors of different frequencies. This example shows that the local cosine coefficients of a pattern are severely modified by any translation. We are facing the same translation distortions as observed in Section 5.4 for wavelets and time-frequency frames. This lack of translation invariance makes it difficult to use these bases for pattern recognition.
8.4.4
Discrete Lapped Transforms
Lapped orthogonal bases are discretized by replacing the orthogonal basis of L2[0, 1] with a discrete basis of C N, and uniformly sampling the windows gp. Discrete local cosine bases are derived with discrete cosine-IV bases. Let {ap}pe Z be a sequence of half integers, ap + 1/2 E Z with lim
p--+-c~
ap--C~
and
lim
p--++c~
ap-+C~.
A discrete lapped orthogonal basis is constructed with the discrete projectors P p defined in (8.93). These operators are implemented with the sampled windows gp[n] - gp(n). Suppose that {ek,l[n]}O
el, [n] -
-
--ek[21- 1 -- n] --el, [2/+ n]
ifn C [ 0 , / - 1] ifn C [ - / , - 1 ] if n C [l,21- 1] if n E [ - 2 / , - l - 1]
The following theorem proves that multiplying these vectors with the discrete windows gp[n] yields an orthonormal basis of IZ(z).
8.4
LAPPEDORTHOGONAL TRANSFORMS
365
FIGURE 8.19 (a): The signal at the top is a recording of the sound "grea" in the word "greasy". This signal is decomposed in a local cosine basis with windows of varying sizes. The larger the amplitude of ](f, gp,k)l the darker the gray level of the Heisenberg box. (b): Decomposition in a local cosine basis with small windows of constant size. Theorem 8.11 (COIFMAN,MALVAR,MEYER) Suppose that {ek,l}O<_k
thogonal basis of C l, for any 1 > O. The family { gp,k[n] -- gp[n] ek,t~[n - ap] )O
(8.106)
is a lapped orthonormal basis of12 (Z). The proof of this theorem is identical to the proof of Theorem 8.10 since we have a discrete equivalent of the spaces W e and their projectors. It is also based on a discrete equivalent of Lemma 8.1, which is verified with the same derivations.
3~
CHAPTER VIII WAVELETPACKETAND LOCAL COSINE BASES
Beyond the proof of Theorem 8.11, we shall see that this lemma is important for quickly computing the decomposition coefficients (f, gp,k). Lemma 8.2 Any f b[n] = gp[n] hb[n] C W p and f c[n] - gp[n] hc[n] E W p satisfy
(fb,fc)--
Z
fb[n]f~[n]--
ap --~p
Z
hb[n]hc[n]"
(8.107)
ap < n < ap+ 1
Theorem 8.11 is similar to the discrete block basis Theorem 8.4 but constructs an orthogonal basis with smooth discrete windows gp[n]. The discrete cosine IV bases
el,k[n]-
cos ~ ( k + ~ ) ( n q-~) O
have the advantage of including vectors that have a natural symmetric and antisymmetric extension with respect to - 1 / 2 and l - 1/2. This produces a discrete local cosine basis of 12(Z).
Corollary 8.2 The family cos 7r k + ~
(8.108)
lp O
is an orthonormal basis ofl2(Z). Fast Lapped Orthogonal Transform A fast algorithm introduced by Malvar [42] replaces the calculations of (f, gp,k) by a computation of inner products in the original bases {el,k}O
Op = [ap - rlp,ap + rip] and Cp = [ap + rlp,ap+l - ~Tp+l]. The orthogonal projector Pp on the space W p generated by {gp,k}O<_k
hp[n] -
gp[n] f[n] + gp[2ap -- n] f[2ap -- n] f[n] Up[n] f[n] - gp[2ap+l - n] f[2ap+l - n]
if n COp if n C Cp if n E Op+l
Since gp,k E WP, (f , gp,k)--
(Ppf , gp,k)--
( g p h p , gpelp,k).
(8.109)
8.4 LAPPEDORTHOGONALTRANSFORMS
Since e.lp,k
367
[n] -- elp,k [n] for n E lap, ap+l ], Lemma 8.2 derives that (f , gp,1,)-
Z
hp[n]elp,~[n]- (hp,etp,~:)[ap,ap+~].
(8.110)
ap
(hp,elp,k)[ap,ap+l] =
Z hp[rt]~/~ cos [7r(1)n-ap] k+-~ lp ap
(8.111)
are computed with the fast DCT-IV algorithm of Section 8.3.4, which requires O(lplogzlp) operations. The inverse lapped transform recovers hp[n] over [ap,ap+l] from the lp inner products {(hp,eG,k)[ap,ap+l]}O<__~
+oo f[n]-
Z
+oo Ppf[n]-
p=-ec Let us denote Op - [ap (8.112) to [ap,ap+l] gives
f[n]--
rlp,ap] and
Z
gp[n]hp[n].
(8.112)
p=-oc O +
-
[ap,ap + ~lp]. The restriction of
gp[n] hp[n] + gp-1 [n] hp-1 In] if n E O + ifn E Cp hp[n] gp[n] hp[n] + gp+l [n] hp+l In] if n E O p+ 1
gp+l In] =
The symmetry of the windows guarantees that gp_, [n] = gp [2ap -n] and gp[2ap+l- n I. Since hp-1 [n] is antisymmetric with respect to ap and hp+l [n] is symmetric with respect to ap+l, we can recover f[n] on [ap, ap+l] from the values of hp_, In], hp[n] and hp+l [n] computed respectively on [ap_l,ap], [ap,ap+l], and
f [n] --
if n C O + gp[n] hp[n] - gp[2ap - n] hp-1 [2ap - n] ifn E Cp hp [n] gp[n] hp[n] nt- gp[2ap+l - n] hp+l [2ap+l - n] if n E Op+ 1
(8.113)
This unfolding formula is implemented with O(lp) calculations. The inverse local cosine transform thus requires O(lplog21p) operations to recover f[n] on each interval [ap,ap+l] of length lp.
3~8
CHAPTER VIII WAVELETPACKETAND LOCAL COSINE BASES
Finite Signals If f[n] is defined for 0 < n < N, the extremities of the first and last interval must be a0 = - 1 / 2 and aq - N - 1/2. A fast local cosine algorithm needs O(lp log 2 lp) additions and multiplications to decompose or reconstruct the signal on each interval of length lp. On the whole signal of length N, it thus needs a total of O(N log 2 L) operations, where L - s u P 0 < p < q Since we do not know the values of f[n] for n < 0, at the left border we set ~70 - 0. This means that go [n] jumps from 0 to 1 at n - 0. The resulting transform on the left boundary is equivalent to a straight DCT-IV. Section 8.3.2 shows that since cosine IV vectors are even on the left boundary, the DCT-IV is equivalent to a symmetric signal extension followed by a discrete Fourier transform. This avoids creating discontinuity artifacts at the left border. At the right border, we also set 7"]q - - 0 to limit the support of gq-1 to [ 0 , N - 1]. Section 8.4.4 explains that since cosine IV vectors are odd on the right boundary, the DCT-IV is equivalent to an antisymmetric signal extension. If f [ N - 1] r 0, this extension introduces a sharp signal transition that creates artificial high frequencies. To reduce this border effect, we replace the cosine IV modulation
lp.
gq-l,k[n]--gq-l[n]~l~_l
cos
I k-+--~l)n-aq-1]lq_l
by a cosine I modulation
gq-l,k[n] gq-1[n] --
~
)k k COS
[n lq-1 1" 7re
The orthogonality with the other elements of the basis is maintained because these cosine I vectors, like cosine IV vectors, are even with respect to Since cos[Trkn-aq_l/lq_l] is also symmetric with respect to aq = N - 1/2, computing a DCT-I is equivalent to performing a symmetric signal extension at the fight boundary, which avoids discontinuities. In the fast local cosine transform, we thus compute a DCT-I of the last folded signal hq_l instead of a DCT-IV. The reconstruction algorithm uses an inverse DCT-I to recover hq_l from these coefficients.
aq-1.
8.5
LOCAL C O S I N E TREES z
Corollary 8.1 constructs local cosine bases for any segmentation of the time axis into intervals [ap,ap+l] of arbitrary lengths. This result is more general than the construction of wavelet packet bases that can only divide the frequency axis into dyadic intervals, whose length are proportional to powers of 2. However, Coifman and Meyer [138] showed that restricting the intervals to dyadic sizes has the advantage of creating a tree structure similar to a wavelet packet tree. "Best" local cosine bases can then be adaptively chosen with the fast dynamical programming algorithm described in Section 9.4.2.
8.5 LOCALCOSINE TREES
8.5. I
369
Binary Tree of Cosine Bases
A local cosine tree includes orthogonal bases that segment the time axis in dyadic intervals. For any j _> 0, the interval [0, 1] is divided in 2J intervals of length 2-J by setting ap,j p 2 - j for 0 _< p _< 2 j. -
-
These intervals are covered by windows gp,j defined by (8.85) with a support [ap,j - 77, ap+ l,j -b- 77]" /3(77-1(t-- ap,j) ) gp,j(t)--
if t C [ap,j - 77, ap,j + 77] if t E [ap,j + 77, ap+ 1,j - 77] if t C [ap+l,j - 77, ap+l,j + 77] otherwise
1 /3(77_l(ap+l,j_t))
0
(8.114)
To ensure that the support of gp,j is in [0,1] for p = 0 and p = 2J - 1, we modify respectively the left and fight sides of these windows by setting go,j(t) = 1 if t E [0, 77], and gzJ-l,j(t) = 1 if t c [1 - 77, 1]. It follows that g0,0 = 110,1]. The size 77 of the raising and decaying profiles of g p,j is independent of j. To guarantee that windows overlap only with their two neighbors, the length ap+ 1,j - ap,j = 2 - j must be larger than the size 277 of the overlapping intervals and hence 77 _< 2 -j-1 .
(8.1 15)
Similarly to wavelet packet trees, a local cosine tree is constructed by recursively dividing spaces built with local cosine bases. A tree node at a depth j and a position p is associated to a space W jP generated by the local cosine family
13p --
{
gp,j(t)
~
cos 7r k + ~
2-J
(8.1 16) kEZ
Any f E W J has a support in [ a p , j - 77,ap+1,j + 77] and can be written f ( t ) gp,j(t) h(t) where h(t) is respectively symmetric and antisymmetric with respect to ap,j and ap+l,j. The following proposition shows that W jP is divided in two 2p
Wl/2p+l
orthogonal spaces W j+l and ,, j+l
Proposition 8.7
that are built over the two half intervals. 2p
(COIFMAN, MEYER) For any j >_ 0 and p < 2 j, the spaces W j+l
and Vt/2P+ ,, j+ l 1 are orthogonal and p
2p
Wj - W j + 1 |
wd2p+l
,, j+l
9
(8.117)
Proof 2 The orthogonality of W ~ 1 and ~0V2P+ ,, j+l 1 is proved by Proposition 8.6. We denote Pp,j the orthogonal projector on WjP.. With the notation of Section 8.4.1, this projector is decomposed into two splitting projectors at ap,j and ap+l,j: Ppj - - P +ap,j,~7p -ap+l,j,T]" ,
370
CHAPTER VIII
WAVELET PACKET AND LOCAL COSINE BASES
Equation (8.90) proves that
P2p,j+l -~-P2p+l,j+l = P+ aZp,j+l
,rl
P-a z p + Z , j + l
,rl - -
-
P+ ap,j,r I P a p w l , j , r l
This equality on orthogonal projectors implies (8.117).
-
-
Pp j. II
The space WjP located at the node (j, p) of a local cosine tree is therefore the sum of
2p
Vff2p+l
the two spaces Wj+ 1 and ,, j+l located at the children nodes. Since g0,0 - 110,1] it follows that W ~ - LZ[0, 1]. The maximum depth J of the binary tree is limited by the support condition ~7< 2-J-1, and hence S _ < - logz(2r/).
(8.118)
Admissible Local Cosine Bases
As in a wavelet packet binary tree, many local cosine orthogonal bases are constructed from this local cosine tree. We call admissible binary tree any subtree of the local cosine tree whose nodes have either 0 or 2 children. Let {ji, Pi}l
L2[0, 1] - -
W
0 --
I Oi--1Wji
Pi
9
I pi is an orthogonal basis of L2[0,1] Hence, the union of local cosine bases I..Ji=l]3ji This can also be interpreted as a division of the time axis into windows of various length, as illustrated by Figure 8.20. The number Bj of different dyadic local cosine bases is equal to the number of different admissible subtrees of depth at most J. For J - - l o g 2 (2r/), Proposition 8.1 proves that 21/(4~) < Bj <_ 2 3/(8r/). Figure 8.19 shows the decomposition of a sound recording in two dyadic local cosine bases selected from the binary tree. The basis in (a) is calculated with the best basis algorithm of Section 9.4.2. Choice of r/
At all scales 2 j, the windows gp,j of a local cosine tree have raising and decaying profiles of the same size ~7. These windows can thus be recombined independently from their scale. If ~7 is small compared to the interval size 2 - j then gp,j has a relatively sharp variation at its borders compared to the size of its support. Since ~ is not proportional to 2 -j, the energy concentration of ~p,j is not improved when the window size 2 - j increases. Even though f may be very smooth over [ap,j,ap+l,j], the border variations of the window create relatively large coefficients up to a frequency of the order of 7r/r/. To reduce the number of large coefficients we must increase rl, but this also increases the minimum window size in the tree, which is 2 -J = 2~. The choice of r/is therefore the result of a trade-off between window regularity and the maximum resolution of the time subdivision. There is no equivalent limitation in the construction of wavelet packet bases.
8.5 LOCALCOSINETREES
371
wo
I
I
I
I
I
I
I
I I
I
I
I
FIGURE 8.20 An admissible binary tree of local cosine spaces divides the time axis in windows of dyadic lengths. 8.5.2
Tree of Discrete Bases
For discrete signals of size N, a binary tree of discrete cosine bases is constructed like a binary tree of continuous time cosine bases. To simplify notations, the sampiing distance is normalized to 1. If it is equal to N-1 then frequency parameters must be multiplied by N. The subdivision points are located at half integers:
ap,j -- p N 2 - j -
1/2
for0 _< p _< 2 j.
The discrete windows are obtained by sampling the windows gp(t) defined in (8.114), gp,j[n] - gp,j(n). The same border modification is used to ensure that the support of all gp,j[n] is in [ 0 , N - 1]. A node at depth j and position p in the binary tree corresponds to the space WjP generated by the discrete local cosine family
1~p -
{ ; gp,j[n]
E
ln
2_jNCOS 7r (k + -~) 2-JN 2 O
Since g0,0 - I[0,N-1], the space W ~ at the root of the tree includes any signal defined over 0 <_ n < N, so W ~ - C u. As in Proposition 8.7 we verify that W jP is orthogonal to W q for p # q and that Wj
1
ewes+, "'j+l
(8.119)
The splitting property (8.119) implies that the union of local cosine families B p located at the leaves of an admissible subtree is an orthogonal basis of W ~ - C N. The minimum window size is limited by 2~7 _< 2-JN so the maximum depth of this binary tree is J - log 2 ~ . One can thus construct more than 2 2J-I - 2N/(@) different discrete local cosine bases within this binary tree.
372
CHAPTER VIII
WAVELET PACKET AND LOCAL COSINE BASES
Fast Calculations The fast local cosine transform algorithm described in Section 8.4.4 requires O(2-JN log2 (2-iN)) operations to compute the inner products of f with the 2-iN vectors in the local cosine family B p. The total number of operations to perform these computations at all nodes (j, p) of the tree, for 0 < p < 2J and 0 < j < J, is therefore O(NJlog2 N). The local cosine decompositions in Figure 8.19 are calculated with this fast algorithm. To improve the right border treatment, Section 8.4.4 explains that the last DCT-IV should be replaced by a DCT-I, at each scale 2 j. The signal f is recovered from the local cosine coefficients at the leaves of any admissible binary tree, with the fast local cosine reconstruction algorithm, which needs O(N log 2N) operations.
8.5.3
Image Cosine Quad-Tree
A local cosine binary tree is extended in two dimensions into a quad-tree, which recursively divides square image windows into four smaller windows. This separable approach is similar to the extension of wavelet packet bases in two dimensions, described in Section 8.2. Let us consider images of N 2 pixels. A node of the quad-tree is labeled by its depth j and two indices p and q. Let gp,j[n] be the discrete one-dimensional window defined in Section 8.5.2. At the depth j, a node (p,q) corresponds to a separable space W jP,q -- W jP (~) W jq, (8.120) which is generated by a separable local cosine basis of 2-2JN 2 vectors
]~P'q - -
g p , j [ n l ] gq,j[n2] 2 - J N
cos 71 kl 4 - ~
2-JN
COS 71" k2 -+- ~
2-JN 0
We know from (8.119) that p
Wj-Wj+
2p
1|
wd2p+ 1
q
2q
and W j - W j +
wd2q+ 1
10,,j+1
9
Inserting these equations in (8.120) proves that WjP.'q is the direct sum of four orthogonal subspaces: p,q _ Wil2p,2q
Wj
"j+l
Wd2p+ 1,2q
9 ,, j+l
,$~12p,2q+ 1
| "j+l
Wl/2p+1,2q+ 1
| "j+l
9
(8.121)
A space WjP,q at a node (j,p,q) is therefore decomposed in the four subspaces located at the four children nodes of the quad-tree. This decomposition can also be interpreted as a division of the square window gp,j[nl]gq,j[n2] into four subwindows of equal sizes, as illustrated in Figure 8.21. The space located at the root of the tree is 0,0 W o - W ~| W ~ (8.122)
8.5
373
LOCAL COSINE TREES
~N W.P'q . ~ f W j 2 ~ ? p + l , 2 q W j
2
+
~
,
~
2p+l,2'q+l j+l
FIGURE 8.21 Functions in WjP'q have a support located in a square region of the image. It is divided into four subspaces that cover smaller squares in the image.
F|GURE 8.22 The grid shows the support of the windows gj,p[nl] gj,q[n2] of a "best" local cosine basis selected in the local cosine quad-tree. It includes all images of N 2 pixels. The size r/of the raising and decaying profiles of the one-dimensional windows defines the maximum depth J - log 2 ~U of the quad-tree. Admissible Quad-Trees An admissible subtree of this local cosine quad-tree has nodes that have either 0 or four children. Applying the decomposition property (8.12 l) along the branches of an admissible quad-tree proves that the spaces WjiPi,qi 0,0
located at the leaves decompose W 0 in orthogonal subspaces. The union of the corresponding two-dimensional local cosine bases/3jpi'q; is therefore an orthogonal basis of W 00,0 . We proved in (8.42) that there are more than 24J-~ _ 2N2/16~72
374
CHAPTERVIII WAVELETPACKETAND LOCAL COSINE BASES
different admissible trees of maximum depth J - log 2 ~ . These bases divide the image plane into squares of varying sizes. Figure 8.22 gives an example of image decomposition in a local cosine basis corresponding to an admissible quad-tree. This local cosine basis is selected with the best basis algorithm of Section 9.4.2. Fast Calculations The decomposition of an image fin] over a separable local cosine family/3 p'q requires O(2-2JN 2 log2(2-JN)) operations, with a separable implementation of the fast one-dimensional local cosine transform. For a full local cosine quad-tree of depth J, these calculations are performed for 0 ___p, q < 2 j and 0 < j < J, which requires O(N2j log2 N) multiplications and additions. The original image is recovered from the local cosine coefficients at the leaves of any admissible subtree with O(N 2 log 2 N) computations. 8.6
PROBLEMS
8.1. 1 Prove the discrete splitting Theorem 8.2. 8.2. 2 Meyer wavelet packets are calculated with a Meyer conjugate mirror filter (7.89). Compute the size of the frequency support of ~bp as a function of 2J. Study the convergence of ~bj,n(t) when the scale 2 j goes to +c~. 8.3. 1 Extend the separable wavelet packet tree of Section 8.2.2 for discrete pdimensional signals. Verify that the wavelet packet tree of a p-dimensional discrete signal ofN p samples includes O(N p log2 N) wavelet packet coefficients that are calculated with O(KN p log2 N) operations if the conjugate mirror filter h has K non-zero coefficients. 8.4. 1Anisotropic wavelet packets ~bp [a - 2L-Jnl ] ~)ql[b 2L-in2] may have different scales 2J and 2 l along the rows and columns. A decomposition over such wavelet packets is calculated with a filter bank that filters and subsamples the image rows j - L times whereas the columns are filtered and subsampled 1- L times. For an image f[n] of N 2 pixels, show that a dictionary of anisotropic wavelet packets includes O(N2[log2N] 2) different vectors. Compute the number of operations needed to decompose f in this dictionary. -
8.5. 1 Hartley transform Let cas(t) -- cos(t) 4-sin(t). We define B - - { g k [ n ] - - - ~1
cas( ~
) ) O
(a) Prove that 13 is an orthonormal basis of C N. (b) For any signal f[n] of size N, find a fast Hartley transform algorithm based on the FFT, which computes { (f, gk) }0
8.6 PROBLEMS
375
(b) Explain why this local Fourier basis does not contradict the Balian-Low Theorem 5.6. (c) Let f C L2(~) be such that 0((1 + I~ p)-l) for some p > o. Compute the rate of decay of ](f, ~p,k)l when the frequency index Ikl increases. Compare it with the rate of decay of ](f, gp,k)[, where gp,k is a local cosine vector (8.104). How do the two bases compare for signal processing applications?
If(.~)l-
8.9. 1 Describe a fast algorithm to compute the Meyer orthogonal wavelet transform with a lapped transform applied in the Fourier domain. Calculate the numerical complexity of this algorithm for periodic signals of size N. Compare this result with the numerical complexity of the standard fast wavelet transform algorithm, where the convolutions with Meyer conjugate mirror filters are calculated with an FFT. 8.10. 2 Arbitrary Walsh tilings (a) Prove that two Walsh wavelet packets ~jPn and ~jP",n' are orthogonal if their Heisenberg boxes defined in Section 8.1.2 do not intersect in the timefrequency plane [76]. (b) A dyadic tiling of the time-frequency plane is an exact cover {[Un, 2J(n + 1)] • [kTr2-J, (k + 1)TT2-J]}(j,n,p)Ei, where the index set I is adjusted to guarantee that the time-frequency boxes do not intersect and that they leave no hole. Prove that any such tiling corresponds to a Walsh orthonormal basis of L2(R) { ff)j,n P } (p,j,n)El"
8.11. z Double tree We want to construct a dictionary of block wavelet packet bases, which has the freedom to segment both the time and frequency axes. For this purpose, as in a local cosine basis dictionary, we construct a binary tree, which divides [0, 1] in 2J intervals [p2 -j, ( p + 1)2-J], that corres