Discrete Wavelet Analysis for Fast Optic Flow Computation

Similar documents
Discrete Wavelet Analysis for Fast Optic Flow Computation

Wavelet Bi-frames with Uniform Symmetry for Curve Multiresolution Processing

Lectures notes. Rheology and Fluid Dynamics

2D Wavelets. Hints on advanced Concepts

Wavelets and Multiresolution Processing

Digital Image Processing

Multiresolution schemes

Wavelets and multiresolution representations. Time meets frequency

1 The Continuous Wavelet Transform The continuous wavelet transform (CWT) Discretisation of the CWT... 2

Multiresolution schemes

Cambridge University Press The Mathematics of Signal Processing Steven B. Damelin and Willard Miller Excerpt More information

An Introduction to Wavelets and some Applications

Multiresolution image processing

Motion Estimation (I) Ce Liu Microsoft Research New England

Adaptive Control with Multiresolution Bases

From Fourier to Wavelets in 60 Slides

1 Introduction to Wavelet Analysis

MGA Tutorial, September 08, 2004 Construction of Wavelets. Jan-Olov Strömberg

Multiscale Image Transforms

Scattered Data Interpolation with Wavelet Trees

Digital Image Processing

Scientific Computing: An Introductory Survey

Multiresolution analysis

WE begin by briefly reviewing the fundamentals of the dual-tree transform. The transform involves a pair of

Representation: Fractional Splines, Wavelets and related Basis Function Expansions. Felix Herrmann and Jonathan Kane, ERL-MIT

Denoising and Compression Using Wavelets

SINGULARITY DETECTION AND PROCESSING WITH WAVELETS

Lecture Notes 5: Multiresolution Analysis

SIMPLE GABOR FEATURE SPACE FOR INVARIANT OBJECT RECOGNITION

Polynomial Approximation: The Fourier System

A Tutorial on Wavelets and their Applications. Martin J. Mohlenkamp

1 Lyapunov theory of stability

Space-Frequency Atoms

Chapter 7 Wavelets and Multiresolution Processing. Subband coding Quadrature mirror filtering Pyramid image processing

WAVELETS WITH SHORT SUPPORT

So far we have limited the discussion to state spaces of finite dimensions, but it turns out that, in

Motion Estimation (I)

Toward a Realization of Marr s Theory of Primal Sketches via Autocorrelation Wavelets: Image Representation using Multiscale Edge Information

Wavelets and applications

6.869 Advances in Computer Vision. Bill Freeman, Antonio Torralba and Phillip Isola MIT Oct. 3, 2018

Appendix B Positive definiteness

Multiscale Geometric Analysis: Thoughts and Applications (a summary)

Multiresolution analysis & wavelets (quick tutorial)

Module 4. Multi-Resolution Analysis. Version 2 ECE IIT, Kharagpur

Digital Image Processing

Scale-Invariance of Support Vector Machines based on the Triangular Kernel. Abstract

Space-Frequency Atoms

Kernel B Splines and Interpolation

Wavelet Footprints: Theory, Algorithms, and Applications

Determining Constant Optical Flow

On the Hilbert Transform of Wavelets

Band-limited Wavelets and Framelets in Low Dimensions

Wavelets For Computer Graphics

Gabor wavelet analysis and the fractional Hilbert transform

1.5 Approximate Identities

Image Alignment and Mosaicing Feature Tracking and the Kalman Filter

Sparse linear models

Physics 202 Laboratory 5. Linear Algebra 1. Laboratory 5. Physics 202 Laboratory

Edges and Scale. Image Features. Detecting edges. Origin of Edges. Solution: smooth first. Effects of noise

MITOCW MITRES_6-007S11lec09_300k.mp4

1.3.1 Definition and Basic Properties of Convolution

1. Fourier Transform (Continuous time) A finite energy signal is a signal f(t) for which. f(t) 2 dt < Scalar product: f(t)g(t)dt

Filtering and Edge Detection

MLISP: Machine Learning in Signal Processing Spring Lecture 8-9 May 4-7

Mathematical Methods for Computer Science

Quadrature Prefilters for the Discrete Wavelet Transform. Bruce R. Johnson. James L. Kinsey. Abstract

Unconstrained minimization of smooth functions

One-dimensional Schrödinger equation

Wavelet Transform. Figure 1: Non stationary signal f(t) = sin(100 t 2 ).

Wavelets. Introduction and Applications for Economic Time Series. Dag Björnberg. U.U.D.M. Project Report 2017:20

be the set of complex valued 2π-periodic functions f on R such that

Lecture 3: Linear Filters

Calculus in Gauss Space

BAND-LIMITED REFINABLE FUNCTIONS FOR WAVELETS AND FRAMELETS

Discrete Fourier Transform

Fitting Linear Statistical Models to Data by Least Squares: Introduction

Lecture 16: Multiresolution Image Analysis

Construction of Multivariate Compactly Supported Orthonormal Wavelets

Harmonic Analysis: from Fourier to Haar. María Cristina Pereyra Lesley A. Ward

Sparse Directional Image Representations using the Discrete Shearlet Transform

Continuum Limit and Fourier Series

Statistics 612: L p spaces, metrics on spaces of probabilites, and connections to estimation

Chapter 7 Wavelets and Multiresolution Processing

Iterative Methods for Solving A x = b

MTH Linear Algebra. Study Guide. Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education

Lecture 3: Linear Filters

Analysis of Fractals, Image Compression and Entropy Encoding

Kasetsart University Workshop. Multigrid methods: An introduction

A system that is both linear and time-invariant is called linear time-invariant (LTI).

Scattering.m Documentation

Outline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations

Linear Operators and Fourier Transform

MIT Weakly Nonlinear Things: Oscillators.

Transform Representation of Signals

L. Levaggi A. Tabacco WAVELETS ON THE INTERVAL AND RELATED TOPICS

Subband Coding and Wavelets. National Chiao Tung University Chun-Jen Tsai 12/04/2014

7.5 Partial Fractions and Integration

A WAVELET BASED CODING SCHEME VIA ATOMIC APPROXIMATION AND ADAPTIVE SAMPLING OF THE LOWEST FREQUENCY BAND

Introduction to Discrete-Time Wavelet Transform

Wavelets and Image Compression. Bradley J. Lucier

Transcription:

Discrete Wavelet Analysis for Fast Optic Flow Computation Christophe P. Bernard February 26, 1999 Abstract This paper describes a new way to compute the optic flow, based on a discrete wavelet basis analysis. The optic flow is estimated locally by the projection of the differential optic flow equation onto wavelets. The resulting linear systems are small and of fixed size (3-5 equations). They are solved to find out the visual displacement. In this way, we circumvent the classical problems of time aliasing and aperture. Moreover, the coefficients of the systems can be computed with a set of wavelet transforms, and the resolution of these systems is of similar complexity. The algorithm has thus a complexity of only O(N) (if one image of the sequence has N pixels). We show that our approach permits the measurement of illumination changes, making the optic flow computation more robust. A consistency result is also proven, which states that this method provides asymptotically correct flow estimates. Keywords Analytic wavelets, Image compression, Optic flow, Illumination, Discrete wavelets. Contents 1 Projected differential optic flow estimation 3 2 Time aliasing and measure function scale 6 3 Wavelets as a natural multiscale analysis tool 8 3.1 Wavelet bases or frames................................. 9 3.2 Convergence results................................... 10 3.3 Solving overdetermined systems............................ 12 3.4 Coarse to fine refinement scheme............................ 13 4 Analytic wavelets 15 4.1 Estimation stability................................... 16 4.2 Shifting the alias free measure range with analytic wavelets.............. 19 5 Dyadic filter bank wavelets 21 5.1 Analytic dyadic filter bank wavelets.......................... 22 5.2 Dyadic filter bank wavelet derivatives......................... 25 1

