Skip to main content

Advertisement

Log in

FALDOI: A New Minimization Strategy for Large Displacement Variational Optical Flow

  • Published:
Journal of Mathematical Imaging and Vision Aims and scope Submit manuscript

Abstract

We propose a large displacement optical flow method that introduces a new strategy to compute a good local minimum of any optical flow energy functional. The method requires a given set of discrete matches, which can be extremely sparse, and an energy functional which locally guides the interpolation from those matches. In particular, the matches are used to guide a structured coordinate descent of the energy functional around these keypoints. It results in a two-step minimization method at the finest scale which is very robust to the inevitable outliers of the sparse matcher and able to capture large displacements of small objects. Its benefits over other variational methods that also rely on a set of sparse matches are its robustness against very few matches, high levels of noise, and outliers. We validate our proposal using several optical flow variational models. The results consistently outperform the coarse-to-fine approaches and achieve good qualitative and quantitative performance on the standard optical flow benchmarks.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

References

  1. Alvarez, L., Deriche, R., Papadopoulo, T., Sánchez, J.: Symmetrical dense optical flow estimation with occlusions detection. In: European Conference on Computer Vision, pp. 721–735 (2002)

  2. Alvarez, L., Weickert, J., Sánchez, J.: Reliable estimation of dense optical flow fields with large displacements. Int. J. Comput. Vis. 39(1), 41–56 (2000)

    Article  MATH  Google Scholar 

  3. Ayvaci, A., Raptis, M., Soatto, S.: Sparse occlusion detection with optical flow. Int. J. Comput. Vis. 97(3), 322–338 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  4. Bailer, C., Taetz, B., Stricker, D.: Flow fields: Dense correspondence fields for highly accurate large displacement optical flow estimation. In: Proceedings of the IEEE International Conference on Computer Vision, pp. 4015–4023 (2015)

  5. Baker, S., Scharstein, D., Lewis, J.P., Roth, S., Black, M.J., Szeliski, R.: A database and evaluation methodology for optical flow. Int. J. Comput. Vis. 92(1), 1–31 (2011)

    Article  Google Scholar 

  6. Ballester, C., Garrido, L., Lazcano, V., Caselles, V.: A TV-L1 Optical Flow Method with Occlusion Detection. Lectures Notes in Computer Science, vol. 7476, p. 3140 (2012)

  7. Bao, L., Yang, Q., Jin, H.: Fast edge-preserving patchmatch for large displacement optical flow. IEEE Trans. Image Process. 23(12), 4996–5006 (2014)

    Article  MathSciNet  Google Scholar 

  8. Black, M.J., Anandan, P.: The robust estimation of multiple motions: parametric and piecewise-smooth flow fields. Comput. Vis. Image Underst. 63(1), 75–104 (1996)

    Article  Google Scholar 

  9. Brox, T., Bruhn, A., Papenberg, N., Weickert, J.: High accuracy optical flow estimation based on a theory for warping. Eur. Conf. Comput. Vis. 3024, 25–36 (2004)

    MATH  Google Scholar 

  10. Brox, T., Malik, J.: Large displacement optical flow: descriptor matching in variational motion estimation. IEEE Trans. Pattern Anal. Mach. Intell. 33(3), 500–513 (2011)

    Article  Google Scholar 

  11. Buades, A., Facciolo, G.: Reliable multi-scale and multi-window stereo matching. SIAM J. Imaging Sci. 8(2), 888–915 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  12. Butler, D.J., Wulff, J., Stanley, G.B., Black, M.J.: A naturalistic open source movie for optical flow evaluation. In: European Conference on Computer Vision, pp. 611–625 (2012)

  13. Chambolle, A., Pock, T.: A first-order primal-dual algorithm for convex problems with applications to imaging. J. Math. Imaging Vis. 40(1), 120–145 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  14. Chen, Z., Jin, H., Lin, Z., Cohen, S., Wu, Y.: Large displacement optical flow from nearest neighbor fields. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 2443–2450 (2013)

  15. Dalal, N., Triggs, B.: Histograms of oriented gradients for human detection. In: IEEE Conference on Computer Vision and Pattern Recognition, vol. 1, pp. 886–893 (2005)

  16. Demetz, O., Hafner, D., Weickert, J.: Morphologically invariant matching of structures with the complete rank transform. Int. J. Comput. Vis. 113(3), 220–232 (2015)

    Article  MathSciNet  Google Scholar 

  17. Dollár, P., Zitnick, C.L.: Structured forests for fast edge detection. In: IEEE International Conference on Computer Vision (ICCV), pp. 1841–1848 (2013)

  18. Fortun, D., Bouthemy, P., Kervrann, C.: Aggregation of local parametric candidates with exemplar-based occlusion handling for optical flow. Comput. Vis. Image Underst. 145, 81–94 (2016)

    Article  MATH  Google Scholar 

  19. Friedman, J., Hastie, T., Hfling, H., Tibshirani, R.: Pathwise coordinate optimization. Technical Report, Annals of Applied Statistics (2007)

  20. Gadot, D., Wolf, L.: Patchbatch: a batch augmented loss for optical flow. CoRR abs/1512.01815 (2015). http://arxiv.org/abs/1512.01815

  21. Geiger, A., Lenz, P., Urtasun, R.: Are we ready for autonomous driving? The KITTI vision benchmark suite. In: Conference on Computer Vision and Pattern Recognition (CVPR) (2012)

  22. Gilboa, G., Osher, S.: Nonlocal operators with applications to image processing. Multiscale Model. Simul. 7(3), 1005–1028 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  23. Hafner, D., Demetz, O., Weickert, J.: Why is the census transform good for robust optic flow computation? In: Scale-Space and Variational Methods in Computer Vision, pp. 210–221 (2013)

  24. Horn, B.K.P., Schunck, B.G.: Determining optical flow. Artif Intell 17, 185–203 (1981)

    Article  Google Scholar 

  25. Hu, Y., Song, R., Li, Y.: Efficient coarse-to-fine patchmatch for large displacement optical flow. In: The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2016)

  26. Kannala, J., Brandt, S.: Quasi-dense wide baseline matching using match propagation. In: Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, pp. 1–8 (2007)

  27. Kennedy, R., Taylor, C.J.: Optical flow with geometric occlusion estimation and fusion of multiple frames. In: Energy Minimization Methods in Computer Vision and Pattern Recognition, pp. 364–377 (2015)

  28. Krähenbühl, P., Koltun, V.: Efficient nonlocal regularization for optical flow. In: European Conference on Computer Vision (ECCV), pp. 356–369 (2012)

  29. Leordeanu, M., Sukthankar, R., Sminchisescu, C.: Efficient closed-form solution to generalized boundary detection. In: European Conference on Computer Vision (ECCV), pp. 516–529 (2012)

  30. Leordeanu, M., Zanfir, A., Sminchisescu, C.: Locally affine sparse-to-dense matching for motion and occlusion estimation. In: IEEE International Conference on Computer Vision, pp. 1721–1728 (2013)

  31. Lhuillier, M., Quan, L.: Match propagation for image-based modeling and rendering. IEEE Trans. Pattern Anal. Mach. Intell. 24(8), 1140–1146 (2002)

    Article  Google Scholar 

  32. Li, Y., Osher, S.: A new median formula with applications to PDE based denoising. Commun. Math. Sci. 7(3), 741–753 (2009). http://projecteuclid.org/euclid.cms/1256562821

  33. Lowe, D.G.: Object recognition from local scale-invariant features. In: Proceedings of the International Conference on Computer Vision (1999)

  34. Menze, M., Geiger, A.: Object scene flow for autonomous vehicles. In: Conference on Computer Vision and Pattern Recognition (CVPR) (2015)

  35. Menze, M., Heipke, C., Geiger, A.: Discrete optimization for optical flow. In: Pattern Recognition, pp. 16–28 (2015)

  36. Mikolajczyk, K., Tuytelaars, T., Schmid, C., Zisserman, A., Matas, J., Kadir, S.F., Van Goo, T.: An algorithm for total variation minimization and applications. Int. J. Comput. Vis. 65(1–2), 43–72 (2005)

    Article  Google Scholar 

  37. Müller, T., Rabe, C., Rannacher, J., Franke, U., Mester, R.: Illumination-robust dense optical flow using census signatures. In: Proceedings of the DAGM Conference on Pattern Recognition, pp. 236–245 (2011)

  38. Nagel, H.H., Enkelmann, W.: An investigation of smoothness constraints for the estimation of displacement vector fields from image sequences. IEEE Trans. Pattern Anal. Mach. Intell. 8(5), 565–593 (1986)

    Article  Google Scholar 

  39. Nesterov, Y.: Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM J. Optim. 22(2), 341–362 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  40. Papenberg, N., Bruhn, A., Brox, T., Didas, S., Weickert, J.: Highly accurate optic flow computation with theoretically justified warping. Int. J. Comput. Vis. 67(2), 141–158 (2006)

    Article  Google Scholar 

  41. Palomares, R.P., Haro, G., Ballester, C.: A rotation-invariant regularization term for optical flow related problems. In: Computer Vision–ACCV, pp. 304–319. Springer (2014)

  42. Ranftl, R., Bredies, K., Pock, T.: Non-local total generalized variation for optical flow estimation. Comput. Vis. ECCV 2014, 439–454 (2014)

    Google Scholar 

  43. Revaud, J., Weinzaepfel, P., Harchaoui, Z., Schmid, C.: EpicFlow: Edge-preserving interpolation of correspondences for optical flow. In: Computer Vision and Pattern Recognition (2015)

  44. Rey Otero, I., Delbracio, M.: Anatomy of the SIFT Method. Image Process On Line 4, 370–396 (2014). doi:10.5201/ipol.2014.82

    Article  Google Scholar 

  45. Sánchez, J., Salgado, A., Monzón, N.: Preserving accurate motion contours with reliable parameter selection. In: IEEE International Conference on Image Processing (ICIP), pp. 209–213 (2014)

  46. Stein, F.: Efficient computation of optical flow using the census transform. In: DGAM, pp. 79–86 (2004)

  47. Steinbrücker, F., Pock, T., Cremers, D.: Advanced data terms for variational optic flow estimation. In: Proceedings of Vision, Modeling and Visualization (2009)

  48. Steinbrücker, F., Pock, T., Cremers, D.: Large displacement optical flow computation without warping. In: International Conference on Computer Vision, pp. 1609–1614 (2009)

  49. Stoll, M., Volz, S., Bruhn, A.: Adaptive integration of feature matches into variational optical flow methods. In: Lee, K.M., Matsushita, Y., Rehg, J.M., Hu, Z. (eds.) Computer Vision-ACCV 2012: 11th Asian Conference on Computer Vision, Part III, Revised Selected Papers, pp. 1–14 (2013)

  50. Strekalovskiy, E., Chambolle, A., Cremers, D.: Convex relaxation of vectorial problems with coupled regularization. SIAM J. Imaging Sci. 7(1), 294–336 (2014)

  51. Sun, D., Roth, S., Black, M.J.: Secrets of optical flow estimation and their principles. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 2432–2439 (2010)

  52. Sun, D., Roth, S., Black, M.J.: A quantitative analysis of current practices in optical flow estimation and the principles behind them. Int. J. Comput. Vis. 106(2), 115–137 (2014)

    Article  Google Scholar 

  53. Timofte, R., Van Gool, L.: Sparse flow: Sparse matching for small to large displacement optical flow. In: IEEE Winter Conference on Applications of Computer Vision (WACV), pp. 1100–1106 (2015)

  54. Vogel, C., Roth, S., Schindler, K.: An evaluation of data costs for optical flow. In: Pattern recognition, pp. 343–353 (2013)

  55. Weinzaepfel, P., Revaud, J., Harchaoui, Z., Schmid, C.: DeepFlow: large displacement optical flow with deep matching. In: International Conference on Computer Vision (2013)

  56. Werlberger, M., Pock, T., Bischof, H.: Motion estimation with non-local total variation regularization. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 2464–2471 (2010)

  57. Werlberger, M., Trobin, W., Pock, T., Wedel, A., Cremers, D., Bischof, H.: Anisotropic huber-l1 optical flow. In: BMVC, vol. 1, no. 2, p. 3 (2009)

  58. Xu, L., Jia, J., Matsushita, Y.: Motion detail preserving optical flow estimation. IEEE Trans. Pattern Anal. Mach. Intell. 34(9), 1744–1757 (2012)

    Article  Google Scholar 

  59. Yang, J., Li, H.: Dense, accurate optical flow estimation with piecewise parametric model. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1019–1027 (2015)

  60. Yoon, K.J., Kweon, I.S.: Adaptive support-weight approach for correspondence search. IEEE Trans. Pattern Anal. Mach. Intell. 28(4), 650–656 (2006)

    Article  Google Scholar 

  61. Zabih, R., Woodfill, J.: Non-parametric local transforms for computing visual correspondence. In: European Conference on Computer Vision (ECCV), pp. 151–158 (1994)

  62. Zach, C., Pock, T., Bischof, H.: A duality based approach for realtime TV-L 1 optical flow. In: Proceedings of the 29th DAGM Conference on Pattern Recognition, pp. 214–223 (2007)

  63. Zimmer, H., Bruhn, A., Weickert, J.: Optic flow in harmony. Int. J. Comput. Vis. 93(3), 368–388 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  64. Zimmer, H., Bruhn, A., Weickert, J., Valgaerts, L., Salgado, A., Rosenhahn, B., Seidel, H.P.: Complementary optic flow. In: Cremers, D., Boykov, Y., Blake, A., Schmidt, F.R. (eds.) Energy Minimization Methods in Computer Vision and Pattern Recognition, pp. 207–220. Springer Berlin Heidelberg (2009)

