Chapter 15 Motion and Surface Structure from Time-Varying Image Sequences

15.1 Introduction Motion analysis involves estimating the relative motion of objects with respect to each other and the camera, given two or more perspective projection images in a time sequence. real-world applications:

industrial automation and inspection, robot assembly, autonomous vehicle navigation, biomedical engineering, remote sensing, general 3D-scene understanding

object motion and surface structure recovery from:

• observed optic flow

• point correspondences

=====Skip to Section 15.13.2 temporarily=====

15.2 The Fundamental Optic Flow Equation (x, y, z): 3D point on moving rigid body (u, v): perspective projection on the image plane f: camera constant (u̇, v̇): velocity of the point (u, v)

( \begin{matrix}u \\ v \end{matrix} ) = \frac{f}{z} ( \begin{matrix}x \\ y \end{matrix} )

take time derivatives of both sides

( u̇ ; v̇ ) = \frac{f}{z^{2}} ( \begin{matrix}zẋ − xż \\ zẏ − yż \end{matrix} )

yields the fundamental optic flow equation:

( u̇ ; v̇ ) = \frac{1}{z} ( \begin{matrix}f & 0 & −u \\ 0 & f & −v \end{matrix} ) ( ẋ ; ẏ ; ż )

general solution: (λ is a free variable)

( ẋ ; ẏ ; ż ) = \frac{z}{f} ( u̇ ; v̇ ; 0 ) + λ ( \begin{matrix}u \\ v \\ f \end{matrix} )

15.2.1 Translational Motion known:

• N-point optic flow field: {(u_{n}, v_{n}, u̇_{n}, v̇_{n})}_{n=1}^{N} unknown:

• corresponding unknown 3D points: {(x_{n}, y_{n}, z_{n})}_{n=1}^{N}

• all points moving with same but unknown velocity (ẋ, ẏ, ż)

can be solved up to a multiplicative constant

15.2.2 Focus of Expansion and Contraction known:

• 3D motion is translational

• one 2D projected point (u, v) has no motion: u̇ = v̇ = 0

thus, translational motion is in a direction along the ray of sight focus of expansion (FOE): if 3D point field moving toward camera FOE: motion-field vectors radiate outward from that point focus of contraction (FOC): if 3D point field moving away from camera FOC: vectors radiate inward toward diametrically opposite point flow pattern of the motion field of a forward-moving observer =====Nalwa, A Guided Tour of Computer Vision, Fig. 8.14=====

15.2.3 Moving Line Segment known:

• fixed distance between two unknown 3D points (x_{1}, y_{1}, z_{1}), (x_{2}, y_{2}, z_{2})

• translational motion with common velocity (ẋ, ẏ, ż)

• corresponding optic flow: (u_{1}, v_{1}, u̇_{1}, v̇_{1}), (u_{2}, v_{2}, u̇_{2}, v̇_{2})

unknown:

• (x_{1}, y_{1}, z_{1}), (x_{2}, y_{2}, z_{2}): two unknown 3D points

• common velocity: (ẋ, ẏ, ż)

15.2.4 Optic Flow Acceleration Invariant since λf = ż differentiating general solution in Sec. 15.2 and solve for (ẍ, ÿ, z̈):

( ẍ ; ÿ ; z̈ ) = \frac{z}{f} ( ü ; v̈ ; 0 ) + \frac{2ż}{f} ( u̇ ; v̇ ; 0 ) + \frac{z̈}{f} ( \begin{matrix}u \\ v \\ f \end{matrix} )

15.3 Rigid-Body Motion rigid-body motion: no relative motion of points w.r.t. one another rigid-body motion: points maintain fixed position relative to one another rigid-body motion: all points move with the body as a whole R(t): rotation matrix T (t): translation vector p(0): initial position of given point R(0) = I, T (0) = 0 p(t): position of given point at time t rigid-body motion in displacement vectors:

p(t) = R(t)p(0) + T (t)

velocity vector: time derivative of its position:

ṗ(t) = Ṙ(t)p(0) + Ṫ (t)