6 Numerical experimentation 27 6.1 Computational cost................................... 28 6.2 True sequences..................................... 28 6.3 Synthetic sequences................................... 29 6.4 Illumination changes.................................. 31 A Analytic wavelet frame 34 B Consistency of optic flow system 37 B.1 Error caused by the space variations of optic flow................... 38 B.2 Error caused by time aliasing.............................. 42 Introduction Optic flow measurement is an early vision processing step in computer vision, that is used in a wide variety of applications, ranging from three dimensional scene analysis to video compression. This processing step was first described by Horn and Schunck in 1980 81[16] [17], who devised a simple way to compute the optic flow based on regularization. This first work was then followed by a great number of contributions that proposed alternative methods. To mention a few, we can cite the spatiotemporal filtering methods, initiated by Adelson and Bergen [1], that split in energy based methods [15] and phase based methods [13], and region matching methods [8] [9] [3]. See Barron, Fleet and Beauchemin [4] for an extensive review of these methods [4]. Many authors noticed that a good way to enhance the reliability of optic flow estimation was to perform a multi scale computation. The multi scale approach proved to be very powerful. In matching methods, it greatly reduced the dimension of the search space. In filtering based methods, it increased the range of measurable displacement magnitudes, and relaxed the need for an a priori tuned frequency or scale parameter. This work was motivated by the observation that wavelets are a very well designed tool for optic flow measurement. Because of their multiscale structure, and because large scale filterings can be performed efficiently with the fast wavelet transform, they are a very natural tool to measure optic flow: the projection of the optic flow equation onto the wavelets yields a very fast variant of massive filtering. Road map In the next section, we introduce the core of our method: the projection of the optic flow equation onto several basis vectors, to construct small linear systems the solutions of which are the optic flow vectors. In section 2, we point out the impact of time aliasing on the optic flow measurement. Section 3 shows that wavelets are well designed basis functions for our approach: they allow reduction of time aliasing by a coarse to fine multiscale measurement. We state in this section a consistency result, that show convergence and gives an error estimate for the approximate flow. Sections 4 and 5 detail the design of the wavelets for this purpose. The method is then illustrated with numerical examples in section 6. 2

1 Projected differential optic flow estimation An image sequence is a real function I(t; x 1, x 2 ) of three variables t, x 1 and x 2 that we suppose continuous in this first section. We use the concise notations x for (x 1, x 2 ) and x(t) for (x 1 (t), x 2 (t)). The standard mathematical model used to find the optic flow is based on a constant brightness assumption: a real point [X 1 (t) X 2 (t) X 3 (t)] in our scene is projected onto the image plane to an image point (x 1 (t), x 2 (t)) [ X1 (t) X 2 (t) X 3 (t) ] (x 1 (t), x 2 (t)) at time t The optic flow at time t and location x(t) is defined as the velocity of the image point ( dx1 v = (v 1, v 2 ) = dt, dx ) 2 dt The brightness constancy assumption consists in saying that the brightness of (x 1 (t), x 2 (t)) at time t is time independent, hence I(t; x(t)) = I 0 The optic flow v is therefore constrained by the following equation or I t + I dx dt = 0 v I + I t = 0 We also define a variant of (OF) that takes possible illumination changes into account. This is done with a Lambertian surface aspect model. I(t; x 1, x 2 ) = R(t; x 1, x 2 ) L(t; x 1, x 2 ) In this formula, R is the reflectance, ie a picture sequence fulfilling the brightness constancy assumption and therefore (OF). L is the illumination factor that accounts for brightness changes. For a single light source at finite distance, L is a product L(t; x 1, x 2 ) = L 0 d 2 cos i where i is the angle of incidence of the source light falling on the object, and d is the distance between the source and the object. Changes in illumination are caused by relative moves between the light source and the object. We suppose that these changes have slow variations in space. This consists in assuming that the spatial derivatives L/ x and L/ y are negligible. By differentiation, we get di dt = dr dt L + R L t = 0 + R log L L t 3 (OF)

and a modified optic flow equation taking illumination changes into account: I v 1 + I v 2 + I x 1 x 2 t = L L I (OFL) The parameters we can estimate from this constraint are the optic flow v = (v 1, v 2 ) and the time derivative of log L: L /L. Note that L cannot be measured more accurately than up to a multiplicative constant, since a pattern α P and an illumination α 1 L give the same sequence I and thus the same constraints. This is reflected in the fact that we only measure the time derivative of log L which is not affected by a multiplication of L with a constant factor. Equations (OF) or (OFL) cannot be solved pointwise, because on each location and each time, it consists in solving a single scalar equation for two or more scalar unknowns. This is the aperture problem. As long as no a priori information is available on the nature of the underlying motion, the only equation to solve for the optic flow is (OF) or (OFL). The problem of optic flow measurement has infinitely many solutions and is by essence ill-posed. The only way to reduce the number of solutions is to do an additional assumption. This rule applies in all flow measurement techniques and to our knowledge, no method makes an exception to it. As a first example, Horn and Schunck [17] changed this non invertible linear system into a well conditioned one by writing it as a functional minimization problem. Finding the minimum of ( M[v] = v I + I ) dx 1 dx 2 t is equivalent to solving (OF). Horn and Schunck add to M[v] a smoothness functional of the form S[v] = λ v 2 dx 1 dx 2 where λ is a positive parameter used to tune the trade-off between smoothness and the accordance of v with (OF). The total functional M[v] + S[v] is positive definite and has a unique minimum. As such however, this method cannot be used to estimate wide ranges of displacements. Methods based on spatiotemporal filtering or velocity tuned filters [7] [10] [13] [14] [15] also assume that the flow is constant over the support of their filters. Block matching methods [3] [9] rely on the assumption that the motion is constant over small windows of the picture. We make no exception to this rule and have to do a similar assumption to extract the optic flow. In this paper, our way around aperture is the following: we define some measure functions (ψ n ) n=1...n of L 2 (R 2 ) all centered around (0, 0) and with different frequency contents. We compute the inner product of either (OF) or (OFL) against translated functions ψ n (x u) to obtain N different equations. In the simpler case of (OF), this yields ( I v 1 (x) + I v 2 (x) + I x 1 x 2 t ) ψ n (x u)dx 1 dx 2 = 0 n = 1... N (1) Using the notation f, g = f(x)g(x)dx 1 dx 2, and ψu(x) n = ψ n (x u), this can also be written as I I I v 1, ψu n + v 2, ψu n + x 1 x 2 t, ψn u = 0 n = 1... N (2) 4

If we now do the following assumption (or approximation) that v 1 (x) and v 2 (x) are constant over the supports of ψ n u, ie v 1 (x) = v 1 (u) v 2 (x) = v 2 (u) x support ψ n u, n x support ψ n u, n (A) Equation (2) then becomes I, ψu n x 1 v 1 (u) + I, ψu n v 2 (u) + x 2 t I, ψn u = 0 n = 1... N (3) and after an integration by parts I, ψn u v 1 (u) + I, ψn u v 2 (u) = x 1 x 2 t I, ψn u n = 1... N (4) We have a projected system of N (typically 3 or 4) equations with unknowns v 1 (u) and v 2 (u). I, ψ1 u v 1 (u) + I, ψ1 u v 2 (u) = I, ψ 1 x 1 x 2 t u. I, ψn u v 1 (u) + x 1 I, ψn u v 2 (u) x 2. = t. I, ψ N u (S) that has to be compared to the single equation (OF) for x = u: now we have found a way around aperture. The price we had to pay to achieve this was the above assumption that the optic flow is constant over the support of the ψ n. Under some assumptions on the smoothness of the optic flow, we can prove a theorem that states this estimation method is consistent, i.e. that the extracted flow field converges to the real one as the support size of the measure functions goes to zero. This theorem is stated in Sec. 3.2 and proven in appendix. The motivation for such an approach is multiple. It looks very appealing because we extract with an explicit formula and an inexpensive wavelet measure a direct estimate of the optic flow. As compared to window or multiscale matching methods, it also allows to obtain subpixel displacement accuracy. It is worth emphasizing that the systems we solve are of very limited size, with either 2 or 3 unknowns (3 in the case of illumination change measurement). This is very different from the approach of Horn and Schunck who solve a single system whose unknown is the whole optic flow vector map of dimension 2N if the frames have N pixels. A similar approach has been proposed by Weber and Malik in 1995 [31]. They use real valued functions of several scales to filter the OF equation, which makes their approach computationally more expensive. Simoncelli et al. [27] proposed a Bayesian estimation resolution method of multiscale differential constraints, and Magarey and Kingsbury [21] an approach based on the minimization of subband squared image differences. The former uses a real steerable pyramid as a set of filters, and the latter use analytic wavelets built with filters sampled from Gabor functions. Our approach is very close in spirit to these approaches but differs in several aspects detailed later in this paper, including filter design (Sec. 5), measure of illumination, integer motion warping (Sec. 3.4) as well as the alias free measurement range extension (Sec. 4.2). 5