Download references

Acknowledgements

The authors would like to thank Gabriele Facciolo for all the discussions with him about the subject of this paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Roberto P. Palomares.

Additional information

The first, second, and third authors acknowledge partial support by MICINN project, reference MTM2012-30772, by TIN2015-70410-C2-1-R (MINECO/FEDER, UE) and by GRC reference 2014 SGR 1301, Generalitat de Catalunya, and the fourth author by the European Research Council (advanced Grant Twelve Labours), Office of Naval research (ONR Grant N00014-14-1-0023).

Appendices

Appendix 1: Minimizing the Energy

The numerical minimization algorithm for the general energy (1) is obtained in this paper by decoupling both terms. We linearize the image \(I_{t+1}\) near a given optical flow \(\mathbf {u}_0=(u_{0,1},u_{0,2})\) and make the following approximation \(I_{t+1}(\mathbf {x}+\mathbf {u}(x)) \approx I^{lin}_{t+1}(\mathbf {x}+\mathbf {u}(\mathbf {x}))\), where

$$\begin{aligned} I^{lin}_{t+1}(\mathbf {x}+\mathbf {u}(\mathbf {x}))= & {} I_{t+1}(\mathbf {x}+\mathbf {u}_0(\mathbf {x}))\\&+\,I^x_{t+1}(\mathbf {x}+\mathbf {u}_0(\mathbf {x})) (u_1 - u_{0,1})(\mathbf {x})\\&+\, I^x_{t+1}(\mathbf {x}+\mathbf {u}_0(\mathbf {x})) (u_2 - u_{0,2})(\mathbf {x}), \end{aligned}$$

