Top Banner
Motion Estimation (II) Ce Liu [email protected] Microsoft Research New England
85

Motion Estimation I

Nov 21, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Motion Estimation I

Motion Estimation (II)

Ce Liu

[email protected]

Microsoft Research New England

Page 2: Motion Estimation I

Last time

β€’ Motion perception

β€’ Motion representation

β€’ Parametric motion: Lucas-Kanade

β€’ Dense optical flow: Horn-Schunck

𝑑𝑒𝑑𝑣= βˆ’πˆπ‘₯π‘‡πˆπ‘₯ 𝐈π‘₯

π‘‡πˆπ‘¦

𝐈π‘₯π‘‡πˆπ‘¦ πˆπ‘¦

π‘‡πˆπ‘¦

βˆ’1𝐈π‘₯π‘‡πˆπ‘‘πˆπ‘¦π‘‡πˆπ‘₯

𝐈π‘₯2 + 𝛼𝐋 𝐈π‘₯πˆπ‘¦

𝐈π‘₯πˆπ‘¦ πˆπ‘¦2 + 𝛼𝐋

π‘ˆπ‘‰= βˆ’πˆπ‘₯πˆπ­πˆπ‘¦πˆπ­

Page 3: Motion Estimation I

Who are they?

Berthold K. P. Horn Takeo Kanade

Page 4: Motion Estimation I

Content

β€’ Robust optical flow estimation

β€’ Applications

β€’ Feature matching

β€’ Discrete optical flow

β€’ Layer motion analysis

β€’ Other representations

Page 5: Motion Estimation I

Content

β€’ Robust optical flow estimation

β€’ Applications

β€’ Feature matching

β€’ Discrete optical flow

β€’ Layer motion analysis

β€’ Other representations

Page 6: Motion Estimation I

Spatial regularity

β€’ Horn-Schunck is a Gaussian Markov random field (GMRF)

𝐼π‘₯𝑒 + 𝐼𝑦𝑣 + 𝐼𝑑2+ 𝛼 𝛻𝑒 2 + 𝛻𝑣 2 𝑑π‘₯𝑑𝑦

β€’ Spatial over-smoothness is caused by the quadratic smoothness term

β€’ Nevertheless, real optical flow fields are sparse!

𝑒 𝑒π‘₯ 𝑒𝑦

𝑣 𝑣π‘₯ 𝑣𝑦

Page 7: Motion Estimation I

Data term

β€’ Horn-Schunck is a Gaussian Markov random field (GMRF)

𝐼π‘₯𝑒 + 𝐼𝑦𝑣 + 𝐼𝑑2+ 𝛼 𝛻𝑒 2 + 𝛻𝑣 2 𝑑π‘₯𝑑𝑦

β€’ Quadratic data term implies Gaussian white noise

β€’ Nevertheless, the difference between two corresponded pixels is caused by– Noise (majority)

– Occlusion

– Compression error

– Lighting change

– …

β€’ The error function needs to account for these factors

Page 8: Motion Estimation I

Noise model

β€’ Explicitly model the noise 𝑛

𝐼2 π‘₯ + 𝑒, 𝑦 + 𝑣 = 𝐼1 π‘₯, 𝑦 + 𝑛

β€’ It can be a mixture of two Gaussians, inlier and outlier

𝑛 ~ πœ†π‘ 0, πœŽπ‘–2 + 1 βˆ’ πœ† 𝑁(0, πœŽπ‘œ

2)

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 10

5

10

15

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 10

5

10

15

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 10

5

10

15

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-4

-2

0

2

4

6

8

10

12

14

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-4

-2

0

2

4

6

8

10

12

14

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-4

-2

0

2

4

6

8

10

12

14

Inlier Outlier Mixture (πœ† = 0.9)

PDF

Potential

Page 9: Motion Estimation I

More components in the mixture

β€’ Consider a Gaussian mixture model

𝑛~1

𝑍

π‘˜=1

𝐾

πœ‰π‘˜π‘(0, π‘˜π‘  2)

β€’ Varying the decaying rate πœ‰, we obtain a variety of potential functions

-4 -3 -2 -1 0 1 2 3 4-5

0

5

10

15

20

25

30

-4 -3 -2 -1 0 1 2 3 4-2

0

2

4

6

8

10

12

πœ‰ = 0.1 πœ‰ = 0.9

Page 10: Motion Estimation I