Note that compared to some spatiotemporal filtering based methods, this approach supposes that there is a unique motion vector to be extracted. This assumption may be invalidated where several superimposed components of the picture are moving with different velocities, or around occlusions. The price to pay for these additional features is twofold: an additional assumption on the time dependence of the optic flow, and increased computational complexity. This issue is for example discussed in [13], and in [26]. In our approach however, we build such small local linear systems that are overdetermined: the number of equations is larger than the number of unknowns. This provides us with a mean to check whether our optic flow model is valid over the considered area. If the equations are not compatible, and the system has no solution, this means that our model is not valid (either because the optic flow is varying to fast with respect to the location, or because we are measuring the flow over an occlusion where it is discontinuous). We detail in Sec. 3.3 how we deal with such overdetermined systems. These considerations about the above assumption argue for the use of measure functions ψ of smallest possible support size. However, as we will see in the next section, time aliasing considerations provide an opposite constraint on the support size of the measure functions, which are therefore chosen as the result of a trade-off. 2 Time aliasing and measure function scale In practice, our picture sequence is sampled in time and the computation of the right hand side coefficients in system (S) t I, ψn relies on a finite difference approximation of the picture time derivative I/ t in time, like I/ t I(t + 1) I(t). We now compare the relative errors for different scalings ψus(x) n = s 1 ψ n ( x u ) of the function s ψ n. We will see that the error of such estimations is high if the displacement (v 1, v 2 ) between two pictures I(t) and I(t + 1) is large with respect to the scale s of the measure function ψus. n Let us suppose that for a given s, the picture is translating uniformly over the support of our functions ψus n for all n, ie I(t; x) = I(x tv) The simplest time derivative approximation is a two step finite difference I(t) t I(t + 1) I(t) In this paper however, we use a higher order estimate, and measure the optic flow at each t + 1/2, between two successive pictures, on the basis of the following approximation: I(t + 1/2) t I(t + 1) I(t) (5) Now we also need to compute coefficients of the left hand side of system (S) at t + 1/2: x i ψ n us, I(t + 1/2) 6

because we only know them at integer times. This is done with the following estimation: I(t + 1/2) I(t) + I(t + 1) 2 At a given scale s, these approximations lead respectively to the following coefficient approximations: I(t + 1/2), ψus n I(t + 1) I(t), ψ n t us I(t + 1) + I(t) I(t + 1/2), ψus n, ψus n 2 which can be rewritten after variable changes and integrations by parts I(t + 1/2), v ψus n I(t + 1/2), ψus(x n + v/2) ψus(x n v/2) (7a) I(t + 1/2), ψus n I(t + 1/2), ψn us(x + v/2) + ψus(x n v/2)) (7b) 2 Each approximation (7a) and (7b) is the approximation of a linear functional of L 2 (R) with another one. We take as a design rule that the following approximations be true: v ψus n ψus(x n + v/2) ψus(x n v/2) (8a) ψus n ψn us(x + v/2) + ψus(x n v/2)) (8b) 2 With a Taylor expansion of ψ, we can prove that there exists some constant M such that the sum of the relative errors of (8a) and (8b) is less than M ( v /s) 2. This sum has been numerically estimated for the wavelets we use later in this algorithm (filter in (51b)), and if the constraint (6) v 0.42 s (9) is verified, approximations (8a) and (8b) are valid up to a 15% error. We will see in Sec. 4.2 that this range can be shifted, which is necessary for the purpose of large motion compensation, described in Sec. 3.4. Note that this phenomenon always arises in some form in optic flow computation and has been pointed out by many authors [19]. Also note that this very problem motivates a multiscale approach to optic flow computation in e.g. [3] [7] [29] [31]. On the basis of approximations (5) and (6), the system (S) discretized in time is I(t + 1) + I(t), ψ1 us I(t + 1) + I(t) v 1 +, ψ1 us v 2 = I(t + 1) I(t), ψus 1 2 x 1 2 x 2... I(t + 1) + I(t), ψn us I(t + 1) + I(t) v 1 +, ψn us v 2 = I(t + 1) I(t), ψus N 2 x 1 2 x 2 (DS) where v 1 and v 2 are supposed to be measured at location u and time t + 1/2. 7

Remark. Note that the approximation of the picture derivative with a finite difference in (5) has to be considered in a weak sense, since the picture may happen to be not differentiable. However, we only use inner products of the form I, ψ or I, ψ. In such inner products, the Taylor approximation we write formally on the image function I in (5) is transferred with an integration by parts and variable changes on the wavelet ψ in (7a) and (8a), and since the wavelets we use are several times differentiable, such a Taylor approximation makes again sense. 3 Wavelets as a natural multiscale analysis tool Since the choice of the function scaling s cannot be done a priori, we use a coarse to fine refinement scheme. This suggest naturally to use a wavelet basis to do such measures, since they have the multiscale and translation invariant structure the optic flow estimation requires. We start from a set of mother wavelets (ψ n ) n=1...n in L 2 (R 2 ). We then define a discrete wavelet family (ψ n jk ) n=1...n,j Z,k Z 2 by ψ n jk(x) = 2 j ψ n (2 j x k) where j is a resolution index, k = (k 1, k 2 ) a 2-dimensional translation index, and x a 2 dimensional variable x = (x 1, x 2 ). EXAMPLE In image processing, a set of three real-valued mother wavelets is commonly used. These wavelets are built as tensor products of a scaling function φ L 2 (R) and a wavelet ψ L 2 (R): ψ 1 (x) = ψ(x 1 )φ(x 2 ) (10a) ψ 2 (x) = φ(x 1 )ψ(x 2 ) (10b) ψ 3 (x) = ψ(x 1 )ψ(x 2 ) (10c) A typical spectrum for these mother wavelets is displayed in Fig. 1. ψ 1 ψ 2 ψ 3 Figure 1: Spectrum of standard 2D wavelets Note that a wavelet ψjk n is located around (2 j k 1, 2 j k 2 ), and spreads over a domain of size proportional to 2 j. For any pair (j, k), we have N scaled and translated wavelets ψjk n, n = 1... N. We can do the same computations as we already did in equations (1) (4). For any (j, k), we thus have a local projected system of N equations that constrain an average value of the optic flow around 2 j k, and 8

with characteristic scale 2 j I, ψ1 jk v 1 + I, ψ1 jk v 2 = x 1 x 2 I, ψn jk x 1. v 1 + I, ψn jk x 2. v 2 = I t, ψ1 jk. I t, ψn jk (S jk ) In this system, I and I are supposed to be estimated at times t + 1/2 with formulae (5) and (6) t and the system can thus be written in more detail like (DS). Note that as is explained in the previous section and especially (9), the flow estimation made by this system can only be valid if the displacement v is small enough. The gain in using wavelets arising from a multiresolution analysis is that all coefficients of this system can be computed with dyadic filtering and subsampling schemes. Indeed, on the left hand side of (S jk ), the coefficients are wavelet derivate coefficients of the picture function I, that can be computed with derivative multiresolution analysis (see Sec. 5.2). on the right hand side, the coefficients are standard wavelet coefficients of the picture time derivative. They are estimated with finite differences in time of standard wavelet coefficients of the picture. 3.1 Wavelet bases or frames The wavelet framework provides an easy way to ensure that the wavelet measures we make provide an overcomplete information on the image sequence. This happens whenever our wavelet family is a basis or a frame, or more generally a redundant family. Redundancy (or at least completeness) is required to guarantee that we do not miss any information by switching from the optic flow equation (OF) to the system of all possible equations (1) for all wavelet scales, orientations and translations. Nothing guarantees however that we cannot oversee a motion when we isolate a small subset of equations making up a local system (S jk ) and trying to solve this subsystem individually. In the most general case, as long as the pattern of the picture region we are considering is rich enough of features, we can reasonably expect such systems to be well defined. This expectation may not be fulfilled in very special cases. If for example the moving pattern has very different frequency contents in x 1 and x 2 directions, like a pattern I(x, y) = sin x 1 + sin 10x 2 (11) the motion is not be directly measurable with a single system (S jk ) at any scale. Wavelets at a given scale j 1 have a given spatial frequency bandwidth, and may only see the sin x 1 component of the pattern, ie ψ n j 1 k, I = ψ n j 1 k, sin x 1 This component of the pattern being translation invariant, the corresponding local system is then underdetermined. 9