and \(I^x_{t+1}\), \(I^y_{t+1}\) denote the partial derivatives of \(I_{t+1}\) with respect to x and y, respectively. Let us recall that the two data terms \(E_D\) that we have considered in Sect. 4.1 depend on \(I_t(\mathbf {x})\) and \(I_{t+1}(\mathbf {x}+\mathbf {u}(\mathbf {x}))\); we will denote as \(E_{D,lin}\) the same data term but depending on \(I_t(\mathbf {x})\) and \( I^{lin}_{t+1}(\mathbf {x}+\mathbf {u}(\mathbf {x}))\). In order to decouple the fidelity term \(E_{D,lin} (u)\) and the regularization term \(E_{R} (\mathbf {u})\) in (1), we introduce an auxiliary variable \(\mathbf {v}\) representing the optical flow and we penalize its deviation from \(\mathbf {u}\). Thus, the energy to minimize is

$$\begin{aligned} E(\mathbf {u},\mathbf {v}) = E_{D,lin} (\mathbf {v}) + \beta E_{R} (\mathbf {u}) + \frac{1}{2\theta }\int _{{\varOmega }}\Vert \mathbf {u}-\mathbf {v}\Vert ^2, \end{aligned}$$
(6)

depending on the two variables \(\mathbf {u}, \mathbf {v}\), where \(\theta >0\). The decoupled energy (6) can be minimized by an alternating minimization procedure, alternatively fixing one variable and minimizing with respect to the other one. Section 4.1 presents the different possibilities for the energy.

  1. 1.

    For \(\mathbf {v}\) fixed, let us consider each of the two different regularization terms, \(E^1_R(\mathbf {u})\) and \(E^2_R(\mathbf {u})\), presented in Sect. 4.1.

    1. 1.1.

      In the case of \(E^1_R(\mathbf {u})\), we reformulate the problem as a min-max problem incorporating the dual variables. Then, our minimization problem can be solved as a saddle-point problem. Following the notation of Osher et al. [22], for \(\mathbf {v}=(v_1,v_2)\) fixed, we solve

      $$\begin{aligned}&\int _{\varOmega }\int _{\varOmega }\omega (\mathbf {x},\mathbf {y}) (u_i(\mathbf {x}) - u_i(\mathbf {y})) p(\mathbf {x},\mathbf {y}) {\text {d}}\mathbf {y}{\text {d}}\mathbf {x}\nonumber \\&\quad + \frac{1}{2\theta }\int _{{\varOmega }}\left( u_i -v_i\right) ^{2} {\text {d}}\mathbf {x}, \end{aligned}$$
      (7)

      for \(i=1,2\), and p is the dual variable defined on \({\varOmega }\times {\varOmega }\). Let us explain it in detail. First, it is necessary to extend the notion of derivatives to a non-local framework. The non-local derivative can be written as

      $$\begin{aligned} \partial _{y}{u_i(\mathbf {x})} = \frac{u_i(\mathbf {x}) - u_i(\mathbf {y})}{d(\mathbf {x},\mathbf {y})} \end{aligned}$$
      (8)

      where \(d(\mathbf {x},\mathbf {y})\) is a positive measure between two points \(\mathbf {x},\mathbf {y}\). By taking \(d(\mathbf {x},\mathbf {y})\) such that \(w(\mathbf {x},\mathbf {y}) = d(\mathbf {x},\mathbf {y})^{-2}\), the non-local gradient \(\nabla _{w}u_i(\mathbf {x},\mathbf {y})\) is defined as the vector of all partial derivatives:

      $$\begin{aligned} \nabla _{w}u_i(\mathbf {x},\mathbf {y}) = (u_{i}(\mathbf {x}) - u_{i}(\mathbf {y}))\sqrt{w(\mathbf {x},\mathbf {y})} \quad \mathbf {x},\mathbf {y}\in {\varOmega }.\nonumber \\ \end{aligned}$$
      (9)

      Now, by writing \({\mathbf {p}} := p(\mathbf {x},\mathbf {y})\) for \((\mathbf {x},\mathbf {y})\in {\varOmega }\times {\varOmega }\), the non-local divergence div\(_{w}{\mathbf {p}}(\mathbf {x})\) is defined as the adjoint of the non-local gradient:

      $$\begin{aligned} \text {div}_{w}{\mathbf {p}}(\mathbf {x}) = \int _{{\varOmega }} (p(\mathbf {x},\mathbf {y}) - p(\mathbf {y},\mathbf {x}))\sqrt{w(\mathbf {x},\mathbf {y})} {\text {d}}\mathbf {y}.\nonumber \\ \end{aligned}$$
      (10)