Typical error functions

-2 -1.5 -1 -0.5 0 0.5 1 1.5 20

0.5

1

1.5

2

2.5

3

-2 -1.5 -1 -0.5 0 0.5 1 1.5 20

0.5

1

1.5

2

2.5

3

-2 -1.5 -1 -0.5 0 0.5 1 1.5 20

0.5

1

1.5

2

2.5

3

-2 -1.5 -1 -0.5 0 0.5 1 1.5 20

0.5

1

1.5

2

2.5

3

L2 norm𝜌 𝑧 = 𝑧2

L1 norm𝜌 𝑧 = |𝑧|

Truncated L1 norm𝜌 𝑧 = min( 𝑧 , πœ‚)

Lorentzian𝜌 𝑧 = log(1 + 𝛾𝑧2)

Page 11: Motion Estimation I

Robust statistics

β€’ Traditional L2 norm: only noise, no outlier

β€’ Example: estimate the average of 0.95, 1.04, 0.91, 1.02, 1.10, 20.01

β€’ Estimate with minimum error

π‘§βˆ— = argmin𝑧 𝑖 𝜌 𝑧 βˆ’ 𝑧𝑖

– L2 norm: π‘§βˆ— = 4.172

– L1 norm: π‘§βˆ— = 1.038

– Truncated L1: π‘§βˆ— = 1.0296

– Lorentzian: π‘§βˆ— = 1.0147

-2 -1.5 -1 -0.5 0 0.5 1 1.5 20

0.5

1

1.5

2

2.5

3

L2 norm𝜌 𝑧 = 𝑧2

-2 -1.5 -1 -0.5 0 0.5 1 1.5 20

0.5

1

1.5

2

2.5

3

L1 norm𝜌 𝑧 = |𝑧|

-2 -1.5 -1 -0.5 0 0.5 1 1.5 20

0.5

1

1.5

2

2.5

3

Truncated L1 norm𝜌 𝑧 = min( 𝑧 , πœ‚)

-2 -1.5 -1 -0.5 0 0.5 1 1.5 20

0.5

1

1.5

2

2.5

3

Lorentzian𝜌 𝑧 = log(1 + 𝛾𝑧2)

Page 12: Motion Estimation I

The family of robust power functions

β€’ Can we directly use L1 norm πœ“ 𝑧 = 𝑧 ?– Derivative is not continuous

β€’ Alternative forms

– L1 norm: πœ“ 𝑧2 = 𝑧2 + πœ€2

– Sub L1: πœ“ 𝑧2; πœ‚ = 𝑧2 + πœ€2 πœ‚, πœ‚ < 0.5

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

1.2

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

1.2

|𝑧|

𝑧2 + πœ€2

πœ‚ = 0.5πœ‚ = 0.4πœ‚ = 0.3πœ‚ = 0.2

Page 13: Motion Estimation I

Modification to Horn-Schunck

β€’ Let x = (π‘₯, 𝑦, 𝑑), and w x = 𝑒 x , 𝑣 x , 1 be the flow vector

β€’ Horn-Schunck (recall)

𝐼π‘₯𝑒 + 𝐼𝑦𝑣 + 𝐼𝑑2+ 𝛼 𝛻𝑒 2 + 𝛻𝑣 2 𝑑π‘₯𝑑𝑦

β€’ Robust estimation

πœ“ 𝐼 x + w βˆ’ 𝐼 x 2 + π›Όπœ™ 𝛻𝑒 2 + 𝛻𝑣 2 𝑑π‘₯𝑑𝑦

β€’ Robust estimation with Lucas-Kanade

𝑔 βˆ— πœ“ 𝐼 x + w βˆ’ 𝐼 x 2 + π›Όπœ™ 𝛻𝑒 2 + 𝛻𝑣 2 𝑑π‘₯𝑑𝑦

Page 14: Motion Estimation I

A unifying framework

β€’ The robust object function

𝑔 βˆ— πœ“ 𝐼 x + w βˆ’ 𝐼 x 2 + π›Όπœ™ 𝛻𝑒 2 + 𝛻𝑣 2 𝑑π‘₯𝑑𝑦

– Lucas-Kanade: 𝛼 = 0, πœ“ 𝑧2 = 𝑧2

– Robust Lucas-Kanade: 𝛼 = 0, πœ“ 𝑧2 = 𝑧2 + πœ€2

