Abstract
We consider the simultaneous estimation of an optical flow field and an illumination source term in a movie sequence. The particular optical flow equation is obtained by assuming that the image intensity is a conserved quantity up to possible sources and sinks which represent varying illumination. We formulate this problem as an energy minimization problem and propose a space–time simultaneous discretization for the optimality system in saddle-point form. We investigate a preconditioning strategy that renders the discrete system well-conditioned uniformly in the discretization resolution. Numerical experiments complement the theory.
Keywords: Optical flow, Space–time, Discretization, Preconditioning, Saddle-point, Linear-quadratic control
1. Introduction
Optical flow is the apparent motion of objects, surfaces, and edges in a visual scene. In Computer Vision the optical flow is calculated as the flow field registering pixels of a movie, which we understand as a sequence of ordered images. The classical optical flow equation is based on the following assumptions:
-
1.
Brightness constancy along each characteristic of the flow.
-
2.
A slowly varying image sequence.
The first assumption implies that changes of intensities caused by varying illumination (for instance shades) influence and distort the recovered flow. In this paper we admit violations of this assumption, and aim at estimating global changes of illumination and the effect of them onto the flow field. Indeed, the problem we consider here consists in the simultaneous determination of the optical flow, the brightness, and its possible sources and sinks in space and time. While standard optical flow algorithms process two successive frames of a movie sequence at a time [18–20,3,13,6,1], we work with a continuous space–time simultaneous formulation similarly to [23]. A brief overview of gradient based optical flow models and algorithms may be found in [14].
Related to our work is [24]. Therein, the standard optical flow constraint was replaced by the continuity equation , motivated by mass conservation in fluid flow. We relax the continuity equation by allowing distributed sources g, and replace the momentum ρv by one unknown j, called the flux; we thus obtain the constraint .
The work [17], see also references therein, suggested incorporating physical models to account for illumination changes, such as the diffusion of the heat observed by infrared cameras. The parameters governing the physical model are then estimated in parallel with the optical flow. Our ansatz is more naive, in the sense that we treat the possible change in illumination as an additional unknown, but a physical description can in principle be used instead.
As a further difference to the bulk of optical flow literature we treat the density ρ as an unknown. We thus estimate in parallel by minimizing a functional which consists of a discrepancy term for ρ and regularization terms for j and g. This is similar to [7]; however, using the flux j instead of the velocity v results in linear optimality conditions characterizing the minimizer of the functional . While this is convenient for computation, it leads to somewhat unexpected flow patterns (see Sections 5–6).
It is important to note that these optimality conditions form a set of equations that are coupled in space–time. This is typical for optimal control problems with spatio-temporal constraints due to the coupling of the original problem forward in time and the adjoint problem backward in time. The main contribution of this work is to propose and test a preconditioner for the discretized space–time system in saddle-point form that is robust in the discretization parameters.
The outline of the paper is as follows. In Section 2 we introduce our optical flow model, which consists in the minimization of a quadratic cost functional over a space of space–time dependent functions subject to an optical flow constraint. In Section 3 the functional analytic framework is established. In Section 4 we rewrite the optimality conditions in a saddle-point form and discuss its discretization and preconditioning. In Section 5 we report on our numerical experiments. Section 6 concludes the paper.
In the following, denotes the duality pairing, while and denote the scalar product and the norm of a Hilbert space X. The usual Lebesgue and Sobolev spaces on a domain D are written as and . We abbreviate as , and similarly for other spaces.
2. Optical flow model
We consider a movie sequence of time length , with each frame defined on a rectangular domain . We write for the temporal interval. As explained in the introduction above, our optical flow model is the scalar transport equation
![]() |
(1) |
Here, ρ denotes the density which is the intensity of the image considered as a piecewise constant function; j denotes the flux which is the optical flow weighted by the density; and g is a function that models varying spatial illumination. The divergence ∇⋅ acts on the spatial variable only. The functions ρ and g are scalar-valued, while j is vector-valued on . Integrating (1) over a subdomain and using the divergence theorem for the j term, one sees that the density ρ is either transported in or out of over its boundary, or is created/annihilated by means of the source term g.
In this paper we consider the problem of identifying the flux j and the source g from a finite number of frames of a movie, indexed by :
| (2) |
We aim at minimizing the data fidelity functional
| (3) |
subject to the transport equation (1) and further constraints on the flux j and the source g as discussed below. Here, the symbol
denotes the averaged sum .
For comparison purposes we recall the standard optical flow equation, which reads as follows:
| (4) |
Eq. (4) can be formally derived from (1) by identifying j and ρΦ and neglecting small terms: Indeed, from (1) we get
| (5) |
Hence, if the term is small (meaning that there is a slowly varying velocity), and if there are no changes in illumination, the equations are identical.
3. Functional analytic framework
We now introduce function spaces for which the transport equation (1) is well-defined. We shall work with image intensity , flux , and source . The superscripts indicate the Sobolev smoothness in time and space, respectively. Here, is the space of vector-valued functions in with distributional divergence in . As a consequence of the Fubini–Tonelli theorem [25, Section 0.3], the space is isometrically isomorphic to . The norms on and are defined by
where the scaling and is to match the units. We introduce the product space
and associate it with the norm
| (6) |
The transport equation constraint (1) is reformulated via the linear operator
| (7) |
Since G is continuous, the preimages of closed subsets are closed; in particular, its kernel
| (8) |
is a closed linear subspace. It contains precisely the triples that satisfy the transport equation (1).
Given two regularization parameters and , we define the penalization functional
![]() |
(9) |
and, recalling from (3), also the cost functional
![]() |
(10) |
The parameters and are dimensionless. The following lemma is straightforward.
Lemma 1
The functional is Gâteaux differentiable on X. With from (2), its Gâteaux derivative at is the continuous linear functional , where and are given by
(11)
(12) Moreover, A is continuous, self-adjoint, and Γ-elliptic,
(13) Further, A induces a seminorm on X given by
(14) This seminorm is in fact a norm on , where it is equivalent to .
With the help of this lemma and standard arguments from variational calculus, one can show strict convexity and coercivity properties of the functional :
Lemma 2
The functional defined in (10) is continuous and convex on X. Moreover, it is strictly convex on Γ,
(15) , and coercive on Γ,
(16)
Our optical flow problem now reads as follows:
Definition 1
For given regularization parameters , the optical flow is the unique minimizer of the functional over Γ.
Existence of the minimizer is due to standard arguments of the calculus of variations [12], because is non-negative and proper () on Γ. Uniqueness follows from the strict convexity (15) of on Γ.
The minimizer of is equivalently characterized in terms of first order optimality conditions. By [12, Theorems 1.3–1.4 in §3.1.3], we have , where is the Gateaux derivative of at . To simplify the notation we will omit the dependence on α. Using Lemma 1, the requirement is equivalent to the variational problem
![]() |
(17) |
The fact that this variational problem is posed on the implicitly defined subspace leads to the saddle-point problem introduced in the next section.
4. Numerical solution
In order to minimize we solve the equivalent variational problem (17). The constraint is implemented using a Lagrange multiplier λ to complement (17) to a saddle-point problem: Find such that
| (18) |
4.1. Discretization
In order to discretize (18) we introduce finite dimensional subspaces and , as specified below, and consider the discrete saddle-point system: Find such that
| (19) |
With and , defined by and , , as well as , the system (19) is equivalent to
![]() |
(20) |
where is the -adjoint.
Analogously to the continuous case, we set
| (21) |
The Brezzi equivalence theorem, see [8, Satz III.4.3], states that the left-hand-side of (19) defines an isomorphism if and only if the following two conditions are fulfilled:
-
1.A is -elliptic,
(22) -
2.The discrete inf-sup constant is positive,
(23)
We shall employ a discretization for which the two rather restrictive conformity conditions
| (24) |
hold. The first, together with Γ-ellipticity (13) of A, implies -ellipticity (22) of A, and the second immediately implies the discrete inf-sup condition (23) with .
The square domain D is partitioned into non-overlapping open rectangles and/or triangles, collected in . Geometric compatibility conditions are imposed following [11, p. 51]: each edge of any geometric element is either part of the boundary ∂D or is also an edge of some other geometric element . By we mean the set of edges E of all geometric elements in (shared edges occur only once). The temporal interval is partitioned into open subintervals collected in , such that . Quantities in , such as , , g, and λ, are discretized as piecewise constants on each space–time geometric element , . The conserved quantity is discretized by continuous functions that are affine on each and have values in the space of piecewise constant functions on . The flux is discretized by assigning a flux density to each pair , such that , and interpolated linearly into the inner of each geometric element . This is trivially possible on each rectangle, and corresponds to Raviart–Thomas interpolation on triangles [8, p. 141]. It is then clear that the conformity conditions (24), and therefore (22) and (23), are satisfied.
4.2. Preconditioning
Several classes of preconditioners have been developed for saddle-point systems of the form (20), see the survey [4]. Preconditioners based on computationally efficient approximations of the inverses of and of the Schur complement are widely used. However, our is not, in general, invertible on the whole finite-dimensional space . Indeed, recall from (11) that A has the block structure
| (25) |
where , so that the first block is not positive definite on .
In [5] a similar saddle-point system for a related problem from image registration (which corresponds to in our case) was obtained, for which block-triangular preconditioners were proposed. We replace the triangular preconditioner by the symmetric and indefinite preconditioner , given by
| (26) |
see [2]. It was shown in [21] that this allows to transform the indefinite saddle-point system into a symmetric positive definite one for a new inner product (see (27) below), so that the conjugate gradient (CG) method can be applied. This is not possible for the preconditioned system of [5] where the spectrum is nonreal. Another well-known method to transform the indefinite saddle-point system into a symmetric positive definite one was proposed in [10,9]. There it is also required that be positive definite on , which is not true in our case.
It was shown in [21, Theorem 2.1] that if
| (27) |
is positive definite on then is symmetric positive definite with respect to the scalar product defined by . To that end, assume:
-
1.
and to assert that , as well as
-
2.
on , for some real constant ,
-
3.
for some real constant .
Under those assumptions, the spectrum of is positive and is contained in an interval determined by the constants and [21, Theorem 2.2], specifically, with ,
| (28) |
Importantly, in the second condition is only required to hold on , where is positive definite by (22), and not on all of .
We now specify our choice of and . For we take the block operator (25) with the first block replaced by
| (29) |
while the second and the third nonzero blocks are multiplied by two. Here, is computed to satisfy
| (30) |
for all . This entails , so that is fulfilled in the first assumption. Up to normalization, (29) is the norm of ρ, and this being the space where ρ is sought, it is a natural positive definite regularization of the indefinite block of A. The normalization factors have been chosen with the motivation that the constant can be fixed independently of T and , as long as the subintervals defined by are of comparable length. Boundedness of and -ellipticity (22) of yield for any , so that the second assumption is fulfilled with . Alternatively, after discretization, if is dense enough compared to the temporal discretization, the right hand side of (30) may be estimated by a multiple of
. This multiple yields a possible value for , taking care of the first block in the relation ; the inequality holds trivially for the other two blocks.
To obtain we exploit the fact that the composition is an isomorphism on . Indeed, boundedness is clear, while positivity is obtained from using the inf-sup condition (23): . Therefore we take for the -fold of the Riesz isomorphism on , with, say, . With this choice, the first assumption holds, and the constant in the third assumption may be taken as . In the numerical experiments below we use .
It can be seen from the factorization (26) that the application of the inverse of the preconditioner only requires the application of and (as well as and ). The application of is trivial since we work with piecewise constant basis functions. In order to apply the block-diagonal operator , it is useful to observe that due to the choice of space–time tensor product basis functions each block of has the Kronecker product form . The application of and is done by means of the matrix identity , where Vec stacks the columns of a matrix one after another into one long vector. In our Matlab implementation, we use this identity extensively and apply the direct solver to compute column-wise, row-wise, etc. This considerably speeds up the computation compared to the computation in the Vec form. Although we do not pursue this possibility here, we note that this tensor product structure allows to compute the unknown in a low rank tensor format (for instance the truncated singular value decomposition) [15,16] to reduce the memory requirements and the overall computational complexity. In the context of space–time discretization with PDE-constrained optimization this has been explored in [22].
5. Numerical examples
5.1. Robustness of the preconditioner
We investigate the robustness of the preconditioner with respect to the spatial discretization. The image domain is and the temporal interval is . A sequence of partitions for , of D is obtained by subdividing D into equal rectangles. In each case, the partition of J consists of 100 subintervals of equal length; this choice is arbitrary but does not significantly affect the following results. The input data (2) consists of two frames and , hence , as shown in Fig. 1. The parameter choices in the penalization functional (9) are and , which promotes the flux and puts a heavy penalty on the source term. We performed 20 CG iterations with the preconditioner (26) and the norm (27) as described in Section 4.2. The results are depicted in Fig. 1. In Fig. 2 (left) we report on the value of the cost functional in the course of the CG iteration, for different spatial resolutions levels k. We observe that the iteration is robust in k. In Fig. 2 (right), the convergence of the time-averaged flux over the horizontal midline (for the final CG iterate) as a function of the spatial resolution is shown. First order convergence in terms of the total number of degrees of freedom is observed.
Fig. 1.
Top: Input data for τ = 0 (left) and τ = 2 (right). Middle, left to right: The divergence of the computed flux, ∇ ⋅ j, at t ≈ 0, t ≈ 1 and t ≈ 2. For the purpose of visualization, the flux is interpolated from the edges to the midpoint of each geometric element. Bottom: The computed source term g at t = 0,1,2. Note the small scale of in accordance with the choice of . See Section 5.1.
Fig. 2.