since p(0) = R^{−1}(t)[p(t) − T (t)]

ṗ(t) = Ṙ(t)R^{−1}(t)p(t) − Ṙ(t)R^{−1}(t)T (t) + Ṫ (t)

(a) translational-motion field under projection onto hemispherical surface only translational-component motion useful in determining scene structure (b) rotational-motion field under projection onto hemispherical surface rotational-motion field provides no information about scene structure =====Nalwa, A Guided Tour of Computer Vision, Fig. 8. 15=====

we can describe rigid-body motion in instantaneous velocity by ṗ(t) = ω(t) × p(t) + k(t) ω_{x}, ω_{y}, ω_{z}: angular velocities in three axes k_{x}, k_{y}, k_{z}: translational velocities in three axes from rigid-body-motion equation

( ẋ ; ẏ ; ż ) = ω × ( \begin{matrix}x \\ y \\ z \end{matrix} ) + k = ( \begin{matrix}ω_{x} \\ ω_{y} \\ ω_{z} \end{matrix} ) × ( \begin{matrix}x \\ y \\ z \end{matrix} ) + ( \begin{matrix}k_{x} \\ k_{y} \\ k_{z} \end{matrix} ) = ( \begin{matrix}ω_{y}z − ω_{z}y + k_{x} \\ ω_{z}x − ω_{x}z + k_{y} \\ ω_{x}y − ω_{y}x + k_{z} \end{matrix} )

and perspective projection equation

( \begin{matrix}x \\ y \\ z \end{matrix} ) = \frac{z}{f} ( \begin{matrix}u \\ v \\ f \end{matrix} )

we can determine an expression for ż:

ż = \frac{z}{f} (ω_{x}v − ω_{y}u) + k_{z}

after simplification

( u̇ ; v̇ ) = ( \begin{matrix}\frac{f}{z} & 0 & −\frac{u}{z} & −\frac{uv}{f} & \frac{f^{2}+u^{2}}{f} & −v \\ 0 & \frac{f}{z} & −\frac{v}{z} & −\frac{f^{2}+v^{2}}{f} & \frac{uv}{f} & u \end{matrix} ) ( \begin{matrix}k_{x} \\ k_{y} \\ k_{z} \\ ω_{x} \\ ω_{y} \\ ω_{z} \end{matrix} )

image velocity: expressed as sum of translational field and rotational field

(x, y, z): 3D coordinate before rigid-body motion in displacement vectors (x′, y′, z′): 3D coordinate after rigid-body motion in displacement vectors (θ_{x}, θ_{y}, θ_{z}): rotation angles in three axes (t_{x}, t_{y}, t_{z}): translation in three axes rigid-body motion in displacement vectors:

( \begin{matrix}x′ \\ y′ \\ z′ \end{matrix} ) = R(θ_{z})R(θ_{y})R(θ_{x}) ( \begin{matrix}x \\ y \\ z \end{matrix} ) + ( \begin{matrix}t_{x} \\ t_{y} \\ t_{z} \end{matrix} )

= ( \begin{matrix}cos θ_{y} cos θ_{z} & sin θ_{x} sin θ_{y} cos θ_{z} − cos θ_{x} sin θ_{z} & cos θ_{x} sin θ_{y} cos θ_{z} + sin θ_{x} sin θ_{z} \\ cos θ_{y} sin θ_{z} & sin θ_{x} sin θ_{y} sin θ_{z} + cos θ_{x} cos θ_{z} & cos θ_{x} sin θ_{y} sin θ_{z} − sin θ_{x} cos θ_{z} \\ − sin θ_{y} & sin θ_{x} cos θ_{y} & cos θ_{x} cos θ_{y} \end{matrix} ) ( \begin{matrix}x \\ y \\ z \end{matrix} ) + ( \begin{matrix}t_{x} \\ t_{y} \\ t_{z} \end{matrix} )

motion in displacement vector and instantaneous velocity is different:

e.g. moon encircling earth instantaneous velocity: first order approximation of displacement vector first order approximation: when θ small, sin θ ≈ θ, cos θ ≈ 1, sin θ sin θ ≈ 0 first order approximation: when time=1 thus ẋ = (x′ − x)/1 first order approximation: ω_{x} = θ_{x}, ω_{y} = θ_{y}, ω_{z} = θ_{z}, k_{x} = t_{x}, k_{y} = t_{y}, k_{z} = t_{z}

( \begin{matrix}x′ \\ y′ \\ z′ \end{matrix} ) = ( \begin{matrix}1 & −θ_{z} & θ_{y} \\ θ_{z} & 1 & −θ_{x} \\ −θ_{y} & θ_{x} & 1 \end{matrix} ) ( \begin{matrix}x \\ y \\ z \end{matrix} ) + ( \begin{matrix}t_{x} \\ t_{y} \\ t_{z} \end{matrix} ) = ( \begin{matrix}x − θ_{z}y + θ_{y}z + t_{x} \\ y − θ_{x}z + θ_{z}x + t_{y} \\ z − θ_{y}x + θ_{x}y + t_{z} \end{matrix} )

=====Garfield 17:26=====

15.4 Linear Algorithms for Motion and Surface Structure from Optic Flow

15.4.1 The Planar Patch Case p(t) = [x(t), y(t), z(t)]′: arbitrary object point on planar patch at time t [u(t), v(t)]: central projective coordinates of p(t) onto image plane z = f

u(t) = f \frac{x(t)}{z(t)}

v(t) = f \frac{y(t)}{z(t)}

p(t) = \frac{z(t)}{f}[u(t), v(t), f]′

[u̇(t), v̇(t)]: instantaneous velocity of moving image point [u(t), v(t)] [u(t), v(t), u̇(t), v̇(t)]: optic flow image point ω(t): instantaneous rotational angular velocity k(t): instantaneous translational velocity unit vector n(t): orthogonal to moving planar patch rigid planar patch motion represented by rigid-motion constraint:

ṗ(t) = ω(t) × p(t) + k(t)
n(t)′p(t) = 1

from above two equations:

ṗ = ω × p + kn′p

let

ω = (ω_{1}, ω_{2}, ω_{3})′,

Ω = ( \begin{matrix}0 & −ω_{3} & ω_{2} \\ ω_{3} & 0 & −ω_{1} \\ −ω_{2} & ω_{1} & 0 \end{matrix} )

rigid-motion constraint could be written as:

ṗ = Ωp + kn′p = (Ω + kn′)p

denote the 3 × 3 matrix Ω + kn′ by W and its three row vectors by w′_{1}, w′_{2}, w′_{3} W: called planar motion parameter matrix W + W′ = kn′ + nk′ since Ω skew symmetric above equation can be written as:

( ẋ ; ẏ ; ż ) = W ( \begin{matrix}x \\ y \\ z \end{matrix} )

from perspective projection equations:

( \begin{matrix}x \\ y \end{matrix} ) = \frac{z}{f} ( \begin{matrix}u \\ v \end{matrix} )

taking time derivatives of these equations, we have

( ẋ ; ẏ ) = \frac{1}{f} ( \begin{matrix}zu̇ + uż \\ zv̇ + vż \end{matrix} )

substitute equations into above equations:

( \begin{matrix}zu̇ + uż \\ zv̇ + vż \\ fż \end{matrix} ) = z ( \begin{matrix}w′_{1} \\ w′_{2} \\ w′_{3} \end{matrix} ) ( \begin{matrix}u \\ v \\ f \end{matrix} )

from third row:

ż = \frac{z}{f} w′_{3} ( \begin{matrix}u \\ v \\ f \end{matrix} )

substitute ż to obtain optical flow-planar motion equation:

[( \begin{matrix}w′_{1} \\ w′_{2} \end{matrix} ) − \frac{1}{f} ( \begin{matrix}u \\ v \end{matrix} ) w′_{3}] ( \begin{matrix}u \\ v \\ f \end{matrix} ) = ( u̇ ; v̇ )