– Horn-Schunck: 𝑔 = 1, πœ“ 𝑧2 = 𝑧2, πœ™ 𝑧2 = 𝑧2

β€’ One can also learn the filters (other than gradients), and robust function πœ“ β‹… , πœ™(β‹…) [Roth & Black 2005]

Page 15: Motion Estimation I

Derivation strategies

β€’ Euler-Lagrange – Derive in continuous domain, discretize in the end

– Nonlinear PDE’s

– Outer and inner fixed point iterations

– Limited to derivative filters; cannot generalize to arbitrary filters

β€’ Energy minimization– Discretize first and derive in matrix form

– Easy to understand and derive

– Iteratively reweighted least square (IRLS)

β€’ Variational optimization

β€’ Euler-Lagrange = Variational optimization = IRLS

Page 16: Motion Estimation I

Iteratively reweighted least square (IRLS)

β€’ Let πœ™ 𝑧 = 𝑧2 + πœ€2 πœ‚ be a robust function

β€’ We want to minimize the objective function

Ξ¦ 𝐀π‘₯ + 𝑏 =

𝑖=1

𝑛

πœ™ π‘Žπ‘–π‘‡π‘₯ + 𝑏𝑖

2

where π‘₯ ∈ ℝ𝑑 , 𝐴 = π‘Ž1 π‘Ž2β‹―π‘Žπ‘›π‘‡ ∈ ℝ𝑛×𝑑 , 𝑏 ∈ ℝ𝑛

β€’ By setting πœ•Ξ¦

πœ•π‘₯= 0, we can derive

πœ•Ξ¦

πœ•π‘₯∝

𝑖=1

𝑛

πœ™β€² π‘Žπ‘–π‘‡π‘₯ + 𝑏𝑖

2π‘Žπ‘–π‘‡π‘₯ + 𝑏𝑖 π‘Žπ‘–

= 𝑖=1

𝑛

π‘€π‘–π‘–π‘Žπ‘–π‘‡π‘₯π‘Žπ‘– +π‘€π‘–π‘–π‘π‘–π‘Žπ‘–

= 𝑖=1

𝑛

π‘Žπ‘–π‘‡π‘€π‘–π‘–π‘₯π‘Žπ‘– + π‘π‘–π‘€π‘–π‘–π‘Žπ‘–

= 𝐀𝑇𝐖𝐀π‘₯ + 𝐀𝑇𝐖𝑏

𝑀𝑖𝑖 = πœ™β€² π‘Žπ‘–

𝑇π‘₯ + 𝑏𝑖2

𝐖 = diag Ξ¦β€²(𝐀π‘₯ + 𝑏)

Page 17: Motion Estimation I

Iteratively reweighted least square (IRLS)

β€’ Derivative: πœ•Ξ¦

πœ•π‘₯= 𝐀𝑇𝐖𝐀π‘₯ + 𝐀𝑇𝐖𝑏 = 0

β€’ Iterate between reweighting and least square

β€’ Convergence is guaranteed (local minima)

1. Initialize π‘₯ = π‘₯0

2. Compute weight matrix 𝐖 = diag Ξ¦β€²(𝐀π‘₯ + 𝑏)

3. Solve the linear system 𝐀𝑇𝐖𝐀π‘₯ = βˆ’π€π‘‡π–π‘

4. If π‘₯ converges, return; otherwise, go to 2

Page 18: Motion Estimation I

IRLS for robust optical flow

β€’ Objective function

𝑔 βˆ— πœ“ 𝐼 x + w βˆ’ 𝐼 x 2 + π›Όπœ™ 𝛻𝑒 2 + 𝛻𝑣 2 𝑑π‘₯𝑑𝑦

β€’ Discretize, linearize and increment

π‘₯,𝑦

𝑔 βˆ— πœ“ 𝐼𝑑 + 𝐼π‘₯𝑑𝑒 + 𝐼𝑦𝑑𝑣2+ π›Όπœ™ 𝛻 𝑒 + 𝑑𝑒 2 + 𝛻 𝑣 + 𝑑𝑣 2

β€’ IRLS (initialize 𝑑𝑒 = 𝑑𝑣 = 0)– Reweight:

– Least square:

𝚿π‘₯π‘₯β€² = diag 𝑔 βˆ— πœ“β€²πˆπ‘₯𝐈π‘₯ , 𝚿π‘₯𝑦

