### 2.1. Description of experimental data

A new version of the X-band radar described in [4] was used. The radar transmits rectangular 10 kW peak power pulses (400 ns duration) at a frequency of 9.41 GHz, through a parabolic antenna with 3.6° beamwidth and 34 dB maximum gain. A maximum coverage of 30 km can be reached with an angular resolution of about 3° and a range resolution equal to 120 m.

Received power related to meteorological echoes within each single radar volume bin is converted into the averaged reflectivity inside that volume. Two dimensional (2D) maps of reflectivity (*Z* in mm^{6}m^{-3}) are provided as output to the pre-processing stage with a sampling interval of 1 min. Radar reflectivity *Z* was converted into rainfall rate *R* (measured in mm/h), using the Marshall and Palmer *Z*-*R* relation [21]

where *A* and *b* are parameters that can be estimated by fitting experimental data from rain gauges placed on the area investigated by the radar. In this study, radar reflectivity data were converted into rainfall rates using the relation introduced in [22], fitting data of 7 years recorded in central Europe:

### 2.2. Mathematical model

Different radar images of rainfall rate can be compared to identify rainy clouds formation, growing or propagation. Radar maps (within the considered time window) are modelled by the following equation

\frac{\partial I\left(x,y,t\right)}{\partial t}+\stackrel{\u20d7}{v}\left(x,y\right)\cdot \nabla I\left(x,y,t\right)=F\left(x,y\right)

(3)

where *I*(*x, y, t*) is the intensity of the image as a function of the spatial coordinates (*x, y*) and time *t* (representing the radar reflectivity *Z*), \stackrel{\u20d7}{v}\left(x,y\right)=\left({v}_{1}\left(x,y\right),\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}{v}_{2}\left(x,y\right)\right) is the velocity flow and *F*(*x, y*) is a production term (which describes generation if positive, depletion if negative). The left hand side of Equation 3 is the total time derivative along the path of a propagating object of the image, that during its propagation may also vary its amplitude as an effect of the production term *F*(*x, y*). This model is quite general, but is based on assumptions which are not physical. For example, the distribution of clouds is 3D, whereas our model is 2D. Thus, the merging, intersection or growing of the available images of clouds could be the result of a complicated 3D motion. Thus, caution is needed in the interpretation of results.

In practice, both space and time variables are sampled. Thus, differential operators in Equation 3 are estimated within some approximation from sampled images. Velocity flow and production term are assumed to be constant in the considered time window, which is sampled by *N* radar images.

When neglecting the production term, Equation 3 describes only flow. Such a model was applied to investigate different moving objects, for example to track images within the scenes from a television signal [23].

It is not possible to solve directly optical flow problems from two images, as two unknowns (the two components of the velocity flow) are to be estimated from one equation (aperture problem [24]). In the case of problem (3), the production term is a further unknown. Moreover, the production term could account for any time evolution of the image *I*(*x, y, t*) without including any flow \stackrel{\u20d7}{v}\left(x,y\right), leading to the trivial solution

F=\frac{\partial I}{\partial t}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\stackrel{\u20d7}{v}=0.

(4)

This problem is avoided when more than two images are included, assuming that both the velocity field and the production term are constant for all the *N* frames in the time window under consideration. This imposes that the motion of objects in different images is accounted for by the velocity field \stackrel{\u20d7}{v}\left(x,y\right) and the appearing, growth, depletion or extinction of objects determine the production term *F*(*x, y*).

### 2.3. Numerical implementation

The simplifying assumptions of the model and the random noise included in the experimental data impose that Equation 3 can apply only within some approximations. For this reason, it is not expected that the parameters of the model (i.e., \stackrel{\u20d7}{v}\left(x,y\right) and *F*(*x, y*)) can be estimated exactly, but only minimising the error with respect to the data. Given *N* images, the velocity field \stackrel{\u20d7}{v}\left(x,y\right) and the production term *F*(*x, y*) can be estimated optimally by solving the following mean square error problem

\left[\stackrel{\u20d7}{v},F\right]=\underset{\stackrel{\u20d7}{w},f}{argmin}\sum _{i=1}^{N-1}\sum _{j=i+1}^{min\left(N,i+3\right)}{\u2225{I}_{t}^{ij}+\stackrel{\u20d7}{w}\cdot \nabla {I}^{ij}-f\u2225}_{2}^{2}

(5)

