Efficient Nonlocal Regularization for Optical Flow (ECCV 2012)
P. Kr¨ahenb¨uhl, V. Koltun (Stanford University)
Lilli Kaufhold, December 18th
Optical Flow
Given: images I1,I2 ∈RN
Wanted: displacement vectoru ∈R2N such that pixelI1(x) corresponds toI2(x+u)
Different Constancy Assumptions:
Grey Value: I2(x+u)−I1(x) = 0 Gradient: ∇I2(x+u)− ∇I1(x) = 0 Hessian: H2I2(x+u)− H2I1(x) = 0 Laplacian: ∆I2(x+u)−∆I1(x) = 0
Optical Flow
Minimise an energy functional of the form E(u) =EData(u) +λLEL(u)
data term: EData(u) =X
i
kI2(xi +ui)−I1(xi)k2
smoothness term: EL(u) =X
i
X
j∈Ni
Ψ (ui −uj)2 wij
Ψ(·): penaliser function Ψ(x2) = (x2+2)0.45
wi,j: weighting function determining the influence pixelj has on pixeli
Content
1 Nonlocal Method
2 Minimisation Linearisation
Efficient computation
3 Influence of Parameters
4 Results
Nonlocal Regularisation
Energy Functional:
E(u) =EData(u) +λLEL(u) +λNEN(u)
nonlocal regulariser: EN(u) =X
i
X
j6=i
Ψ (ui−uj)2 wij
Ψ(·):penaliser function Ψ(x2) = (x2+2)0.45
wi,j: weighting function determining the influence pixelj has on pixeli
Nonlocal Regularisation
Visualisation of nonlocal weights:
wi,j = exp (−kpi −pjk2
2σ2x −kci−cjk2 2σc2 )
Figure: Higher intensity corresponds to higher weight.
Minimisation
E(u) = X
i
kI2(xi+ui)−I1(xi)k2+λL
X
i
X
j∈Ni
Ψ (ui−uj)2 wij
+λN
X
i
X
j6=i
Ψ (ui−uj)2 wij
Minimisation Strategy:
Compute ∇E(u) Solve ∇E(u) = 0
Difficulties:
energy functional is not convex nor linear
normal minimisation techniques are too slow for the nonlocal term Edata andEL easier to handle→ only focus on EN
Linearisation
Nonlocal regulariser
EN(u) =X
i
X
j6=i
Ψ (ui−uj)2 wij
Computation of∇EN(u):
∂
∂ui
EN(u) = 2X
j6=i
wijΨ0 (ui−uj)2
(ui−uj)
Linearisation:
∂
∂ui
EN(ul+1) = 2X
j6=i
wijΨ0
(uil−ujl)2
(ul+1i −ulj+1)
Linear System
Resulting Linear Equation: (A+B)ul+1=wB with Aul+1 = ∇EN(u)
Bul+1−wB = ∇Edata(u) +∇EL(u)
The entries ofAare given by:
Aij = −wijΨ0
(uil −ujl)2
for i 6=j Aii = X
j6=i
wijΨ0
(uil−ujl)2
Jacobi-Method:
uil+1,k+1= (Aii+Bii)−1·
wB i −X
j6=i
(Aij +Bij)ujl+1,k
for all i
Computational Problems
Problem: Each iteration is very expensive due to the following terms:
Aii = X
j6=i
wijΨ0
(uli −ulj)2
= X
j6=i
exp (−kpi2σ−p2jk2
x −kci2σ−c2jk2
c )Ψ0
(uli −ulj)2
X
j6=i
Aijul+1,kj = X
j6=i
−wijΨ0
(uil −ujl)2
ujl+1,k
= X
j6=i
−exp (−kpi2σ−p2jk2
x −kci2σ−c2jk2
c )Ψ0
(uil−ujl)2
ujl+1,k
Idea: Approximate Ψ with Gaussian kernels and perform an efficient Gaussian convolution.
Reduction to Gaussian Convolution
Approximation with exponential mixtures
Ψ(x2)≈µω,σ(x2) :=T −
K
X
n=1
ωnexp(− x2 2σ2n)
⇒Ψ0(x2)≈
K
X
n=1
ωn
2σn2 exp(− x2 2σn2)
Minimise
Z ∞
−∞
µω,σ(x2)−Ψ(x˜ 2)2
dx with truncated penalty function ˜Ψ
in order to optimise the parametersω andσ.
Influence of Parameters: K
Figure: Penalty function Ψ(x2) = (x2+2)0.45 and its Approximation
Influence of Parameters: σ
c, σ
xand λ
NEN(u) =λNX
i
X
j6=i
Ψ (ui −uj)2
exp (−kpi−pjk2
2σ2x −kci−cjk2
2σ2c )
Figure: top row: endpoint and angular errors for varyingσc andλN bottom row: endpoint and angular errors for varyingσx andλN
Results
Figure: top left: first image frametop right: ground truth flowbottom left: result without nonlocal regularisation bottom right: result with nonlocal regularisation
Results
Figure: Screenshot of the current Middlebury benchmark ranking [http://vision.middlebury.edu/flow/eval/results/results-a1.php]
Summary
Use a nonlocal smoothness term in addition to the commonly used local one
Approximate the penalty function with Gaussian kernels and use a fast Gaussian convolution method
Can be computed very efficiently
Nonlocality improves the results of this optical flow method Can maybe even improve the best method there currently is?
References
Philipp Kr¨ahenb¨uhl and Vladlen Koltun: Efficient Nonlocal Regularization for Optical Flow. European Conference on Computer Vision, 2012.
N. Papenberg, A. Bruhn, T. Brox, S. Didas, and J. Weickert:
Highly accurate optic flow computation with theoretically justified warping. International Journal of Computer Vision, 2006.
A. Adams, J. Baek, and M. A. Davis: Fast high-dimensional filtering using the permutohedral lattice. Computer Graphics Forum, 2010.