we have 2N linear equations: n = 1, ..., N:

[( \begin{matrix}w′_{1} \\ w′_{2} \end{matrix} ) − \frac{1}{f} ( \begin{matrix}u_{n} \\ v_{n} \end{matrix} ) w′_{3}] ( \begin{matrix}u_{n} \\ v_{n} \\ f \end{matrix} ) = ( u̇_{n} ; v̇_{n} )

optic flow-planar motion recovery: first solve W, then find ω, k, n

15.4.2 General Case: Optic Flow-Motion Equation

1. set up optic flow-motion equation not involving depth information 2. solve it by using linear least-squares technique

15.4.3 A Linear Algorithm for Solving Optic Flow-Motion Equations

15.4.4 Mode of Motion, Direction of Translation, and Surface Structure mode of motion: whether translation k = 0 or not direction of translation: direction of k surface structure: relative depth when k ≠ 0

15.4.5 Linear Optic Flow-Motion Algorithm and Simulation Results motion and shape recovery algorithms should answer three questions:

1. minimum number of points to compute motion and shape

2. what set of optic flow points violate rank assumption e.g. collinearity ...

3. what’s the accuracy of estimated motion from noisy optic flow?

=====Oldie 33:74=====

15.5 The Two View-Linear Motion Algorithm

15.5.1 Planar Patch Motion Recovery from Two Perspective Views: A Brief Review

Two View–Planar Motion Equation imaging geometry for two view-planar motion =====Fig. 15.1===== rigid planar patch in motion in half-space z < 0 p_{1} = (x_{1}, y_{1}, z_{1})′: arbitrary object point before motion p_{2} = (x_{2}, y_{2}, z_{2})′: same object point after motion (u_{1}, v_{1}), (u_{2}, v_{2}): central projective coordinates of p_{1}, p_{2} f: camera constant

u_{1} = fx_{1}/z_{1}, v_{1} = fy_{1}/z_{1}
u_{2} = fx_{2}/z_{2}, v_{2} = fy_{2}/z_{2}

R_{0}: 3 × 3 rotational matrix, R′_{0}R_{0} = I, |R_{0}| = 1 t_{0}: 3 × 1 translational vector n_{0}: 3 × 1 normal vector rigid-body-motion equation relates p_{1} to p_{2} as follows:

p_{2} = R_{0}p_{1} + t_{0}

planarity constrains p_{1} by

n′_{0}p_{1} = 1

combining two equations produces planar rigid-body-motion-equation:

p_{2} = (R_{0} + t_{0}n′_{0})p_{1}

15.5.2 General Curved Patch Motion Recovery from Two Perspective Views: A Simplified Linear Algorithm discard planar patch assumption, consider general curved patch

15.5.3 Determining Translational Orientation 15.5.4 Determining Mode of Motion and Relative Depths

15.5.5 A Simplified Two View-Motion Linear Algorithm

15.5.6 Discussion and Summary when no noise appears: algorithm extremely accurate when small noise appears: it works well except mode of motion incorrect

15.6 Linear Algorithm for Motion and Structure from Three Orthographic Views Ullman (1979) showed that for the orthographic case four-point correspondences over three views are sufficient to determine the motion and structure of the four-point rigid configuration. =====Shimon Ullman, The Interpretation of Visual Motion, ===== =====The MIT Press, Cambridge, MA, 1979 ===== to infer depth information: translation needed in perspective projection to infer depth information: rotation useless in perspective projection to infer depth information: rotation needed in orthographic projection to infer depth information: translation useless in orthographic projection =====depth from motion=====

15.6.1 Problem Formulation image plane stationary, three orthographic views at time t_{1}, t_{2}, t_{3} (x, y, z): object-space coordinates of point P at t_{1} (x′, y′, z′): object-space coordinates of point P at t_{2} (x′′, y′′, z′′): object-space coordinates of point P at t_{3} (u, v): image-space coordinates of P at t_{1} (u′, v′): image-space coordinates of P at t_{2} (u′′, v′′): image-space coordinates of P at t_{3} R = (r_{ij})_{3×3}, S = (s_{ij})_{3×3}: rotation matrix T_{r} = (t_{ri})_{3×1}, T_{s} = (t_{si})_{3×1}: translation vector