Proposition 1

The solution of (7) is given by the following iterative scheme

$$\begin{aligned} p(\mathbf {x},\mathbf {y})^{n+1}= & {} \frac{p(\mathbf {x},\mathbf {y})^{n} + \tau (\overline{u}_{i}^{n}(\mathbf {x}) - \overline{u}_{i}^{n}(\mathbf {y})\sqrt{w(\mathbf {x},\mathbf {y})})}{1 + \tau |\nabla _{w}u_{i}(\mathbf {x},\mathbf {y})|} \end{aligned}$$
(11)
$$\begin{aligned} u_{i}^{n+1}(\mathbf {x})= & {} u_{i}^{n}(\mathbf {x}) - \sigma \left( \frac{(u_{i}^{n}(\mathbf {x}) - v_{i}(\mathbf {x}))}{\theta } - \text {div}_{w} {\mathbf {p}}(\mathbf {x})\right) \nonumber \\ \end{aligned}$$
(12)
$$\begin{aligned} \overline{u}_{i}^{n+1}(\mathbf {x})= & {} 2u_{i}^{n+1}(\mathbf {x}) -u_{i}^{n}(\mathbf {x}) \end{aligned}$$
(13)

where \({u}_{{i}}\) is the primal variable and \({\mathbf {p}}\) is the dual variable.

  1. 1.2.

    In the case of \(E^2_R(u)\), we use the primal-dual algorithm that Chambolle proposed to minimize the ROF model [13] and which is based on a dual formulation of the TV. Then, our minimization problem can be solved as a saddle-point problem. For \(\mathbf {v}\) fixed, we solve

    $$\begin{aligned} \quad \min _\mathbf {u}\max _\mathbf {\xi } \int _{{\varOmega }} \langle D \mathbf {u},\xi \rangle {\text {d}}\mathbf {x}+ \int _{{\varOmega }} \frac{1}{2\theta }\Vert \mathbf {u}-\mathbf {v}\Vert )^{2} {\text {d}}\mathbf {x}\end{aligned}$$
    (14)

    where the dual variables are \(\mathbf {\xi } = \left( \begin{array}{cc} \xi _{11} &{} \xi _{12} \\ \xi _{21} &{} \xi _{22} \end{array} \right) \) and satisfy \(||\xi ||_{F} \le 1\).