Left: The value of the cost functional in the course of the conjugate gradient iteration. The curves for different spatial resolutions overlap. Right: First order convergence of the time-averaged flux over the horizontal midline as the spatial resolution is increased. See Section 5.1.
To further test robustness of the preconditioner, we consider the energy error , where is the i-th CG iterate and is the exact solution (approximated by ). We compute the number of CG iterations that are necessary to reduce the initial energy error by a factor of 100. The maximum over the spatial discretization levels k, for different values of the regularization parameters and , is shown in Table 1. At discretization level , the system has close to 100M degrees of freedom. We see that this number does exhibit a dependence on the regularization parameters, but stays moderate and approximately constant across the considered range.
Table 1.
Number of CG iterations to reduce the initial energy error by a factor of 100 for various choices of the regularization parameters (horizontal) and (vertical). The number shown is the maximum over the spatial discretization levels k = 0,…,7. See Section 5.1.
|
|
|||||
|---|---|---|---|---|---|
| 100 | |||||
| 102 | 13 | 11 | 10 | 9 | 5 |
| 101 | 13 | 11 | 10 | 8 | 5 |
| 100 | 13 | 11 | 10 | 8 | 5 |
| 13 | 11 | 9 | 8 | 7 | |
| 12 | 10 | 8 | 6 | 5 | |
5.2. Vienna Prater movie
In this example we apply the method to a movie showing the Ferris wheel at the Vienna Prater park turning clockwise. A vertical dark strip moving from left to right across the image has been superimposed artificially, simulating shading, see Fig. 3. The movie consists of 200 frames of pixels each. This data is mapped to the domain and the temporal interval . We look at frames 91 and 92 and zoom in on two regions highlighted in Fig. 3. The computed discrete flux between these two frames is shown in Fig. 4 for the first region, and in Fig. 5 for the second region, for different values of the regularization parameters. In both cases, there is a strong flux westward (←) across the superimposed dark strip, which moves eastwards (→). There is a less distinct flux directed north–east (↗) across the bright spokes of the Ferris wheel (in the second region). It is interesting to note that the model generates a strong, almost uniform flux j across the superimposed dark strip in the opposite direction of the movement of the strip in order to transport the bright intensity from its bow to its stern. One observes finer flow pattern within the strip away from its boundary caused by the rotation of the Ferris wheel, as the graycolor displaying in Fig. 5 suggests. On the other hand, the moving bright spokes of the Ferris wheel cause the intensities to flow across them in the same direction (as one might expect from the optical flow model). Concerning the role of the regularization parameters and , we observe in Fig. 5 meaningful results for and , which are, up to scaling, visually very similar. This is so because, roughly speaking, is decomposed into two parts that relate to each other as , and each part is captured by either or g. For we observe qualitatively different and less meaningful results, presumably because of overpenalization in the functional (10).
Fig. 3.

