1 / 112

C280, Computer Vision

C280, Computer Vision. Prof. Trevor Darrell trevor@eecs.berkeley.edu Lecture 9: Motion. Roadmap. Previous: Image formation, filtering, local features, (Texture)… Tues: Feature-based Alignment Stitching images together Homographies , RANSAC, Warping, Blending

gunda
Télécharger la présentation

C280, Computer Vision

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. C280, Computer Vision Prof. Trevor Darrell trevor@eecs.berkeley.edu Lecture 9: Motion

  2. Roadmap • Previous: Image formation, filtering, local features, (Texture)… • Tues: Feature-based Alignment • Stitching images together • Homographies, RANSAC, Warping, Blending • Global alignment of planar models • Today: Dense Motion Models • Local motion / feature displacement • Parametric optic flow • No classes next week: ICCV conference • Oct 6th: Stereo / ‘Multi-view’: Estimating depth with known inter-camera pose • Oct 8th: ‘Structure-from-motion’: Estimation of pose and 3D structure • Factorization approaches • Global alignment with 3D point models

  3. Last Time: Alignment • Homographies • Rotational Panoramas • RANSAC • Global alignment • Warping • Blending

  4. Today: Motion and Flow • Motion estimation • Patch-based motion (optic flow) • Regularization and line processes • Parametric (global) motion • Layered motion models

  5. Why estimate visual motion? • Visual Motion can be annoying • Camera instabilities, jitter • Measure it; remove it (stabilize) • Visual Motion indicates dynamics in the scene • Moving objects, behavior • Track objects and analyze trajectories • Visual Motion reveals spatial layout • Motion parallax Szeliski

  6. Classes of Techniques • Feature-based methods • Extract visual features (corners, textured areas) and track them • Sparse motion fields, but possibly robust tracking • Suitable especially when image motion is large (10s of pixels) • Direct-methods • Directly recover image motion from spatio-temporal image brightness variations • Global motion parameters directly recovered without an intermediate feature motion calculation • Dense motion fields, but more sensitive to appearance variations • Suitable for video and when image motion is small (< 10 pixels) Szeliski

  7. Patch-based motion estimation

  8. Image motion How do we determine correspondences? Assume all change between frames is due to motion: I J

  9. The Brightness Constraint • Brightness Constancy Equation: Or, equivalently, minimize : Linearizing (assuming small (u,v))using Taylor series expansion: Szeliski

  10. Minimizing: In general Hence, Gradient Constraint (or the Optical Flow Constraint) Szeliski

  11. Patch Translation [Lucas-Kanade] Assume a single velocity for all pixels within an image patch Minimizing LHS: sum of the 2x2 outer product of the gradient vector Szeliski

  12. Local Patch Analysis • How certain are the motion estimates? Szeliski

  13. The Aperture Problem and Let • Algorithm: At each pixel compute by solving • Mis singular if all gradient vectors point in the same direction • e.g., along an edge • of course, trivially singular if the summation is over a single pixel or there is no texture • i.e., only normal flow is available (aperture problem) • Corners and textured areas are OK Szeliski

  14. SSD Surface – Textured area

  15. SSD Surface -- Edge

  16. SSD – homogeneous area

  17. Iterative Refinement • Estimate velocity at each pixel using one iteration of Lucas and Kanade estimation • Warp one image toward the other using the estimated flow field (easier said than done) • Refine estimate by repeating the process Szeliski

  18. estimate update Initial guess: Estimate: Optical Flow: Iterative Estimation x x0 (usingd for displacement here instead of u) Szeliski

  19. estimate update Initial guess: Estimate: x x0 Optical Flow: Iterative Estimation Szeliski

  20. estimate update Initial guess: Estimate: Initial guess: Estimate: x x0 Optical Flow: Iterative Estimation Szeliski

  21. Optical Flow: Iterative Estimation x x0 Szeliski

  22. Optical Flow: Iterative Estimation • Some Implementation Issues: • Warping is not easy (ensure that errors in warping are smaller than the estimate refinement) • Warp one image, take derivatives of the other so you don’t need to re-compute the gradient after each iteration. • Often useful to low-pass filter the images before motion estimation (for better derivative estimation, and linear approximations to image intensity) Szeliski

  23. actual shift estimated shift Optical Flow: Aliasing Temporal aliasing causes ambiguities in optical flow because images can have many pixels with the same intensity. I.e., how do we know which ‘correspondence’ is correct? nearest match is correct (no aliasing) nearest match is incorrect (aliasing) To overcome aliasing: coarse-to-fine estimation. Szeliski

  24. Limits of the gradient method Fails when intensity structure in window is poor Fails when the displacement is large (typical operating range is motion of 1 pixel) Linearization of brightness is suitable only for small displacements • Also, brightness is not strictly constant in images actually less problematic than it appears, since we can pre-filter images to make them look similar Szeliski

  25. Jw refine warp + u=1.25 pixels u=2.5 pixels u=5 pixels u=10 pixels image J image J image I image I Pyramid of image J Pyramid of image I Coarse-to-Fine Estimation Szeliski

  26. Coarse-to-Fine Estimation I J refine J Jw I warp + I J Jw pyramid construction pyramid construction refine warp + J I Jw refine warp + Szeliski

  27. Spatial Coherence Assumption * Neighboring points in the scene typically belong to the same surface and hence typically have similar motions. * Since they also project to nearby points in the image, we expect spatial coherence in image flow. Black

  28. Formalize this Idea Noisy 1D signal: u x Noisy measurementsu(x) Black

  29. Regularization Find the “best fitting” smoothed function v(x) u v(x) x Noisy measurementsu(x) Black

  30. Membrane model Find the “best fitting” smoothed function v(x) u v(x) x Black

  31. Membrane model Find the “best fitting” smoothed function v(x) u v(x) x Black

  32. Membrane model Find the “best fitting” smoothed function v(x) u v(x) Black

  33. Spatial smoothness assumption Faithful to the data Regularization u v(x) x Minimize: Black

  34. Bayesian Interpretation Black

  35. Discontinuities u v(x) x What about this discontinuity? What is happening here? What can we do? Black

  36. velocity space u2 + + u1 Robust Estimation Noise distributions are often non-Gaussian, having much heavier tails. Noise samples from the tails are called outliers. • Sources of outliers (multiple motions): • specularities / highlights • jpeg artifacts / interlacing / motion blur • multiple motions (occlusion boundaries, transparency) Black

  37. Occlusion occlusion disocclusion shear Multiple motions within a finite region. Black

  38. Coherent Motion Possibly Gaussian. Black

  39. Multiple Motions Definitely not Gaussian. Black

  40. Weak membrane model u v(x) x Black

  41. Analog line process Penalty function Family of quadratics Black

  42. Analog line process Infimum defines a robust error function. Minima are the same: Black

  43. Robust Regularization u v(x) x Treat large spatial derivatives as outliers. Minimize: Black

  44. Problem: Least-squares estimators penalize deviations between data & model with quadratic error fn (extremely sensitive to outliers) error penalty function influence function Redescending error functions (e.g., Geman-McClure) help to reduce the influence of outlying measurements. error penalty function influence function Robust Estimation Black

  45. Outlier with respect to neighbors. Robust formulation of spatial coherence term Optical flow Black

  46. “Dense” Optical Flow Objective function: When r is quadratic = “Horn and Schunck” Black

  47. Optimization T(u)= max of second derivative Black

  48. Optimization • Gradient descent • Coarse-to-fine (pyramid) • Deterministic annealing Black

  49. Example Black

  50. Example Black

More Related