where {\u2225\cdot \u2225}_{2}^{2} indicates the square of the norm of the space of square-integrable functions *L*^{2}, {I}_{t}^{ij}=\frac{{I}^{i}-{I}^{j}}{\left(i-j\right)\mathsf{\text{d}}t} the discrete version of the time derivative, with *I*^{i} indicating the *i* th reflectivity map and d*t* the time sampling interval, *I*^{ij} the radar map at the time sample \frac{i+j}{2}\mathsf{\text{d}}t (the mean of the two closest maps was used when \frac{i+j}{2} was not an integer number), and ∇*I*^{ij} the gradient of *I*^{ij} (estimated with a second order finite difference approximation). It is worth noticing that in Equation 5 all pairs of maps were considered with maximal distance equal to 3. Including more maps lowers the effect of noise. On the other hand, when considering maps with increasing delay, the finite difference approximation of model (3) is affected by an increasing error. For this reason, it is better to limit the time range of map pairs included in (5) (or, as an alternative, it is also possible to penalize the terms in the sum as a function of the delay between maps). Depending on the application and on the sampling frequency, the optimal maximal delay between maps should be properly chosen.

When time evolutions of the velocity field and of the production term are of interest, their estimation can be performed for a set of sliding time windows. Time evolutions are expected to be smooth, as the velocity field and the production term are computed assuming that they are constant for all the *N* maps in the considered time window.

In optical flow techniques, to avoid the aperture problem, the velocity field is also constrained to be smooth in space [11, 12]. This condition can be imposed either locally (requiring the flow to be constant in the neighbouring pixels of the considered one, Lucas and Kanede method [11]) or introducing global constraints of smoothness (Horn-Schunck method [12]).

### 2.4. Estimation of flow and production

In optical flow problems, in which the production term is not included, the brightness constancy condition together with spatial constraints are sufficient to estimate the flow even from two images. Such a flow was proven to reside in a low-dimensional linear space. Constraining it to have the correct low number of degrees of freedom, noise content in the data can be reduced and a robust estimation of the flow can be obtained [13]. Two methods for the estimation of optical flow from a multi-frame analysis were recently introduced in [14] and compared to the technique proposed in [13]. The smoothness constraint was imposed locally (in line with Lucas-Kanede approach). Performances improved as the number of processed images increased. The two methods were superior to that in [13] both in terms of computational cost and precision. The most precise method was based on the incremental difference approach, in which adjacent frames are used to estimate time derivatives, in line with Equation 5.

Both Lucas-Kanede [11] and Horn-Schunck approaches [12] are here generalized to impose that the estimated velocity field and production term are smooth in space.

#### 2.4.1. Lucas-Kanede approach

Within Lucas-Kanede framework, for each pixel of the image, the same equation was written for the *M* neighbouring pixels of the considered one. A Gaussian weighting factor (with standard deviation equal to 2\sqrt{2} pixels) was assigned to such conditions, to give more prominence to the central pixel and lower importance to more distant ones. For each pixel, the flow and the production terms were estimated in order to satisfy these multiple conditions optimally in the least square sense. Specifically, the following linear system was defined

AX\phantom{\rule{0.3em}{0ex}}=\phantom{\rule{0.3em}{0ex}}b\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}X=\phantom{\rule{0.3em}{0ex}}\left[\begin{array}{c}{v}_{1}\\ {v}_{2}\\ F\end{array}\right]

(6)

with the following definitions of the matrix *A* and of the vector *b*

\begin{array}{c}{A}_{s}=\left[\begin{array}{c}{w}_{1}{I}_{x}^{s}\left({p}_{1}\right)\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}{w}_{1}{I}_{y}^{s}\left({p}_{1}\right)\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}-{w}_{1}\\ \phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\vdots \phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\vdots \phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\vdots \\ {w}_{M}{I}_{x}^{s}\left({p}_{M}\right)\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}{w}_{M}{I}_{y}^{s}\left({p}_{M}\right)\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}-{w}_{M}\end{array}\right]\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}A=\left[\begin{array}{c}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}{A}_{1}\\ \phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\vdots \\ {A}_{3\left(N-2\right)}\end{array}\right]\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\\ \phantom{\rule{0.3em}{0ex}}{b}_{s}=\left[\begin{array}{c}{w}_{1}{I}_{t}^{s}\left({p}_{1}\right)\\ \phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\vdots \phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\\ {w}_{M}{I}_{t}^{s}\left({p}_{M}\right)\end{array}\right]\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}b=\left[\begin{array}{c}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}{b}_{1}\\ \phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\vdots \phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\phantom{\rule{0.3em}{0ex}}\\ {b}_{3\left(N-2\right)}\end{array}\right]\end{array}