(x′, y′, z′)′ = R(x, y, z)′ + T_{r}
(x′′, y′′, z′′)′ = S(x, y, z)′ + T_{s}

known:

• four image-point correspondences:

(u_{i}, v_{i}) ↔ (u′_{i}, v′_{i}) ↔ (u′′_{i}, v′′_{i}), i = 1, 2, 3, 4

unknown:

• (R, T_{r}), (S, T_{s})

• (x_{i}, y_{i}, z_{i}), i = 1, 2, 3, 4 note that with orthographic projections

(u, v) = (x, y)

(u′, v′) = (x′, y′)
(u′′, v′′) = (x′′, y′′)

therefore it is obvious that t_{r3}, t_{s3} can never be determined we are trying to determine: R, S, t_{ri}, t_{si}, i = 1, 2, z_{i} − z_{1}, i = 2, 3, 4

15.6.2 Determining r_{33}, s_{33}, (r_{13}, r_{23}, r_{31}, r_{32}), (s_{13}, s_{23}, s_{31}, s_{32})

15.6.3 Solving a Unique Orthonormal Matrix R

15.6.4 Linear Algorithm to Uniquely Solve R, S, a_{3}

15.6.5 Summary Given two orthographic views, one cannot finitely determine the motion and structure of a rigid body, no matter how many point correspondences are used, as shown by Huang.

15.7 Developing a Highly Robust Estimator for General Regression

15.7.1 Inability of the Classical Robust M-Estimator to Render High Robustness classical robust estimator, such as M-, L-, or R-estimator:

1. optimal or nearly optimal at assumed noise distribution

2. relatively small performance degradation with small number of outliers

3. larger deviations from assumed distribution do not cause catastrophe

MF-estimator with new property much stronger than property 3

1. relatively small performance degradation with larger deviations from assumed distribution

15.7.2 Partially Modeling Log Likelihood Function by Using Heuristics MF-estimator: combine Bayes statistical decision rule with heuristics MF-estimator: robust regression ⇒ more appropriate model-fitting

15.7.3 Discussion M-, L-, R-, and MF-estimator: all residual based

15.7.4 MF-Estimator

15.8 Optic Flow-Instantaneous Rigid-Motion Segmentation and Estimation formulate optic flow-single rigid-motion estimation into general regression

15.8.1 Single Rigid Motion 15.8.2 Multiple Rigid Motions

=====joke===== 15.9 Experimental Protocol 15.9.1 Simplest Location Estimation 15.9.2 Optic Flow-Rigid-Motion Segmentation and Estimation 15.10 Motion and Surface Structure from Line Correspondences 15.10.1 Problem Formulation

Cartesian reference system–central projection =====Fig. 15.8===== l: line in 3D space L: projection of the line on image plane z = f z = f: image plane Π: known plane line L is in; projective plane of l {l_{1}, ..., l_{K}}: set of lines in 3D space {l′_{1}, ..., l′_{K}}: lines moved by rigid motion (R′, T′) at time t′ {l′′_{1}, ..., l′′_{K}}: lines moved by rigid motion (R′′, T′′) at time t′′ {L_{1}, ..., L_{K}}, {L′_{1}, ..., L′_{K}}, {L′′_{1}, ..., L′′_{K}}: projections of lines {Π_{1}, ..., Π_{K}}, {Π′_{1}, ..., Π′_{K}}, {Π′′_{1}, ..., Π′′_{K}}; respective projective planes known:

• K triples of line correspondences in three views L_{i} ↔ L′_{i} ↔ L′′_{i}, i = 1, ..., K

unknown:

• rotations and translations: R′, R′′, T′, T′′

• 3D lines l_{i}, i = 1, ..., K