β€² = diag 𝑔 βˆ— πœ“β€²πˆπ‘₯πˆπ‘¦ ,

πšΏπ‘¦π‘¦β€² = diag 𝑔 βˆ— πœ“β€²πˆπ‘¦πˆπ‘¦ , 𝚿π‘₯𝑑

β€² = diag 𝑔 βˆ— πœ“β€²πˆπ‘₯πˆπ‘‘ ,

πšΏπ‘¦π‘‘β€² = diag 𝑔 βˆ— πœ“β€²πˆπ‘¦πˆπ‘‘ , 𝐋 = 𝐃π‘₯

π‘‡πš½β€²πƒπ‘₯ + πƒπ‘¦π‘‡πš½β€²πƒπ‘¦

𝚿π‘₯π‘₯β€² + 𝛼𝐋 𝚿π‘₯𝑦

β€²

𝚿π‘₯𝑦′ πšΏπ‘¦π‘¦

β€² + π›Όπ‹π‘‘π‘ˆπ‘‘π‘‰= βˆ’πšΏπ‘₯𝑑′ + π›Όπ‹π‘ˆ

πšΏπ‘¦π‘‘β€² + 𝛼𝐋𝑉

Page 19: Motion Estimation I

What’s changed?

β€’ Optical flow with robust function

β€’ Horn-Schunck

𝚿π‘₯π‘₯β€² = diag 𝑔 βˆ— πœ“β€²πˆπ‘₯𝐈π‘₯ , 𝚿π‘₯𝑦

β€² = diag 𝑔 βˆ— πœ“β€²πˆπ‘₯πˆπ‘¦ ,

πšΏπ‘¦π‘¦β€² = diag 𝑔 βˆ— πœ“β€²πˆπ‘¦πˆπ‘¦ , 𝚿π‘₯𝑑

β€² = diag 𝑔 βˆ— πœ“β€²πˆπ‘₯πˆπ‘‘ ,

πšΏπ‘¦π‘‘β€² = diag 𝑔 βˆ— πœ“β€²πˆπ‘¦πˆπ‘‘ , 𝐋 = 𝐃π‘₯

π‘‡πš½β€²πƒπ‘₯ + πƒπ‘¦π‘‡πš½β€²πƒπ‘¦

𝚿π‘₯π‘₯β€² + 𝛼𝐋 𝚿π‘₯𝑦

β€²

𝚿π‘₯𝑦′ πšΏπ‘¦π‘¦

β€² + π›Όπ‹π‘‘π‘ˆπ‘‘π‘‰= βˆ’πšΏπ‘₯𝑑′ + π›Όπ‹π‘ˆ

πšΏπ‘¦π‘‘β€² + 𝛼𝐋𝑉

𝐈π‘₯2 + 𝛼𝐋 𝐈π‘₯πˆπ‘¦

𝐈π‘₯πˆπ‘¦ πˆπ‘¦2 + 𝛼𝐋

π‘‘π‘ˆπ‘‘π‘‰= βˆ’πˆπ‘₯πˆπ‘‘ + π›Όπ‹π‘ˆπˆπ‘¦πˆπ‘‘ + 𝛼𝐋𝑉

Page 20: Motion Estimation I

Example

Flow visualization

Coarse-to-fine LK with median filtering

Input two frames

Horn-Schunck

Robust optical flow

Page 21: Motion Estimation I

Content

β€’ Robust optical flow estimation

β€’ Applications

β€’ Feature matching

β€’ Discrete optical flow

β€’ Layer motion analysis

β€’ Other representations

Page 22: Motion Estimation I

Video stabilization

Page 23: Motion Estimation I

Video denoising

Page 24: Motion Estimation I

Video super resolution

Page 25: Motion Estimation I

Content

β€’ Robust optical flow estimation

β€’ Applications

β€’ Feature matching

β€’ Discrete optical flow

β€’ Layer motion analysis

β€’ Contour motion analysis

β€’ Obtaining motion ground truth

Page 26: Motion Estimation I

Block matching

β€’ Both Horn-Schunck and Lucas-Kanade are sub-pixel accuracy algorithms

β€’ But in practice we may not need sub-pixel accuracy

β€’ MPEG: 16 Γ— 16 block matching using MMSE

β€’ H264: variable block size and quarter-pixel precision

Page 27: Motion Estimation I

Tracking reliable features

β€’ Idea: no need to work on ambiguous region pixels (flat regions & line structures)