At another scale j 2, the wavelets again only see the second component, i.e. ψ n j 2 k, I = ψ n j 2 k, sin 10x 2 thus again a translation invariant pattern. In such a case, it may happen that no local system at any scale provides a way to find out the motion, although the whole set of equations with all scales together provides enough information to measure the displacement of such a pattern. To circumvent such a difficulty, we combine least square constraints of different scales, as is detailed in Sec. 3.4. 3.2 Convergence results We can state two convergence results to support our approach. The first result motivates the approximation done by assuming in Sec. 1 that the optic flow is constant over the support of the wavelets ψ n jk. We write the system S jk in short M jk v = Y jk. We assume that the picture sequence I(t; x) is the result of a smooth transformation I(t; x + δ(x, t)) = I(0; x) for all x, t (12) where δ is m times continuously differentiable in (x, t) and notice that δ(x, t) v(x) =. t A first theorem states that we can control the error caused by optic flow variation. Theorem 1. Assume x I(0; x) is locally L 2 everywhere and α Lipschitz at some point x 0. Also assume that x I(0; x) is not of any higher Lipschitz regularity at x 0. Assume that (x, t) δ(x, t) is lfloorα + 3 times continuously differentiable. Then 1. The true velocity v(x 0, 0) in x 0 at time t = 0 fulfills the following system of equations I, ψ1 jk v 1 (x 0, 0) + I, ψ1 jk I v 2 (x 0, 0) + e 1 jk = x 1 x 2 t, ψjk 1 t=0... I, ψn jk v 1 (x 0, 0) + I, ψn jk I v 2 (x 0, 0) + e N jk = x 1 x 2 t, ψjk N t=0 written in short There exist sequences j p Z, j p +, k p Z 2 such that (13) M jk v(x 0, 0) + E jk = Y jk. (14) 2 jp k p x 0 as p + and the error term E jp k p is negligible with respect to the norm of the system matrix M jp k p on this sequence E jp k p M jpk p 0 as p + (15) 10

2. Then, if there exists a increasing integer sequence q p(q) such that the condition number of the square matrices M jp(q) k p(q) is bounded, then the solutions v q of the systems converge to the true velocity v(x 0 ) as q +. M jp(q) k p(q) v q = Y jp(q) k p(q) (16) 3. If the matrices M jp(q) k p(q) are not square, and if their condition number with respect to left inversion cond M T M are bounded, then the same result holds with v q defined as the least squares solution of (16) which is so that again v q = ( M jp(q) k p(q) T M jp(q) k p(q) ) 1 Mjp(q) k p(q) T Y jp(q) k p(q) v q v(x 0, 0) as q + A proof for this theorem is given in Appendix B.1. Note that it only shows that the error induced by the assumption made in Sec. 1 on the flow uniformity in space allows to make an estimation of the true flow which is asymptotically correct. It does not handle estimation error caused by time aliasing. A second theorem also proven in appendix handles the problem of time aliasing. Theorem 2. We make the same assumptions on the image displacement δ and on the image smoothness at time 0 as in Th. 1. If for some θ > 0, t j is a sequence of times such that t j = O(2 j(1+θ) ) as j +, then 1. the true velocity v(x 0, 0) in x 0 at time t = 0 fulfills the following system of equations I, ψ1 jk v 1 (x 0, 0) + I, ψ1 jk v 2 (x 0, 0) + e 1 I(tj ) I(0) jk =, ψjk 1 x 1 x 2 t j... I, ψn jk v 1 (x 0, 0) + I, ψn jk v 2 (x 0, 0) + e N I(tj ) I(0) jk =, ψjk N x 1 x 2 t j (17) written in short There exists sequences j p Z, j p +, k p Z 2 such that M jk v(x 0, 0) + E jk = Y jk. (18) 2 j p k p x 0 as p + and the error term E j p k p is negligible with respect to the norm of the system matrix M jpk p on this sequence E j p k p M jpk p 0 as p + (19) 11

2. If for some integer sequence q p(q), the condition number of the matrices M jp(q) k p(q) is bounded, then the solution v q of the systems Remarks M jp(q) k p(q) v q = Y j p(q) k p(q) (20) converge to the true velocity v(x 0 ) as q +. Again, this holds when the matrices M are square or when they have more rows than columns, in which case the condition number has to be taken with respect to left inversion. The fact that the time step t j has to be negligible with respect to the grid step 2 j reflects the problem of time aliasing: the inter frame displacement (which is proportional to the time step) has to be negligible with respect to the grid step. While the smoothness assumptions needed to prove both theorems are rather strong for the displacement mapping (x, t) x + δ(x, t), the assumption on the image itself is fairly weak. We only assume that x I(0; x) is α Lipschitz on x 0, and is locally L 2 anywhere else. 3.3 Solving overdetermined systems The linear systems we build are overdetermined: there are more equations than unknowns. We write them as MV = Y (21) where M is a complex valued matrix of size n m, V a vector of optic flow components of size m 1 and Y a complex valued vector of size n 1. The integer m is either 2 or 3, depending on whether we also measure illumination (V = [v 1 v 2 L /L] T ) or not (V = [v 1 v 2 ] T ). First, we build the corresponding least squares system. Note that since the matrices M and Y are complex valued, but we are looking for a real valued flow vector V, the system can be written as a real system: [ Re M Im M ] [ Re Y V = Im Y The system is overdetermined, because usually 2n is much larger than m. The corresponding least squares system is then ((Re M) Re M + (Im M) Im M)V = ((Re M) Re Y + (Im M) Im Y ) which can be written in the more concise form ] Re(M M)V = Re(M Y ) (22) We can distinguish basically three possibles cases for such a system. 1. If this least squares system is not full ranked, the system cannot be solved because of aperture. 12

2. If the least squares system can be solved and has a solution V 0, there still are two possible cases. (a) Either the solution is also solution of the original system (21), ie MV 0 = Y, from which we conclude that the flow is uniform over the given area. (b) Or the solution does not satisfy the original system. This means that our model of optic flow is not valid over the considered area because the flow is varying too fast, or is even discontinuous. In practice, finding out in which case we are is done by comparing the condition number of Re(M M) with a first threshold (to decide whether the system is underdetermined or not), and then the fitting error MV 0 Y with a second threshold. The fitting error indicates how true our assumption is on the optic flow constancy. It is high if we are looking at a flow discontinuity or if the flow is varying rapidly in space. If we consider using it to do optic flow segmentation, we have to discriminate between both cases, and a richer local flow model is necessary. Instead of a flow model according to which the flow is supposed to be locally constant, we can use a model of a locally linear flow that is motivated by a basic 3D solid motion model by Kanatani [20]. Further investigations with this respect are continuing. 3.4 Coarse to fine refinement scheme Our local systems are located at grids of several resolutions 2 j. The corresponding discrete grids {2 j (k 1, k 2 )} are displayed in figure 2. At each node of each of these grids, we have a local system (S jk ). The issue we address now is the strategy to combine information coming from several j = 4 j = 3 j = 2 j = 1 Figure 2: Grids at several resolutions resolutions to construct a flat flow map at the finest resolution. To sum up, measures obtained at different resolutions have different characteristics: Finer scale measures provide (1) a finer knowledge of the space dependence of the optic flow and (2) rely on a looser assumption (A) on the flow field uniformity. However, coarse scale measurement are less subject to time aliasing as indicated in (9). In this approach, we follow the path already opened by several authors in various flow measurement methods [9] [3] [31] [27] [21] to combine informations from several scales in the following way: large displacements are measured first and at large scales. Then, the resulting motion is compensated so that the residual motion is smaller and stays within the alias free range of the finer scale subsystems. 13