15.10.2 Solving Rotation Matrices R′, R′′ and Translations T′, T′′

15.10.3 Solving Three-Dimensional Line Structure 15.11 Multiple Rigid Motions from Two Perspective Views 15.11.1 Problem Statement

imaging geometry for two-view-motion =====Fig. 15.9===== How many good point correspondences are needed in order to apply the nonlinear least-squares estimator?

15.11.2 Simulated Experiments 15.12 Rigid Motion from Three Orthographic Views 15.12.1 Problem Formulation and Algorithm

same as Sec. 15.6, instead of linear algorithms, formulate model-fitting problem 15.12.2 Simulated Experiments 15.12.3 Further Research on the MF-Estimator

two problems to be solved for MF-estimator to be practically useful:

• distance problem • requirement for a good initial approximation difficulty of motion and shape recovery: ambiguity of displacement field =====Fuh, Ph.D. Thesis, Fig. 4.1=====

15.13 Literature Review

15.13.1 Inferring Motion and Surface Structure classifications for methods of inferring 3D motion and shape

• use of individual sets of feature points

• use of local optic flow information about a single point

• use of the entire optic flow field Despite all the results obtained over the years, almost none of these inference techniques have been successfully applied to feature-point correspondences calculated from real imagery.

15.13.2 Computing Optic Flow or Image-Point Correspondences problem source contains abundant information

• occlusion boundaries • specular points

• near a focus of expansion

• noise and digitization effects in image formation

motion parallax: apparent relative motion between objects and observer points in observer’s direction of translation remain relatively unchanged information available to a moving observer =====Nalwa, A Guided Tour of Computer Vision, Fig. 8.1===== impart time dimension to image data spatiotemporal image data block =====Nalwa, A Guided Tour of Computer Vision, Fig. 8.2===== motion field: assignment of vectors to image points representing motion angular velocity of fixed scene: inversely proportional to distance pilot in straight-ahead level flight on an overcast day =====Nalwa, A Guided Tour of Computer Vision, Fig. 8.3===== motion field of pilot looking straight ahead in motion direction zero image velocity: at approach point and at infinity (along horizon) =====Nalwa, A Guided Tour of Computer Vision, Fig. 8.5===== motion field of pilot looking to the right in level flight focus of expansion here: at infinity to the left focus of contraction here: at infinity to the right of the figure =====Nalwa, A Guided Tour of Computer Vision, Fig. 8.6===== spatiotemporal image data acquired by a camera, —caption— straight streaks at block top due to translating parallel to image plane =====Nalwa, A Guided Tour of Computer Vision, Fig. 8.10=====

B. K. P. Horn, Robot Vision, The MIT Press, Cambridge, MA, 1986.

Chapter 12 Motion Field & Optical Flow

optic flow: apparent motion of brightness patterns during relative motion arrows: represent angular velocities, which are zero directly ahead and behind J. J. Gibson’s example of flow induced by motion =====Marr, Vision, Fig. 3-55=====

12.1 Motion Field motion field: assigns velocity vector to each point in the image P_{o}: some point on the surface of an object P_{i}: corresponding point in the image v_{o}: object point velocity relative to camera v_{i}: motion in corresponding image point r_{i}: distance between perspectivity center and image point r_{o}: distance between perspectivity center and object point f′: camera constant z: depth axis, optic axis object point displacement causes corresponding image point displacement =====Horn, Robot Vision, Fig. 12.1===== velocities:

v_{o} = \frac{dr_{o}}{dt} and v_{i} = \frac{dr_{i}}{dt}

where r_{o} and r_{i} are related by

\frac{1}{f′}r_{i} = \frac{1}{r_{o} · ẑ}r_{o}

differentiation of this perspective projection equation yields

\frac{1}{f′}v_{i} = \frac{(r_{o} · ẑ)v_{o} − (v_{o} · ẑ)r_{o}}{(r_{o} · ẑ)^{2}} = \frac{(r_{o} × v_{o}) × ẑ}{(r_{o} · ẑ)^{2}}