β€’ Instead, we can track features and then propagate the tracking to ambiguous pixels

β€’ Good features to track [Shi & Tomashi 94]

β€’ Block matching + Lucas-Kanade refinement

𝑑𝑒𝑑𝑣= βˆ’πˆπ‘₯π‘‡πˆπ‘₯ 𝐈π‘₯

π‘‡πˆπ‘¦

𝐈π‘₯π‘‡πˆπ‘¦ πˆπ‘¦

π‘‡πˆπ‘¦

βˆ’1𝐈π‘₯π‘‡πˆπ‘‘πˆπ‘¦π‘‡πˆπ‘‘

Page 28: Motion Estimation I

Feature detection & tracking

Page 29: Motion Estimation I

From sparse to dense

β€’ Interpolation: given values {𝑑𝑖} at { π‘₯𝑖 , 𝑦𝑖 }, reconstruct a smooth plane 𝑓(π‘₯, 𝑦)

β€’ Membrane model (first order smoothness)

𝑖

𝑀𝑖 𝑓 π‘₯𝑖 , 𝑦𝑖 βˆ’ 𝑑𝑖2 + 𝛼 𝑓π‘₯

2 + 𝑓𝑦2 𝑑π‘₯𝑑𝑦

β€’ Thin plate model (second order smoothness)

𝑖

𝑀𝑖 𝑓 π‘₯𝑖 , 𝑦𝑖 βˆ’ 𝑑𝑖2 + 𝛼 𝑓π‘₯π‘₯

2 + 𝑓π‘₯𝑦2 + 𝑓𝑦𝑦

2 𝑑π‘₯𝑑𝑦

Page 30: Motion Estimation I

Membrane vs. thin plate

Page 31: Motion Estimation I

Dense flow field from sparse tracking

Page 32: Motion Estimation I

Pros and Cons of Feature Matching

β€’ Pros– Efficient (a few feature points vs. all pixels)

– Reliable (with advanced feature descriptors)

β€’ Cons– Independent tracking (tracking can be unreliable)

– Not all information is used (may not capture weak features)

β€’ How to improve– Track every pixel with uncertainty

– Integrate spatial regularity (neighboring pixels go together)

Page 33: Motion Estimation I

Content

β€’ Robust optical flow estimation

β€’ Applications

β€’ Feature matching

β€’ Discrete optical flow

β€’ Layer motion analysis

β€’ Other representations

Page 34: Motion Estimation I

Discrete optical flow

β€’ The objective function is similar to that of continuous flow

β€’ x = (π‘₯, 𝑦) is pixel coordinate, w = (𝑒, 𝑣) is flow vector

𝐸 w =

x

min( 𝐼1 x βˆ’ 𝐼2 x + w x , 𝑑) +

x

πœ‚( 𝑒 x + 𝑣 x ) +

x1,x2 βˆˆπœ€

min 𝛼 𝑒 x1 βˆ’ 𝑒 x2 , 𝑑 + min 𝛼 𝑣 x1 βˆ’ 𝑣 x2 , 𝑑

β€’ Truncated L1 norms:– Account for outliers in the data term

– Encourage piecewise smoothness in the smoothness term

Data term

Small displacement

Spatial regularity

Page 35: Motion Estimation I

Decoupled smoothness

Smoothness O(L4)

Smoothness: O(L2)

Smoothness: O(L2)

Data term: O(L2) Data term: O(L2)

Coupled smoothness

Decoupled smoothnessSmoothness: O(L)

Smoothness: O(L)

Page 36: Motion Estimation I

Combinatorial optimization on graph

𝐸 w =

x

min( 𝐼1 x βˆ’ 𝐼2 x + w x , 𝑑) +

x

πœ‚( 𝑒 x + 𝑣 x ) +

x1,x2 βˆˆπœ€

min 𝛼 𝑒 x1 βˆ’ 𝑒 x2 , 𝑑 + min 𝛼 𝑣 x1 βˆ’ 𝑣 x2 , 𝑑

β€’ Optimization strategies– Belief propagation

– Graph cuts

– MCMC (simulated annealing)

Page 37: Motion Estimation I

Dual-layer belief propagation

[Shekhovtsov et al. CVPR 07]

Horizontal flow u

Vertical flow v

u

v

w = (𝑒, 𝑣)

Data term

min( 𝐼1 x βˆ’ 𝐼2 x + w , 𝑑)