Proposition 2

The solution of (14) is given by the following iterative scheme

$$\begin{aligned} \xi _{i1}^{n+1}= & {} \frac{\xi _{i1}^{n} + \tau \overline{u}_{ix}^{n}}{\max (1,||\xi ||_{2})}, \qquad \xi _{i2}^{n+1} = \frac{\xi _{i2}^{n} + \tau \overline{u}_{iy}^{n}}{\max (1,||\xi ||_{2})}, \end{aligned}$$
(15)
$$\begin{aligned} u_{i}^{n+1}= & {} u_{i}^{n} - \sigma \left( \frac{(u_{i}^{n} - v_{i})}{\theta } - \text {div}\left( \xi _{i1}^{n}, \xi _{i2}^{n}\right) \right) , \end{aligned}$$
(16)
$$\begin{aligned} \overline{u}_{i}^{n+1}= & {} 2u_{i}^{n+1} -u_{i}^{n}, \end{aligned}$$
(17)

where \(i=1,2\).

  1. 2.

    For \(\mathbf {u}\) fixed, let us consider each of the two different data terms, \(E^1_D(\mathbf {v})\) and \(E^2_D(\mathbf {v})\), presented in Sect. 4.1.

    1. 2.1.

      Case \(E^1_D(\mathbf {v})\), Li and Osher [32] present a simple algorithm to find the optimal value of the function \(E(x) = \sum \nolimits _{i}^{n} w_i |x-a_i| + F(x)\) when the \(w_i\) are nonnegative and F is strictly convex. If F is also differentiable and \(F'\) is bijective, it is possible to obtain an explicit formula in terms of the median. For \(\mathbf {u}\) fixed, we solve

      $$\begin{aligned} \int _{\varOmega }C(\mathbf {v},\mathbf {x}) {\text {d}}\mathbf {x}+ \frac{1}{2\theta } \int _{{\varOmega }} \Vert \mathbf {u}-\mathbf {v}\Vert ^{2} {\text {d}}\mathbf {x}. \end{aligned}$$
      (18)

      Following the ideas of [54], we solve the discrete version of this problem. Due to the isotropy of the quadratic term, the optimal solution of \(C(\mathbf {v},\mathbf {x})\) can be obtained solving a one-dimensional problem. In particular, setting \(\mathbf {v}= {\hat{\mathbf {v}}} + \delta \frac{\nabla I(x + v_o)}{|\nabla I(x + v_o)|} + \delta \frac{\nabla ^{+} I(x + v_o)}{|\nabla ^{+} I(x + v_o)|}\) being \(\nabla ^{+}I\) an orthogonal vector to the gradient, where \(\delta \) is our new variable. Then, we minimize over \(\delta \)

      $$\begin{aligned} \frac{1}{2\tau }\delta ^2 + \lambda \int _{\varOmega }|\nabla I_{t+1}(\mathbf {x}+ {\hat{\mathbf {v}}}_o)|\left| G({\hat{\mathbf {v}}}) + \delta \right| {\text {d}}\mathbf {y}\end{aligned}$$
      (19)

      where

      $$\begin{aligned} G_{\mathbf {y}}({\hat{\mathbf {v}}}) = \frac{I_t(\mathbf {x}) - I_t(\mathbf {y}) - I_{t+1}(\mathbf {x}+ {\hat{\mathbf {v}}}_o) + I_{t+1}(\mathbf {y}+ {\hat{\mathbf {v}}}_o) + ({\hat{\mathbf {v}}}-{\hat{\mathbf {v}}}_o)^{T}\nabla I_{t+1}(\mathbf {x}+ {\hat{\mathbf {v}}}_o)}{|\nabla I_{t+1}(\mathbf {x}+ {\hat{\mathbf {v}}}_o)|} \end{aligned}$$

Proposition 3

The minimum of (19) with respect to \(\delta \) is

$$\begin{aligned} \delta ^{*} = \text {median} \{ b_1,...,b_n,a_0,...a_n \} \end{aligned}$$
(20)

where \(b_i = -G_{i}({\hat{\mathbf {v}}})\) and \(a_i = (n-2i)\lambda |\nabla I_{t+1}(\mathbf {x}+ \mathbf {v}_o)|\) for all the discrete neighbors i (corresponding to \(\mathbf {y}\) above), where n is the number of points in the discrete neighborhood.

  1. 2.2.

    Case \(E^2_D(\mathbf {v})\). Notice that this term is a particular case of the previous data term. The functional to minimize

    $$\begin{aligned} \int _{W} \lambda |\rho (\mathbf {v})| +\frac{1}{2\theta }\int _{W} \Vert \mathbf {u}-\mathbf {v}\Vert ^{2} {\text {d}}\mathbf {x}, \end{aligned}$$
    (21)

    where \(\rho (\mathbf {v}) = I_{t+1}(\mathbf {x},\mathbf {v}_o) + \langle \nabla I_{t+1}(\mathbf {x}+ \mathbf {v}_o),(\mathbf {v}- \mathbf {v}_o) \rangle - I_{t}(\mathbf {x})\), does not depend on spatial derivatives on \(\mathbf {v}\). Then, a simple thresholding step gives an explicit solution [62].

Proposition 4

The minimum of (21) with respect to \(\mathbf {v}\) is

$$\begin{aligned} \mathbf {v}= \mathbf {u}+ \left\{ \begin{array}{lll} &{}\lambda \theta \nabla I_{t+1} &{}\quad \mathrm {if} \quad \rho (\mathbf {u}) < -\lambda \theta |\nabla I_{t+1}|^{2}\\ &{}- \lambda \theta \nabla I_{t+1} &{}\quad \mathrm {if} \quad \rho (\mathbf {u}) > \; \lambda \theta |\nabla I_{t+1}|^{2}\\ &{}-\rho (\mathbf {u})\frac{\nabla I_{t+1}}{|\nabla I_{t+1}|^{2}} &{}\quad \mathrm { if} \quad |\rho (\mathbf {u})| \le \lambda \theta |\nabla I_{t+1}|^{2} \end{array} \right. \nonumber \\ \end{aligned}$$
(22)
figure h

Appendix 2: Implementation Details

Our code is written in C. The numerical scheme to solve the functional E(u), in both steps, is based on the implementation of [41]. Image warpings use bicubic interpolation. The image gradient is computed using centered derivatives. Input images have been normalized between [0,1]. The algorithm parameters are initialized with the same default setting for all the experiments. Both time steps are set to \(\tau = \sigma = 0.125\) to ensure convergence. As stopping criterion, the optical flow method uses the infinite norm between two consecutive values of u with a threshold of 0.01. The coupling parameter \({{\theta }}\) is set to 0.3. The smoothness term weight \({\beta }\) is set to 1/40 for the \({\text {TV}}_{{\ell _2}}\)-L1 functional and \({\beta } = \frac{N-1}{80}\) for the \({\text {NLTV}}\)-\({\text {CSAD}}\) one, as suggested by [54], where N is the cardinality of the neighborhood considered in the \({\text {CSAD}}\) term (we use a neighborhood of \(7\times 7\) in the data term and then N=49) and we fixed \(\sigma _c=2\) and \(\sigma _s=2\) for the spatial an color domain of the \({\text {NLTV}}\) term. For the iterated faldoi strategy, we set \({\text {MAX}}{\_}{\text {IT}}\) to 3. The size of the patch \({\mathcal {P}}\) in the local minimization is \(11\times 11\). The complexity of our algorithm is \({\mathcal {O}}(n)\), where n is the number of pixels of the image frame. The basic faldoi algorithm takes around 20 seconds for \({\text {TV}}_{\ell _2}\)-L1 energy and around 10 minutes for \({\text {NLTV}}\)-\({\text {CSAD}}\) over an \({\text {MPI}}-{\text {Sintel}}\) image. Notice that our algorithm using \({\text {NLTV}}\)-\({\text {CSAD}}\) energy is very slow, especially because our implementation does not use parallized code. As \({\text {NLTV}}\)-\({\text {CSAD}}\) can be easily parallelized, it should take the same time for both functionals using a GPU implementation.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Palomares, R.P., Meinhardt-Llopis, E., Ballester, C. et al. FALDOI: A New Minimization Strategy for Large Displacement Variational Optical Flow. J Math Imaging Vis 58, 27–46 (2017). https://doi.org/10.1007/s10851-016-0688-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10851-016-0688-y

Keywords

Navigation