Assume a motion estimation at scale j 1 has predicted a motion of ṽ. The predicted motion ṽ can for example be uniquely decomposed as ṽ = ṽ N + ṽ r where { ṽ N 2 j Z 2 ṽ r 2 j [ 0.5, 0.5) 2 The motion estimation refinement at scale j then consists in finding the motion v as ṽ N + v r where we expect the new residual motion v r to be not much larger that the older one ṽ r. The residual motion v r = (v r 1, v r 2) is estimated as a solution of the system of the following N equations ( 1 I(t + 1), ψn j,k+2 j ṽ N + 2 x 1 ( + 1 2 I(t + 1), ψn j,k+2 j ṽ N x 2 I(t), ψn jk x 1 + I(t), ψn jk x 1 ) v r 1 ) v2 r = I(t + 1), ψ nj,k+2jṽ I(t), ψ n N jk for n = 1... N. These equations can be compared with the same in v = (v 1, v 2 ) when no large motion compensation is done (which consists in setting ṽ N = 0), and that are ( 1 2 I(t + 1), ψn jk + x 1 + 1 2 I(t), ψn jk x 1 ( I(t + 1), ψn jk x 2 ) + v 1 ) I(t), ψn jk v 2 = I(t + 1), ψjk n I(t), ψ n x jk 1 This coarse to fine refinement scheme is initialized with a coarsest scale measurement in which the predicted motion ṽ is set to 0. Note that large motion compensation is done only partially: in integer multiples of the current grid step so that no interpolation computation has to be done. In this, our approach differs from that of Simoncelli [27] or Magarey and Kingsbury [21]. The behavior of a local system at a given scale j and location 2 j (k 1, k 2 ) gives several kinds of information on our measurements: 1. If the system has a unique solution (v 1, v 2 ), we get a straightforward estimation of the optic flow at 2 j k. This happens if our underlying model of uniform flow is valid. 2. If the system has no solution, it means that our assumption (A) is incorrect. In such a case, finer scale measurements are necessary, since they rely on a looser uniformity assumption (A). As an estimate of the current scale, we keep a least square estimate of the velocity that is required for large motion compensation. If for example our measure region overlaps two regions where the flow is different, we have to split our measure region in subregions, to perform again this measure on each of these subregions, where hopefully the optic flow is more uniform. 14 (23) (24)

3. If on the contrary, the system has infinitely many solutions, this means that the pattern at the location we are looking at is too poor to tell us how it is moving. The aperture problem remains. A typical case is a locally translation invariant pattern, because then it is impossible to measure its motion along its translation invariance axis. In practice, we make no difference between the cases 1 and 2. Moreover, as motivated in Sec. 3.1, we combine constraints on the flow coming from several resolutions. If a system we get at scale j (of the form (22)) is written A j V = B j where A j is symmetric positive, we combine this system with that of the preceding scale at the very same location A j 1 V = B j 1, and solve at scale j the system (A j + ρa j 1 ) V = B j + ρb j 1 (25) Such a combination makes sense because solving a system AV = B where A is symmetric positive is equivalent to minimizing the quadratic functional V V T AV 2B T V, and solving the above combined system is thus equivalent to minimizing a positive combination of such functionals. In practice, the coefficient ρ is chosen to be relatively small, so that the LS constraints coming from scale j 1 influence the flow estimation at scale j only when constraints obtained at scale j fail to determine properly the flow. As a safeguard against errors induced by time aliasing, we add a test that is performed in cases 1 or 2. We reject measures (v1, r v2) r (or (v 1, v 2 ) if no large motion compensation is done) that are above the time aliasing threshold (ie (v 1, v 2 ) > α 2 j ). Remarks Usually, the system we pick up from the coarser scale j 1: A j 1 V = B j 1 is expressed in terms of another residual motion, so that an affine change of variables has to be done prior to the combination of LS constraints described in (25). The above decomposition of a global motion as a sum of an integer step motion plus a residual motion makes sense if a residual motion can always be measured within a range which is strictly larger than some 2 j [ 0.5, 0.5) 2. For this purpose, the aliasing limit given in (9) is not sufficient. This aliasing range can be extended by oversampling the wavelet transform, and/or shifted by using frequency shifting, as described in Sec. 4.2. 4 Analytic wavelets In this section, we explain how using real valued wavelets in the framework described in our paper does not allow to perform stable measurements of the optic flow, and motivate the use of analytic wavelets. We will see that this allows us to gather a higher number of constraints on the optic flow, and that the corresponding measures can be also made less sensitive to time aliasing. Let us first briefly recall some notations on analytic functions and the Hilbert transform. The Hilbert transform H maps L 2 (R, C) onto L 2 (R, C) and can be defined in the time or the frequency domain, by either of formulae Ĥf(ω) = ˆf(ω) sign(ω) ( ) 2 Hf = f it (26a) (26b) 15

A function f is analytic if its negative frequency content is 0, which is the same as saying that it is invariant under the Hilbert transform. A real valued signal is never analytic, unless it is zero. The analytic transform of a real valued signal f is f + = f + Hf. Note that the real signal can be recovered from the analytic one by taking its real part: f = Re f +. 4.1 Estimation stability Standard monovariate real valued wavelets are displayed in figure (3 a-d). If we use wavelets ψ 1, ψ 2 and ψ 3 as defined in (10a 10c) to compute the optic flow, the coefficients of the system of equations (S) are real valued and highly oscillating in space. For these reasons, they happen to vanish, or to be below the noise level, which makes our estimation of the flow unstable. 1 0.8 0.6 0.4 0.2 0 φ(x) 1 0.5 0 0.5 ψ(x) 1 0.5 0 ˆφ(ξ) 4 2 0 2 4 x 2 1 0 1 2 x 2π 0 2π ξ (a) φ (b) ψ (c) ˆφ 1 0.5 ˆψ(ξ) 0 2π 0 2π ξ (d) ˆψ Figure 3: φ, ψ and their Fourier transforms To demonstrate this in more detail, we go back to the one dimensional case. The velocity estimation can be written as v(k/2 j t I(t; x)ψjk (x)dx ) (27) I(t; x)ψ jk (x)dx where ψ is a classical real-valued wavelet, as displayed in figure (3 a,c). We denote ψ + its analytic counterpart. The denumerator in (27) can be written as D(k/2 j ) = [I(t) ψ j0 ] (k/2 j ) (28) 16

or as D(k/2 j ) = Re [ I(t) ψ + j0] (k/2 j ) (29) Since ψ + is analytic, I(t) ψ + j0 also is. We decompose this analytic signal into an analytic amplitude and instantaneous frequency, as described in [24], chap. 4: [ ] I(t) ψ + j0 (k/2 j ) = A(k/2 j )e iθ(k/2j ) (30) In this decomposition, A is a positive function called analytic amplitude, θ is the phase function and its derivative θ is the instantaneous frequency. In the case where we use the real valued wavelet ψ in the estimation (27), the denumerator can be written as the real part of the above term, and its absolute value is therefore D(k/2 j ) = A(k/2 j ) cos θ(k/2 j ) (31) The cosine part usually oscillates at a frequency of about 2 j, which makes it very likely to be close to 0 for several integers k. Fig. 4 a shows that sampled values of D(k/2 j ) can be close to 0: estimations of ratios with such a denumerator are as reliable as playing Russian roulette. If we now use an analytic wavelet ψ + instead of the real one, the formula giving v becomes v(k/2 j ) I(t; x)ψ + jk (x)dx I(t; x)ψ + jk (x)dx t (32) k k (a) real case (b) analytic case Figure 4: Sampling of D(k/2 j ) in the real and analytic cases The denumerator is thus now D(k/2 j ) = A(k/2 j )e iθ(k/2j ) (33) and its absolute value simply A(k/2 j ). This new denumerator is now much less likely to vanish (see Fig. 4 b). Whereas the above argument is formally valid only in 1D, the experience showed that the same problem appears in 2D (and it is a strong understatement to say that the first numerical experiments with real valued classical wavelet (10a 10c) were not very encouraging). 17

Two dimension analytic wavelets This suggests us to replace our three real wavelets ψ 1, ψ 2 and ψ 3 as defined in equations (10a 10c), with the four following wavelets Ψ 1 (x) = ψ + (x 1 )φ(x 2 ) Ψ 2 (x) = φ(x 1 )ψ + (x 2 ) Ψ 3 (x) = ψ + (x 1 )ψ + (x 2 ) Ψ 4 (x) = ψ + (x 1 )ψ (x 2 ) (34a) (34b) (34c) (34d) where ψ (x) = ψ + (x). Theorem 3. If (ψjk n ) n=1...3,j Z,k Z 2 is a basis of L 2(R 2, R), then (Ψ n jk ) n=1..4,j Z,k Z2 is a redundant family of L 2 (R 2, R): there exists some positive bound M such that f, Ψ n jk 2 M 1 f 2 2 for any f in L 2 (R 2 ) (35) jkn We also state a converse stability result: the energy of the wavelet coefficients of some function f is bounded by some multiple of the L 2 norm or f: f, Ψ n jk 2 M 2 f 2 2 for any f in L 2 (R 2 ) (36) jkn A proof for inequality (35) is given below, while the more technical proof for inequality (36) is given in appendix in section A. Proof. Noticing that we have and ψ 1, I = Re Ψ 1, I ψ 2, I = Re Ψ 2, I ψ 3, I = Re Ψ 3, I + Re Ψ 4, I ψ 1, I 2 + ψ 2, I 2 Ψ 1, I 2 + Ψ 2, I 2 ψ 3, I 2 ( Ψ 3, I + Ψ 4, I ) 2 2 ( Ψ 3, I 2 + Ψ 4, I 2) Both inequalities imply that f, Ψ n jk 2 1 f, ψ n 2 jk 2 jkn jkn and the result follows from the fact that (ψjk n ) is a basis. 18

Remark. Note that the wavelets Ψ n are complex valued. They are therefore not in L 2 (R 2, R), and we cannot strictly say that the wavelet family makes up a frame of L 2 (R 2, R). A more rigorous way to state this would be either to say that { Re(Ψ n jk ), Im(Ψ n jk) : n = 1... N, j Z and k Z 2} is a frame of L 2 (R 2, R), or that { Ψ n jk, Ψ n jk : n = 1... N, j Z and k Z2} is a frame of L 2 (R 2, C). This allows us to ensure in some way that this representation does not miss some motion information, as is discussed in section 3.1. Analytic measure functions are also used in spatiotemporal filtering techniques, where velocity tuned filters are analytic [13]. Note, however, that the Hilbert transform is also used to make filters direction selective and not analytic [30] [7]. Using analytic wavelets in such a formulation, we integrate in a synthetic way both energy and phase output of our filters into out systems, and step out of the debate on whether the use of the phase output or the energy output of the filters is best suited for measuring optic flow. With a similar argument, Magarey and Kingsbury also motivate the use of analytic wavelets [21]. Psychophysical evidence also supports the use of analytic wavelets. Daugman [12] identified a pair of (real valued) Gabor filters with a π/2 phase shift between them f 1 = e x x 0 2 /2σ 2 cos ω x f 2 = e x x 0 2 /2σ 2 sin ω x Such a pair can equivalently be viewed as a single complex filter f = e x x 0 2 /2σ 2 e iω x (37) that now has a non-symmetric spectrum, and is thus an approximation of an analytic transform of f 1 (provided that the absolute value of the vector ω is larger than the frequency spread 1/σ of the Gaussian window). 4.2 Shifting the alias free measure range with analytic wavelets Time aliasing can be viewed as an error in estimating the derivative v I(x) with a finite difference I(x) I(x vδt). In the Fourier domain, this is the error in approximating a complex exponential introduced by a finite translation in space e iv ω with its first order Taylor expansion around 0 which is 1 + iv ω. (We remind that v is the displacement per frame v = (v 1, v 2 ) and denote ω the 2-D frequency variable). We show in this section that we can reduce the negative impact of time aliasing by doing the same Taylor approximation, but around a shifted origin in frequency. ˆψe iv ω Real valued wavelets ψ have a symmetric spectrum, ie ˆψ(ω) = ˆψ( ω). To approximate with a first order Taylor expansion in ω, the most reasonable is to expand e iv ω around 0. Analytic wavelets, as described in Eqs. (34a 34d) have a non symmetric spectrum whose support is not centered on the origin any more. If we do the Taylor expansion of e iv ω around the frequency center of 19

ˆψ ˆψ + 0 ω ω 0 0 ω domain of Taylor expansion (a) Real wavelets smaller domain (b) Analytic wavelets Figure 5: Taylor approximation frequency ranges (for 1D wavelets). We notice that on the left hand side, the spectrum of ψ is symmetric, and that e ivω ˆψ is most reasonably approximated with a Taylor expansion of e ivω in ω around 0. Conversely, on the right side, the spectrum of ψ + in not symmetric, and an expansion of e ivω around ω 0 yields a more accurate estimation of e ivω ˆψ. these analytic wavelets, the resulting approximation of e iv ω ˆψ(ω) is more accurate, because it relies on the validity of a Taylor approximation in ω over a smaller frequency range (compare Fig. 5 a and 5 b that illustrate this for monovariate wavelets). If we have a look at one of the equations of system (DS) with a discrete wavelet ψjk n instead of a continuous one ψus, n it can be written compactly as I(t + 1) I(t) l=1,2 2, ψn jk x l v l = I(t + 1) I(t), ψjk n Let us see how (38) can be inferred with a first order Taylor expansion in the frequency domain around 0. Starting from and We infer from (40) I(t + 1/2), ψjk n = Î(t), eiv ω/2 ˆψn jk ( I(t + 1/2), ψjk n Î(t), 1 + i v ω ) ˆψn jk 2 I(t + 1/2), ψjk n I(t), ψjk n + 1 2 From (39), we obtain in a similar way (38) I(t + 1/2; x) = I(t + 1; x + v/2) (39) I(t + 1/2; x) = I(t; x v/2) (40) l=1,2 I(t), ψn jk x l I(t + 1/2), ψ n jk I(t + 1), ψ n jk 1 2 by Taylor approximation v l (41) l=1,2 I(t + 1), ψn jk v l (42) x l 20

(the fre- By comparison of (42) and (41), we finally get (38). If we now do the same computations, but with a shifted Taylor expansion center ω n jk quency center of the analytic wavelet ψjk n, we get with very similar computations ( ) I(t + 1/2), ψjk n e iv ωn jk /2 (1 + iv ω n jk/2) I(t), ψjk n + 1 I(t), ψn jk v l 2 x l l=1,2 and I(t + 1/2), ψ n jk e iv ωn jk /2 ( that yield by comparison again e iv ω n jk I(t + 1) + e iv ω n jk I(t), ψn jk v l 2 x l l=1,2 (1 iv ω n jk/2) I(t + 1), ψ n jk 1 2 ) I(t + 1), ψn jk v l x l l=1,2 = e iv ωn jk (1 iv ω n jk ) I(t + 1), ψ n jk e iv ω n jk (1 + iv ω n jk ) I(t), ψ n jk We make a second order approximation by crossing out e iv ωn jk (1 iv ω n jk ) and its conjugate from this equation, to finally get e iv ω n jk I(t + 1) + e iv ω n jk I(t), ψn jk v l = I(t + 1), ψjk n I(t), ψ n 2 x jk l l=1,2 This formula allows to approximate with a better accuracy the displacement v provided that some estimation of v ω n jk is available. Its use is not straightforward, because it relies on an a priori estimation of the displacement, which seems contradictory. Given a rough estimation ṽ of the velocity obtained with (38) or from a coarser scale measurement, a finer estimate can be extracted from the system of equations (43) where v has been replaced with ṽ in all complex exponentials: e iṽ ω n jk I(t + 1) + e iṽ ω n jk I(t), ψn jk v l = I(t + 1), ψjk n I(t), ψ n 2 x jk l l=1,2 Also note that estimation formula (44) without frequency shifting is the same as (38) when the a priori estimated ṽ is 0. So using formula (38) with a rough approximation ṽ (where e.g. v ṽ / v 20%) is still much better than doing no frequency shifting at all. This method has been tested on a two scale flow measurement where the coarser scale flow estimation is used as an input ṽ in the finer scale flow measurement formula. The result is compared with a ṽ = 0 input (ie no frequency shift) on figure 6. (43) (44) 5 Dyadic filter bank wavelets For computational efficiency, we need wavelets implementable with dyadic filter banks, so that the computation of the system coefficients in (S jk ) can be done with a fast wavelet transform. We use 21

0.6 Error (in pixels) 0.4 0.2 0 0 0.5 1 1.5 2 Velocity v in pixels Figure 6: Accuracy gain with the frequency shift correction. Compared average errors in flow measurement: with frequency shift (solid) and without (dashed). separable wavelets ψ(x 1, x 2 ) = f(x 1 )g(x 2 ), and can therefore limit the scope of our designing to monovariate wavelets. For this, we use all the framework of multiresolution analyses as described by Mallat in [23] [22] [24]. Wavelet coefficients in the one dimensional case can be computed with a dyadic pyramid filtering and subsampling scheme when the wavelet is an infinite convolution of discrete FIR 1 filters, which can be written in Fourier domain as ˆψ(ω) = + j=1 M j ( ω 2 j ) where the M j s are trigonometric polynomials. For computational efficiency purposes, the functions M j should be all the same, up to the very first ones. There exist plenty of dyadic filter bank wavelets. More difficult points are the computation of wavelet derivative coefficients also with dyadic filter banks, as well as the design of analytic dyadic filter bank wavelets. 5.1 Analytic dyadic filter bank wavelets Using a true Hilbert transform to compute analytic wavelet coefficients is not possible in practice because of its computational cost. This would indeed involve functions of infinite support and of very slow decay at infinity. The purpose of this section is to approximate the Hilbert transform ψ + of a real wavelet ψ with an almost analytic wavelet ψ # that can still be implemented with a FIR 1 filter bank. Design We want our wavelet ψ # to have most of its energy on the positive frequency peak, and we want to keep the relationship ψ = Re(ψ # ), the same way as for the true Hilbert transform, ψ = Re(ψ + ), so that Th. 3 remains true. We start from any FIR filter pair m 0 and m 1 that can be conjugate mirror filters as used by Adelson and Simoncelli [2] or Mallat [22] or more generally simply a low- and high-pass pair of filter. We 1 finite impulse response (45) 22

define a wavelet ψ as an infinite convolution of these filters, which we write in the Fourier domain ( ω ) + ( ω ) ˆψ(ω) = m 1 m 0 2 2 j j=2. (46) ψ and its Fourier transform are displayed in (3 a,b). Almost analytic transformation the following relationships: If now m 2 is a Deslauriers-Dubuc interpolation filter, fulfilling m 2 (ω) + m 2 (ω + π) = 2 ω R, and (47) m 2 (ω) = m 2 ( ω) R ω R, (48) then ˆψ # (ω) = ˆψ(ω)m 2 (ω/4 π/2) is a good approximation of ˆψ + (ω) for two reasons: Most of the negative frequency peak of ψ is canceled by a vanishing m 2 (ω). The Fourier transform of ψ and m 2 (ω) are displayed in Fig. 7 a. The remaining negative frequency content of ψ # is not 0, but is less than 2% of ψ # s total L 2 norm. The Fourier transform of ψ # is displayed in Fig. 7 b, and ψ # in Fig. 7 c. We can also retrieve the original wavelet ψ from the almost analytic one ψ #, in the same manner as we can for the truly analytic one. In other words, the same way as ψ = Re ψ +, we now have Indeed, ) (ψ # + ψ # (ω) = ψ # (ω) + ψ # ( ω) ψ = Re ψ # = ˆψ(ω) ( ( ω m 2 4 π ) ( + m 2 ω 2 4 π )) 2 = 2 ˆψ(ω) thanks to (47 48). This relationship allows to extend Theorem 1 to the case of almost analytic wavelets, so we can state Theorem 4. The family of almost analytic bivariate wavelets defined as in (34 a-d) by replacing ψ + with ψ # is redundant. A proof for this is given is Appendix A. A similar construction has been suggested by A. Cohen in [11]. His approach is different in that all filtering steps are changed to make the wavelet quasi analytic: the low pass filter is replaced with an analytic low pass filter of infinite support. In our case, a single filtering step is made analytic. The Fourier transform of the 2D wavelets computed from the 1D analytic wavelets as described in (34a 34d) now only have a single peak. They are displayed in Fig. 8. 23

1 m 2 (ξ/4 π/2) ˆψ(ξ) 1 ψ ˆ# (ξ) 0.4 0.2 Re(ψ # (x)) Im(ψ # (x)) 0.5 0.5 0 0.2 0 0 0.4 2π 0 2π ξ 2π 0 2π ξ 2 1 0 1 2 x (a) ˆψ and m 2 ( ω 2 π 4 ) (b) ψ # (c) ψ # Figure 7: Approximation ψ # of ψ + and its Fourier transform (a) ψ 0 (b) ψ 1 (c) ψ 2 (d) ψ 3 (e) ψ 4 Figure 8: Fourier transform of 2D analytic wavelets 24

Filtering scheme Inner products I(x)ψ # (x)dx are computed the same way as I(x)ψ(x)dx up to a single additional discrete filtering step. Since as compared to the product expansion of ˆψ ( ω ) ( ω ) ( ω ) ˆψ(ω) = m 1 m 0 m 0..., 2 4 8 the expansion of ψ # ψ # (ω) = ˆψ(ω)m ( ω 2 4 π ) (49) [ 2 ] ( ω ) ( ω ) ( ω = m 1 m 0 m 2 2 4 4 π ) ( ω ) ( ω ) m 0 m 0... (50) }{{ 2 } 8 16 has an additional discrete filter at the fore-last filtering pass emphasized with a lower bracket. If we denote a jk [f] = f, φ jk d jk [f] = f, ψ jk d # jk [f] = f, ψ# jk the classical filtering scheme to compute coefficients d jk [f] is displayed in Fig. 9 a. This can be compared to the analytic patched scheme that is displayed in Fig. 9 b. Both figures display filtering and subsampling pyramid schemes using the following conventions: boxes 2 1 denote dyadic subsampling, and m 0 and alike denote filtering steps. 5.2 Dyadic filter bank wavelet derivatives Our approach is very generic, and is based on the following proposition: Proposition 1. If a function ψ is an infinite convolution of discrete filters ˆψ(ω) = + j=1 M j ( ω 2 j ) which is the case of both the scaling function φ and the analytic wavelet ψ # defined above, then where M j(ω) = Proof. Thanks to the following identity ψ (ω) = + M j j=1 ( ω 2 j ) { 2Mj (ω) e iω +1 if j 2 2(e iω 1)M 1 (ω) if j = 1 + j=1 e iω/2j + 1 2 = eiω 1 iω 25

a 0,k m 0 2 1 m 0 2 1 m 0 2 1 m 0 2 1 a 4,k m 1 2 1 m 1 2 1 m 1 2 1 m 1 2 1 d 1,k d 2,k d 3,k d 4,k (a) Real a 0,k m 0 2 1 m 0 2 1 m 0 2 1 m 0 2 1 a 4,k m 2 2 1 m 2 2 1 m 2 2 1 m 1 2 1 m 1 2 1 m 1 2 1 d # 2,k d # 3,k d # 4,k (b) Analytic Figure 9: Filtering schemes in 1D 26

we get + M j j=1 ( ω 2 j ) = iω + j=1 M j ( ω 2 j ) = ψ (ω) This shows that the derivative a dyadic filter bank wavelet is also implementable with a filter bank and gives us the rule to find the corresponding coefficients: the last filter M 1 has to be multiplied by 2(e iω 1) and all the other filters (M j, j 2) have to be divided by (e iω + 1)/2. The extension to partial derivatives of two dimensional wavelets is straightforward thanks to the x y separability of our wavelets. Note that for j 2, the filters M j (ω)/(e iω + 1) are also polynomial. Indeed, M j is either some m 0 or m 0 (ω) m 2 (ω π/2), as can be seen in (49), an is thus always divisible by a low pass filter m 0 as defined in equation (45). The order of the zero π is related to the smoothness of the wavelet ψ, as well as to its number of vanishing moments if it is orthogonal. So usually, for some strictly positive p. (e iω + 1) p m 0 (ω) 6 Numerical experimentation The algorithm was implemented with a dedicated set of analytic mother wavelets. The motivation of their use as well as their construction are described in section 4. We shortly describe some implementation issues and detail the numerical validation of our algorithm. Filters The filters used throughout all experimentations are usually the same: we use Deslauriers Dubuc filters of varying orders. The low pass Deslauriers Dubuc filters are [ ] 1 0 9 16 9 0 1 /16 (51a) or [ 3 0 25 0 150 256 150 0 25 0 3 ] /256 (51b) These filters have several advantages. They have a good frequency resolution (and number of vanishing moments) with respect to the number of operations for a given convolution: they bypass the classical limitation according to which the number of vanishing moments is bounded for a given filter support size and a given computational complexity because they have a number of zero places that are inside the support without costing additional flops. They have a second advantage we did not benefit from in our implementation: all their coefficients are dyadic rationals, and the related computations can be limited to integer computations. The wavelet transforms were always oversampled with a factor of 2, so that the alias free measurement range in (9) was multiplied with a factor of 2. The corresponding high pass filters m 1 are made from these low pass filters with a π frequency shift. The analytic filter is obtained from the low pass filter m 0 with a π/2 frequency shift. Also note that a convolution with this complex filter is of the same complexity as with a real filter, because its coefficients are either real or of vanishing real part. 27

Dealing with boundary effects Several methods were tested to reduce the loss of accuracy caused by the boundary occlusions: zero, symmetric or constant padding. The best error reduction (based on experimental comparisons) are achieved by continuous extensions of the picture after the boundaries: ie either symmetric or constant padding, as already noticed by Simoncelli [27]. To limit the increase of computations and storage requirements, these constant paddings are done at the level of the convolution function at any resolution. A signal is automatically padded with constant extensions as required by the support of the filter. 6.1 Computational cost The computational cost has been estimated for two situations: with or without estimation of illumination changes. The cost in flops per pixel includes prefiltering, pyramid filtering and subsampling and system solving, frequency shift correction and interpolation from the resolution of 2 2 to that of 1 1 pixel. Similar complexity estimates from Magarey and Kingsbury[21] are given for comparison in table 1. A small difference is that Magarey and Kingsbury estimated the complexity of their algorithm on 5 pyramid levels, whereas our estimate is a bound valid for any number of levels. Method complexity Magarey & Kingsbury 1618 This (with illumination) 863 This (without illumination) 780 Table 1: Complexity in FLOPS per pixel 6.2 True sequences Image sequences were downloaded from Barron & al. s FTP site at csd.uwo.ca. The algorithm was tested on the rubic sequence (a rubic s cube on a rotating plate), the taxi sequence (where three vehicles are moving respectively towards East, West and Northwest). One frame from the sequence as well as a map of the measured optic flow are displayed in Fig. 6.2 and 6.2. Figure 10: Rubic sequence and flow 28

Figure 11: Taxi sequence 6.3 Synthetic sequences The described algorithm was also run on classical synthetic sequences (including Yosemite), and the result was compared to other methods. The error measurement was done in terms of angular error, as introduced by Fleet & Jepson in[13]. The distance between a measure velocity ṽ = (ṽ 1, ṽ 2 ) and a real velocity v = (v 1, v 2 ) is the angle in degrees between the vectors ṽ 1 ṽ 2 1 and which is arccos(1 + ṽ v). For the translating tree sequence, the average angular error is 0.78 o with a density of 99.3%, that can be compared to Magarey & Kingsbury s 1.32 o. Table 2 recalls similar measurements done by other authors. Frames Method Avg. Error Density 21 Fleet & Jepson 0.32 o 74.5% 10 Weber & Malik 0.49 o 96.8% 2 Magarey & Kingsbury 1.32 o 100.0% 2 This method (with illumination) 0.78 o 99.3% Table 2: Compared angular errors for the translating tree sequence. In this table, the first column indicates the number of frames required to perform the measurement. Note that with that respect, the least expensive methods are Magarey and Kingsbury s method, as well as ours. v 1 v 2 1 For the Yosemite sequence, the average angular error over the whole picture (including ground and sky, less 16 pixels on each boundary) is 6.52 o. The measurement density is 96.5%, because some measures were rejected because of aliasing. This result can be compared to Magarey & Kingsbury s 6.20 o. For this sequence, the flow map and angular error map are displayed as well as the map of measured illumination changes are displayed. The average angular errors are displayed in Tab. 3. We see that the angular error is high on the horizon, which is an occlusion. The illumination change map indicates whether the illumination does not change (in gray), is increased (white shades) or decreases (darker shades). The algorithm detects that the right part of the left cloud is getting 29

(a) One frame (b) Measured flow map (c) Angular error map (d) Measured illumination changes Figure 12: Yosemite sequence 30

lighter, while the left part of the right cloud is getting darker, which corresponds at least to the impression the sequence leaves when it is viewed. We estimate the accuracy of the illumination change measurement in the following section. Frames Method Avg. error Density 21 Fleet & Jepson 4.63 o 34.1% 10 Weber & Malik 4.31 o 64.2% 2 Magarey & Kingsbury 6.20 o 100.0% 2 This method (with illumination) 6.50 o 96.5% Table 3: Compared angular error measures for the Yosemite sequence. The same comments as for Tab. 2 hold for these results. 6.4 Illumination changes We use the optic flow equation defined in the first section. The flow and illumination change estimation is done with an additional measure wavelet on nonzero integral: ψ 0 (x 1, x 2 ) = φ(x 1 )φ(x 2 ) (52) All wavelets used until now to measure the velocity are of zero integral. The purpose of such a setting is the ensure the robustness of the measurement against illumination changes. Now our purpose is to measure these illumination changes, and for this reason we add this new wavelet of nonzero DC response that see the overall illumination changes. As a consequence, any local linear system has now an additional unknown L /L and an additional real linear constraint obtained by inner product with Ψ 0. Adding a new parameter to explain changes in illumination must first ensure that the flow estimation is robust with respect to global illumination changes. Our algorithm is insensitive to additive pixel value offsets by construction: the wavelets used for OF measurement are of zero DC response. To check to sensitivity of the algorithm to multiplicative pixel value changes, we measured the OF between picture number 20 of the translating tree sequence and picture number 21 multiplied by a varying factor in a very wide range [0.5, 1.5]. The results are shown in table 4. They are very good compared compared to classical methods (fractional block matching, gradient pixel recursive) as reported by Magarey & Kingsbury, where a scaling of 0.95 or 1.05 already multiplies the angular error by a factor of 10. We also compared the average measured illumination change with the actual value: L/L. For wide changes, the actual value is L(t + 1) L(t) 2 L(t) + L(t + 1) where t and t + 1 are the times of the two successive frames used for our calculation. This comes from the fact that our algorithm takes as a reference frame to measure the flow and the illumination changes an estimate of the half time frame I(t + 1/2) which is estimated with I(t + 1/2) I(t) + I(t + 1) 2 31

as detailed in section 2 on time aliasing. As an example, for a multiplication of I(t + 1) with a factor of 0.5, we expect the measured illumination change factor to be 2 (0.5 1)/(1 + 0.5) 0.67. Looking at table 4, we see that the illumination changes are estimated without bias. Scaling factor s 0.5 0.7 0.9 1.0 1.1 1.3 1.5 Angular error 1.33 o 0.84 o 0.76 o 0.78 o 0.79 o 0.84 o 0.93 o Real ill. change 2(s 1)/(1 + s) 0.67 0.35 0.105 0 0.095 0.26 0.4 Measured ill. change 0.67 0.35 0.105 0.00 0.095 0.26 0.40 Table 4: Angular error measure, real illumination change and average of measured illumination change for the translating tree sequence. Note that the range of illumination changes that our algorithm can deal with is very wide. A second test was done on the same sequence (translating tree). Frame 20 was left unchanged, and frame 21 was multiplied with a Gaussian profile g(x, y) = 1 + e (x x 0 ) 2 +(y y0 ) 2 2σ 2 (53) where the center (x 0, y 0 ) is (75, 75) and σ = 75/2. We remind that the frame size of the pictures in the translating tree sequence is 150 150 pixels. The relative illumination change profile is thus expected to be: L L 2g(x, y) 1 1 + g(x, y) which has a maximum of 2/3. The two successive frames of the translating tree sequence are displayed in Fig. 13. Figure 13: Two successive frames of the translating tree sequence, where the second frame is multiplied by a Gaussian profile of Eq. (53) The optic flow and an illumination change map were estimated with our algorithm. The average angular error for flow estimation is 2.45 o. The average error in illumination change estimation was estimated with the following way: denoting λ the measured illumination change map that was supposed 32

to estimate L /L, we computed the L 1 average error E = 1 NM N i=1 M λ(i, j) L (i, j) L(i, j) j=1 This measured error was 0.0255. Compared to a maximum of 0.67, this is a relative error of 3.8%. Both the true illumination change map and the measured map are displayed in Fig. 14. Figure 14: Illumination change maps for the modified translating tree sequence. Left: true map and right: measured map. We think that besides enhancing the stability of the flow measurement with respect to strong illumination changes, the measurement of this additional parameter can be useful in coding video sequences. For a number of reasons, the illumination of a given image sequence can change with time. This can be caused by moving light sources, as well a single camera motion. If the camera is traveling from a dark area to a lighter one, the illumination or color balancing system changes the local color and illumination of a moving feature in the sequence. Conclusion We presented in this paper a time efficient multiscale optic flow computation scheme. We demonstrated its accuracy and speed on classical sequences. This algorithm compares well to existing methods. We also demonstrated its high robustness with respect to illumination changes, together with its ability to measure these illumination changes. Last but not least, we proved that the basic approximations, on which our algorithm is based (flow uniformity, time aliasing approximation of a time derivative with a finite difference) are asymptotically valid. Time efficiency is gained because the optic flow is computed between two frames only, and because the basic computational structure is similar to a wavelet analysis of the pictures: a first step consists in computing wavelet coefficients, and a second step consists in estimating the flow and refining progressively this estimate in a single run through the wavelet coefficients. 33