Smoothness term on u

min 𝛼 𝑒 x1 βˆ’ 𝑒 x2 , 𝑑

Smoothness term on v

min 𝛼 𝑣 x1 βˆ’ 𝑣 x2 , 𝑑

Regularization term on u πœ‚|𝑒 x |

Regularization term on v πœ‚|𝑣 x |

Page 38: Motion Estimation I

Dual-layer belief propagation

u

v

Message π‘€π‘—π‘˜: given

all the information at node π‘˜, predict the distribution at node 𝑗

Update within 𝑒 plane

π‘˜ 𝑗

Page 39: Motion Estimation I

Dual-layer belief propagation

u

v

Update within 𝑣 plane

Page 40: Motion Estimation I

Dual-layer belief propagation

u

v

Update from 𝑒 plane to 𝑣 plane

π‘˜ 𝑗

Page 41: Motion Estimation I

Dual-layer belief propagation

u

v

Update from 𝑣 plane to 𝑒 plane

Page 42: Motion Estimation I

Example

Flow visualization

Coarse-to-fine LK with median filtering

Input two frames

Robust optical flow

Discrete optical flow

Page 43: Motion Estimation I

Content

β€’ Robust optical flow estimation

β€’ Applications

β€’ Feature matching

β€’ Discrete optical flow

β€’ Layer motion analysis

β€’ Other representations

Page 44: Motion Estimation I

Layer representation

β€’ Optical flow field is able to model complicated motion

β€’ Different angle: a video sequence can be a composite of several moving layers

β€’ Layers have been widely used

– Adobe Photoshop

– Adobe After Effect

β€’ Compositing is straightforward, but inference is hard

Wang & Adelson, 1994

Page 45: Motion Estimation I

Wang & Adelson, 1994

β€’ Strategy– Obtaining dense optical flow field

– Divide a frame into non-overlapping regions and fit affine motion for each region

– Cluster affine motions by k-means clustering

– Region assignment by hypothesis testing

– Region splitter: disconnected regions are separated

Page 46: Motion Estimation I

Results

Optical flow field Clustering to affine regions Clustering with error metric

Three layers with affine motion superimposed

Reconstructed background layer

Flower garden

Page 47: Motion Estimation I

Weiss & Adelson, 1996

β€’ Chicken & egg problem– Good motion β†’ good segmentation

– Good segmentation β†’ good motion

β€’ We don’t have either of them, so iterate!

β€’ Perceptually organized expectation & maximization (POEM)– E-step: estimate the motion parameter of each layer

– M-step: estimate the likelihood that a pixel belongs to each of the layers (segmentation)

Page 48: Motion Estimation I

Liu et. al. 2005

β€’ Reliable layer segmentation for motion magnification

β€’ Layer segmentation pipeline

Feature point

tracking

Trajectory

clustering

Dense optical

flow interpolation

Layer

segmentation

Page 49: Motion Estimation I

Normalized Complex Correlation

β€’ The similarity metric should be independent of phase and magnitude

β€’ Normalized complex correlation

tt

t

tCtCtCtC