=====joke=====

12.2 Optical Flow optical flow need not always correspond to the motion field

(a) perfectly uniform sphere rotating under constant illumination: no optical flow, yet nonzero motion field (b) fixed sphere illuminated by moving light source:

nonzero optical flow, yet zero motion field =====Horn, Robot Vision, Fig. 12.2===== apparent motion of brightness patterns: awkward concept not easy to decide which P′ on contour C′ corresponds to P on C =====Horn, Robot Vision, Fig. 12.3===== optical flow: not uniquely determined by local information in changing image E(x, y, t): irradiance at time t at image point (x, y) u(x, y), v(x, y): x, y components of optical flow vector assumption: irradiance the same at time t + δt at point (x + δx, y + δy)

E(x + δx, y + δy, t + δt) = E(x + uδt, y + vδt, t + δt) = E(x, y, t)

fact: motion field continuous almost everywhere expand above equation in Taylor series

E(x, y, t) + δx\frac{∂E}{∂x} + δy\frac{∂E}{∂y} + δt\frac{∂E}{∂t} + e = E(x, y, t)

e: second- and higher-order terms in δx, δy, δt cancelling E(x, y, t), dividing through by δt → 0:

\frac{∂E}{∂x} \frac{dx}{dt} + \frac{∂E}{∂y} \frac{dy}{dt} + \frac{∂E}{∂t} = 0

which is actually just the expansion of the equation

\frac{dE}{dt} = 0

abbreviations:

u = \frac{dx}{dt}, v = \frac{dy}{dt},

E_{x} = \frac{∂E}{∂x}, E_{y} = \frac{∂E}{∂y}, E_{t} = \frac{∂E}{∂t},

we obtain optical flow constraint equation:

E_{x}u + E_{y}v + E_{t} = 0

flow velocity (u, v): lies along straight line perpendicular to intensity gradient =====Horn, Robot Vision, Fig. 12.4===== rewrite constraint equation:

(E_{x}, E_{y}) · (u, v) = −E_{t}

aperture problem: cannot determine optical flow along isobrightness contour

12.3 Smoothness of the Optical Flow motion field: usually varies smoothly in most parts of image try to minimize a measure of departure from smoothness

e_{s} = ∫ ∫ ((u_{x}^{2} + u_{y}^{2}) + (v_{x}^{2} + v_{y}^{2}))dxdy error in optical flow constraint equation should be small

e_{c} = ∫ ∫ (E_{x}u + E_{y}v + E_{t})^{2}dxdy

overall, to minimize e_{s} + λe_{c}:

∫ ∫ F (u, v, u_{x}, u_{y}, v_{x}, v_{y})dxdy = ∫ ∫ (u_{x}^{2} + u_{y}^{2}) + (v_{x}^{2} + v_{y}^{2}) + λ(E_{x}u + E_{y}v + E_{t})^{2}dxdy

λ: large if brightness measurements are accurate λ: small if brightness measurements are noisy

12.4 Filling in Optical Flow Information regions of uniform brightness: optical flow velocity cannot be found locally brightness corners: reliable information is available

12.5 Boundary Conditions well-posed problem: solution exists and is unique partial differential equation: infinite number of solution unless with boundary

12.6 The Discrete Case first partial derivatives of u, v: can be estimated using difference =====Horn, Robot Vision, Fig. 12.5===== measure of departure from smoothness:

s_{i,j} = \frac{1}{4}((u_{i+1,j} − u_{i,j})^{2} + (u_{i,j+1} − u_{i,j})^{2} + (v_{i+1,j} − v_{i,j})^{2} + (v_{i,j+1} − v_{i,j})^{2})

error in optical flow constraint equation:

c_{ij} = (E_{x}u_{ij} + E_{y}v_{ij} + E_{t})^{2}

to seek set of values {u_{ij}}, {v_{ij}} that minimize

e = _{i}^{∑} _{j}^{∑}(s_{ij} + λc_{ij})

differentiating e with respect to u_{kl}, v_{kl}:

\frac{∂e}{∂u_{kl}} = 2(u_{kl} − ū_{kl}) + 2λ(E_{x}u_{kl} + E_{y}v_{kl} + E_{t})E_{x},

\frac{∂e}{∂v_{kl}} = 2(v_{kl} − v̄_{kl}) + 2λ(E_{x}u_{kl} + E_{y}v_{kl} + E_{t})E_{y},

where ū, v̄ are local average of u, v (9 neighbors?) extremum occurs where the above derivatives of e are zero:

(1 + λE_{x}^{2})u_{kl} + λE_{x}E_{y}v_{kl} = ū_{kl} − λE_{x}E_{t}

λE_{x}E_{y}u_{kl} + (1 + λE_{y}^{2})v_{kl} = v̄_{kl} − λE_{y}E_{t} determinant of 2 × 2 coefficient matrix:

1 + λ(E_{x}^{2} + E_{y}^{2}) = (1 + λE_{x}^{2})(1 + λE_{y}^{2}) − λ^{2}E_{x}^{2}E_{y}^{2}

so that

(1 + λ(E_{x}^{2} + E_{y}^{2}))u_{kl} = +(1 + λE_{y}^{2})ū_{kl} − λE_{x}E_{y}v̄_{kl} − λE_{x}E_{t}
(1 + λ(E_{x}^{2} + E_{y}^{2}))v_{kl} = −λE_{x}E_{y}ū_{kl} + (1 + λE_{x}^{2})v̄_{kl} − λE_{y}E_{t}

suggests iterative scheme such as

u_{kl}^{n+1} = ū_{kl}^{n} − \frac{E_{x}ū_{kl}^{n} + E_{y}v̄_{kl}^{n} + E_{t}}{1 + λ(E_{x}^{2} + E_{y}^{2})}E_{x}

v_{kl}^{n+1} = v̄_{kl}^{n} − \frac{E_{x}ū_{kl}^{n} + E_{y}v̄_{kl}^{n} + E_{t}}{1 + λ(E_{x}^{2} + E_{y}^{2})}E_{y}

new value of (u, v): average of surrounding values minus adjustment =====Horn, Robot Vision, Fig. 12.6===== first derivatives: estimated using first differences in 2 × 2 × 2 cube =====Horn, Robot Vision, Fig. 12.7===== consistent estimates of three first partial derivatives:

E_{x} ≈ \frac{1}{4δx}(E_{i+1,j,k} + E_{i+1,j,k+1} + E_{i+1,j+1,k} + E_{i+1,j+1,k+1})

−\frac{1}{4δx}(E_{i,j,k} + E_{i,j,k+1} + E_{i,j+1,k} + E_{i,j+1,k+1})

E_{y} ≈ \frac{1}{4δy}(E_{i,j+1,k} + E_{i,j+1,k+1} + E_{i+1,j+1,k} + E_{i+1,j+1,k+1})

−\frac{1}{4δy}(E_{i,j,k} + E_{i,j,k+1} + E_{i+1,j,k} + E_{i+1,j,k+1})

E_{t} ≈ \frac{1}{4δt}(E_{i,j,k+1} + E_{i,j+1,k+1} + E_{i+1,j,k+1} + E_{i+1,j+1,k+1})

−\frac{1}{4δt}(E_{i,j,k} + E_{i,j+1,k} + E_{i+1,j,k} + E_{i+1,j+1,k})

four successive synthetic images of rotating sphere =====Horn, Robot Vision, Fig. 12.8===== estimated optical flow after 1, 4, 16, and 64 iterations =====Horn, Robot Vision, Fig. 12.9=====

(a) estimated optical flow after several more iterations

(b) computed motion field =====Horn, Robot Vision, Fig. 12.10=====

12.7 Discontinuities in Optical Flow discontinuities in optical flow: on silhouettes where occlusion occurs =====joke=====

Project due April 26: implementing Horn & Schunck optical flow estimation as above synthetically translate lena.im one pixel to the right and downward Try λ of 0.1, 1, 10