Two consecutive frames for τ ≈ 0.91 in the example in Section 5.2. Highlighted in white are the regions of [43,64]×[1,26] pixels (left) and [75,96]×[1,26] pixels (right). The Ferris wheel rotates clockwise and the superimposed dark vertical strip moves eastwards (→).
Fig. 4.
Computed discrete flux and source for the example in Section 5.2 in the region of [43,64]×[1,26] pixels. Top to bottom, the values of are , , and . Left: The computed discrete flux j with the background color showing the divergence ∇ ⋅ j. Right: The computed source g.
Fig. 5.
Computed discrete flux and source for the example in Section 5.2 in the region of [75,96]×[1,26] pixels. Top to bottom, the values of are , , and . Left: The computed discrete flux j with the background color showing the divergence ∇ ⋅ j. Right: The computed source g.
6. Conclusions
We have considered a version of the optical flow equations in which the image brightness evolves as a conserved quantity up to possible sources (or sinks). We have formulated the problem of estimating the optical flow and the source as an energy minimization problem. We have investigated a space–time discretization and preconditioning strategy for the resulting saddle-point equations. The discretization was shown to be stable in the Galerkin sense, and the preconditioner to be robust in the discretization resolution albeit with a mild dependence on the regularization parameters. The conjugate gradient method (with a suitable scalar product for which the preconditioned system matrix is symmetric and positive definite) allows to solve the complete space–time problem within a few iterations. The transport equation model with the chosen penalization functional produces rather global flows; we do not expect this to happen if the “kinetic energy” is penalized instead of the divergence of the flux j and wish to investigate this type of penalization next. We note, however, that our model is typical for control problems with a quadratic cost functional subject to a linear time-dependent PDE constraint, and we therefore expect the results to be applicable elsewhere.
Acknowledgements
OS and WZ were supported by the Austrian Science Fund (FWF) within the NFN Geometry and Simulation, projects S11702 and S11704. OS was also supported by the project Modeling Visual Attention as a Key Factor in Visual Recognition and Quality of Experience funded by the Vienna Science and Technology Fund – WWTF, grant CS11-009. The Vienna Prater movie was provided by Ch. Valuch, Cognitive Science Research Platform, Cognitive Psychology, University of Vienna, and preprocessed by A. Patrone, University of Vienna.
Contributor Information
R. Andreev, Email: roman.andreev@ricam.oeaw.ac.at.
O. Scherzer, Email: otmar.scherzer@univie.ac.at.
W. Zulehner, Email: zulehner@numa.uni-linz.ac.at.
References
- 1.Aubert G., Deriche R., Kornprobst P. Computing optical flow via variational techniques. SIAM J. Appl. Math. 2000;60(1):156–182. [Google Scholar]
- 2.Bank R.E., Welfert B.D., Yserentant H. A class of iterative methods for solving saddle point problems. Numer. Math. 1990;56(7):645–666. [Google Scholar]
- 3.Beauchemin S.S., Barron J.L. The computation of optical flow. ACM Comput. Surv. 1995;27(3):433–466. [Google Scholar]
- 4.Benzi M., Golub G.H., Liesen J. Numerical solution of saddle point problems. Acta Numer. 2005;14:1–137. [Google Scholar]
- 5.Benzi M., Haber E., Taralli L. A preconditioning technique for a class of PDE-constrained optimization problems. Adv. Comput. Math. 2011;35(2–4):149–173. [Google Scholar]
- 6.Black M.J., Anandan P. The robust estimation of multiple motions: parametric and piecewise-smooth flow fields. Comput. Vis. Image Underst. 1996;63:75–104. [Google Scholar]
- 7.Borzi A., Ito K., Kunisch K. Optimal control formulation for determining optical flow. SIAM J. Sci. Comput. 2002;24(3):818–847. [Google Scholar]
- 8.Braess D. 4th ed. Springer; 2007. Finite Elemente. [Google Scholar]
- 9.Bramble J.H., Pasciak J.E. Corrigenda: “A preconditioning technique for indefinite systems resulting from mixed approximations of elliptic problems”. Math. Comput. 1988;51(183):387–388. [Google Scholar]
- 10.Bramble J.H., Pasciak J.E. A preconditioning technique for indefinite systems resulting from mixed approximations of elliptic problems. Math. Comput. 1988;50(181):1–17. [Google Scholar]
- 11.Ciarlet P.G. North-Holland; 1978. The Finite Element Method for Elliptic Problems. [Google Scholar]
- 12.Dacorogna B. Springer; 1989. Direct Methods in the Calculus of Variations. [Google Scholar]
- 13.Del Bimbo A., Nesi P., Sanz J.L.C. Analysis of optical flow constraints. IEEE Trans. Image Process. 1995;4(4):460–469. doi: 10.1109/83.370674. [DOI] [PubMed] [Google Scholar]
- 14.Fleet D.J., Weiss Y. Optical flow estimation. In: Paragios N., Chen Y., Faugeras O.D., editors. Handbook of Mathematical Models in Computer Vision. Springer; 2006. chap. 15. [Google Scholar]
- 15.Grasedyck L., Kressner D., Tobler C. A literature survey of low-rank tensor approximation techniques. GAMM-Mitt. 2013;36(1):53–78. [Google Scholar]
- 16.Hackbusch W. Numerical tensor calculus. Acta Numer. 2014;23:651–742. [Google Scholar]
- 17.Haussecker H.W., Fleet D.J. Computing optical flow with physical models of brightness variation. IEEE Trans. Pattern Anal. 2001;23(6):661–673. [Google Scholar]
- 18.Horn B.K.P., Schunck B.G. Determining optical flow. Artif. Intell. 1981;17:185–203. [Google Scholar]
- 19.Lucas B.D., Kanade T. Proceedings of the 7th International Joint Conference on Artificial Intelligence. vol. 2. Morgan Kaufmann Publishers Inc.; San Francisco, CA, USA: 1981. An iterative image registration technique with an application to stereo vision; pp. 674–679. [Google Scholar]
- 20.Nagel N.-H., Enkelmann W. An investigation of smoothness constraints for the estimation of displacement vector fields from image sequences. IEEE Trans. Pattern Anal. 1986;8:565–593. doi: 10.1109/tpami.1986.4767833. [DOI] [PubMed] [Google Scholar]
- 21.Schöberl J., Zulehner W. Symmetric indefinite preconditioners for saddle point problems with applications to PDE-constrained optimization problems. SIAM J. Matrix Anal. Appl. 2007;29(3):752–773. (electronic) [Google Scholar]
- 22.Stoll M., Breiten T. A low-rank in time approach to PDE-constrained optimization. SIAM J. Sci. Comput. 2015;37(1):B1–B29. [Google Scholar]
- 23.Weickert J., Schnörr C. Variational optic flow computation with a spatio-temporal smoothness constraint. J. Math. Imaging Vis. 2001;14(3):245–255. [Google Scholar]
- 24.Wildes R.P., Amabile M.J., Lanzillotto A.-M., Leu T.-S. Recovering estimates of fluid flow from image sequence data. Comput. Vis. Image Underst. 2000;80(2):246–266. [Google Scholar]
- 25.Yosida K. Springer; 1980. Functional Analysis. [Google Scholar]