(7)

where *p*_{1},...,*p*_{
M
} is the set of neighbours of the considered point, *w*_{1},..., *w*_{
M
} are the weights and *s* labels each of the 3(*N*-2) pairs of maps (indicated by *ij* in Equation 5). In this article, 25 neighbours of each point were considered (*M* = 25). Hence, for points located far from the boundary, the neighbours were located in a square with side 5, in line with [14]. The system (6) is over-determined. The unknown vector *X* was estimated optimally in the least square sense by pseudoinversion (which provides a close analytical solution to the problem).

#### 2.4.2. Horn-Schunck approach

Following the Horn-Schunck method [12], the smoothness constraint is introduced by adding the energy norm of the gradients of the velocity flow and of the production term as regularization components in Equation 3. Other constraints can be included, in order to introduce *a-priori* knowledge on the solution. For each map pair considered in Equation 5 (here labelled with *s*), the following functional to be minimized was considered

{J}_{s}\left(\stackrel{\u20d7}{v},F\right)={\u2225{I}_{t}^{s}+\stackrel{\u20d7}{v}\cdot \nabla {I}^{s}-F\u2225}_{2}^{2}+{\alpha}^{2}\left({\u2225\nabla \stackrel{\u20d7}{v}\u2225}_{2}^{2}+{\u2225\nabla F\u2225}_{2}^{2}\right)+{\beta}^{2}{\u2225F\stackrel{\u20d7}{v}\u2225}_{2}^{2}+{\gamma}^{2}{\u2225F\u2225}_{2}^{2}+{\delta}^{2}{\u2225\stackrel{\u20d7}{v}\u2225}_{2}^{2}

(8)

where {\alpha}^{2}{\u2225\nabla \stackrel{\u20d7}{v}\u2225}_{2}^{2} is the Horn-Schunck smoothness constraint, {\alpha}^{2}{\u2225\nabla F\u2225}_{2}^{2} is an equivalent constraint for the production term, {\beta}^{2}{\u2225F\stackrel{\u20d7}{v}\u2225}_{2}^{2} reduces the correlation between flow and production term (to force production and propagation terms to be present in different regions), {\gamma}^{2}{\u2225F\u2225}_{2}^{2} and {\delta}^{2}{\u2225\stackrel{\u20d7}{v}\u2225}_{2}^{2} limit the amplitude of the two unknowns (Tikhonov regularization, [25]), in order that they do not become large to follow noise details.

The functional (8) can be minimized by solving the associated Euler-Lagrange equations [26]