tCtCCCS

)()()()(

|)()(|),(

2211

2

21

21

Feature point

tracking

Trajectory

clustering

Dense optical

flow interpolation

Layer

segmentation

Page 50: Motion Estimation I

Spectral Clustering

Affinity matrix Clustering Reordering of affinity matrix

Two clustersTrajectory

Tra

jecto

ry

Feature point

tracking

Trajectory

clustering

Dense optical

flow interpolation

Layer

segmentation

Page 51: Motion Estimation I

Clustering Results

Feature point

tracking

Trajectory

clustering

Dense optical

flow interpolation

Layer

segmentation

Page 52: Motion Estimation I

Flow vectors of

clustered sparse

feature points

Dense optical flow

field of cluster 1

(leaves)

Dense optical flow

field of cluster 2

(swing)

From Sparse Feature Points to Dense Optical Flow Field

Cluster 1: leaves

Cluster 2: swing

β€’ Interpolate dense optical flow field using locally weighted linear regression

Feature point

tracking

Trajectory

clustering

Dense optical

flow interpolation

Layer

segmentation

Page 53: Motion Estimation I

Motion Layer Assignment

β€’ Assign each pixel to a motion cluster layer, using four cues:

– Motion likelihoodβ€”consistency of pixel’s intensity if it moves with

the motion of a given layer (dense optical flow field)

– Color likelihoodβ€”consistency of the color in a layer

– Spatial connectivityβ€”adjacent pixels favored to belong the same

group

– Temporal coherenceβ€”label assignment stays constant over time

β€’ Energy minimization using graph cuts

Feature point

tracking

Trajectory

clustering

Dense optical

flow interpolation

Layer

segmentation

Page 54: Motion Estimation I
Page 55: Motion Estimation I

How good is optical flow?

β€’ The AAE (average angular error) race on the Yosemitesequence for over 15 years

#I. Austvoll. Lecture Notes in Computer Science, 2005*Brox et al. ECCV, 2004.

Yosemite sequence State-of-the-art optical flow*

Improvement#

Page 56: Motion Estimation I

Middlebury flow database

Baker et. al. A Database and Evaluation Methodology for Optical Flow. ICCV 2007

Page 57: Motion Estimation I

Middlebury flow database

Page 58: Motion Estimation I

Human-assisted motion annotation

β€’ Ground truth is essential to progress the field

β€’ A first step in computer vision to obtain ground-truth motion for arbitrary scenes (a different approach from Baker et al. 2007)

β€’ An interactive system to combine human perception and the state-of-the-art computer vision algorithms to annotate motion

Liu et al. Human-assisted motion annotation. CVPR 2008

Page 59: Motion Estimation I

Demo: interactive layer segmentation

Page 60: Motion Estimation I

Demo: interactive motion labeling

Page 61: Motion Estimation I

Motion database of natural scenes

Color map

Bruhn et al. Lucas/Kanade meets Horn/Schunck: combining local and global optical flow methods. IJCV, 2005

Page 62: Motion Estimation I

Content

β€’ Robust optical flow estimation

β€’ Applications

β€’ Feature matching

β€’ Discrete optical flow

β€’ Layer motion analysis

β€’ Other representations

Page 63: Motion Estimation I

Particle video

P. Sand and S. Teller. Particle Video: Long-Range Motion Estimation using Point Trajectories. CVPR 2006

Page 64: Motion Estimation I

Particle video

Page 65: Motion Estimation I

Seemingly Simple Examples

Kanizsa square

From real video

Page 66: Motion Estimation I

Output from the State-of-the-Art Optical Flow Algorithm

T. Brox et al. High accuracy optical flow estimation based on a theory for warping. ECCV 2004

Optical flow fieldKanizsa square

Page 67: Motion Estimation I

Output from the State-of-the-Art Optical Flow Algorithm

T. Brox et al. High accuracy optical flow estimation based on a theory for warping. ECCV 2004

Optical flow field

Dancer

Page 68: Motion Estimation I

Optical flow representation: aperture problem

Corners Lines Flat regions

Spurious junctions Boundary ownership Illusory boundaries

Page 69: Motion Estimation I

Optical flow representation: aperture problem

Corners Lines Flat regions

Spurious junctions Boundary ownership Illusory boundaries

We need motion representation beyond pixel level!

Page 70: Motion Estimation I

Challenge: Textureless Objects under Occlusion

β€’ Corners are not always trustworthy (junctions)

β€’ Flat regions do not always move smoothly (discontinuous at illusory boundaries)

β€’ How about boundaries?

– Easy to detect and track for textureless objects

– Able to handle junctions with illusory boundaries

Page 71: Motion Estimation I

Frame 1

Page 72: Motion Estimation I

Frame 2

Page 73: Motion Estimation I

Extracted boundary fragments

Page 74: Motion Estimation I

Optical flow from Lucas-Kanade algorithm

Page 75: Motion Estimation I

Estimated motion by our system, after grouping

Page 76: Motion Estimation I

Boundary grouping and illusory boundaries (frame 1)

Page 77: Motion Estimation I

Boundary grouping and illusory boundaries (frame 2)

Page 78: Motion Estimation I

Rotating Chair

Page 79: Motion Estimation I

Frame 1

Page 80: Motion Estimation I

Frame 2

Page 81: Motion Estimation I

Extracted boundary fragments

Page 82: Motion Estimation I

Estimated flow field from Brox et al.

Page 83: Motion Estimation I

Estimated motion by our system, after grouping

Page 84: Motion Estimation I

Boundary grouping and illusory boundaries (frame 1)

Page 85: Motion Estimation I

Boundary grouping and illusory boundaries (frame 2)