\left\{\begin{array}{c}\hfill \left({I}_{t}^{s}+\stackrel{\u20d7}{v}\cdot \nabla {I}^{s}-F\right){I}_{x}^{s}-{\alpha}^{2}\Delta {v}_{1}+{\beta}^{2}{F}^{2}{v}_{1}+{\delta}^{2}{v}_{1}=0\hfill \\ \hfill \left({I}_{t}^{s}+\stackrel{\u20d7}{v}\cdot \nabla {I}^{s}-F\right){I}_{y}^{s}-{\alpha}^{2}\Delta {v}_{2}+{\beta}^{2}{F}^{2}{v}_{2}+{\delta}^{2}{v}_{2}=0\hfill \\ \hfill -\left({I}_{t}^{s}+\stackrel{\u20d7}{v}\cdot \nabla {I}^{s}-F\right)-{\alpha}^{2}\Delta F+{\beta}^{2}F\left({v}_{1}^{2}+{v}_{2}^{2}\right)+{\gamma}^{2}F=0\hfill \end{array}\right.

(9)

where Δ indicates the Laplacian operator. As proposed in [12], an iterative technique (Jacobi's method) was applied to solve the system of equations (9). The nonlinear terms *F*^{2}*v*_{1}, *F*^{2}*v*_{2}, and F\left({v}_{1}^{2}+{v}_{2}^{2}\right) were estimated from the previous step in the iteration. The Laplacian was expressed as

\Delta U=\overline{U}-U

(10)

where \overline{U} is an average value estimated from the previous step in the iteration. As time is sampled, Equations 9 were written for each pair of maps considered to estimate the time derivative (refer to Equation 5). The following linear system of equations was obtained for the *n* th step of the iteration, for each pair of maps

\left[\begin{array}{ccc}{\left({I}_{x}^{s}\right)}^{2}+{\alpha}^{2}+{\delta}^{2}& {I}_{x}^{s}{I}_{y}^{s}& -{I}_{x}^{s}\\ {I}_{x}^{s}{I}_{y}^{s}& {\left({I}_{y}^{s}\right)}^{2}+{\alpha}^{2}+{\delta}^{2}& -{I}_{y}^{s}\\ -{I}_{x}^{s}& -{I}_{y}^{s}& 1+{\alpha}^{2}+{\gamma}^{2}\end{array}\right]\left[\begin{array}{c}{v}_{1}^{n}\\ {v}_{2}^{n}\\ {F}^{n}\end{array}\right]=\left[\begin{array}{c}-{I}_{t}^{s}{I}_{x}^{s}+{\alpha}^{2}{\overline{v}}_{1}^{n-1}-{\beta}^{2}{({F}^{n-1})}^{2}{v}_{1}^{n-1}\\ -{I}_{t}^{s}{I}_{y}^{s}+{\alpha}^{2}{\overline{v}}_{2}^{n-1}-{\beta}^{2}{({F}^{n-1})}^{2}{v}_{2}^{n-1}\\ {I}_{t}^{s}+{\alpha}^{2}{\overline{F}}^{n-1}-{\beta}^{2}{F}^{n-1}({({v}_{1}^{n-1})}^{2}+{({v}_{2}^{n-1})}^{2})\end{array}\right].

(11)

An estimation of the unknowns optimal in the least square sense was obtained by pseudoinverting the rectangular matrix containing the conditions (11) for each considered pair of maps. In order to facilitate convergence to smooth solutions, the flow and the production term estimated at each step of iteration were convolved with the Gaussian mask

\frac{1}{16}\left[\begin{array}{ccc}\hfill 1\hfill & \hfill 2\hfill & \hfill 1\hfill \\ \hfill 2\hfill & \hfill 4\hfill & \hfill 2\hfill \\ \hfill 1\hfill & \hfill 2\hfill & \hfill 1\hfill \end{array}\right].

(12)

The following expressions were chosen for the parameters in Equation 8

\begin{array}{cc}\hfill \alpha =0.25\phantom{\rule{0.3em}{0ex}}exp\left(-\frac{n}{5}\right)\mathsf{\text{rms}}\left(\nabla I\right)\hfill & \hfill \beta =0.1\phantom{\rule{0.3em}{0ex}}exp\left(-\frac{n}{5}\right)\mathsf{\text{rms}}\left({\stackrel{\u20d7}{v}}^{n-1}\right)\hfill \\ \hfill \gamma =0.1\phantom{\rule{0.3em}{0ex}}exp\left(-\frac{n}{5}\right)\mathsf{\text{rms}}\left(\nabla I\right)\hfill & \hfill \phantom{\rule{0.3em}{0ex}}\delta =0.1\phantom{\rule{0.3em}{0ex}}exp\left(-\frac{n}{5}\right)\mathsf{\text{rms}}\left(\nabla I\right)\hfill \end{array}

(13)

where *n* is the number of iteration, rms(∇*I*) is the average root mean square (RMS) of the gradients of the images and \mathsf{\text{rms}}\left({\stackrel{\u20d7}{v}}^{n-1}\right) is the RMS of the vector flow estimated in the previous step of the iteration. As the iterations proceed, the values of the parameters decrease giving more importance to the fitting of data.

The fit of the model to the data was measured by the RMS error of the model with respect to the data normalized with respect to the norm of the data itself. The RMS error was defined considering the entire map pairs included, as follows

\mathsf{\text{RMS}}=\frac{\sum _{i=1}^{N-1}\sum _{j=i+1}^{min\left(N,i+3\right)}{\u2225{I}_{t}^{ij}+\stackrel{\u20d7}{v}\cdot \nabla {I}^{ij}-F\u2225}_{2}}{\sum _{i=1}^{N-1}\sum _{j=i+1}^{min\left(N,i+3\right)}{\u2225{I}^{ij}\u2225}_{2}}.

(14)

The algorithm proceeded as long as such an RMS error decreased. When the RMS error increased with respect to the previous step in the iteration, the algorithm was stopped and the estimated flow and production term at the previous step (i.e., the ones for which the RMS was minimum) were considered.