Optical flow and keypoint tracking Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.

Slides:



Advertisements
Similar presentations
Feature Tracking and Optical Flow
Advertisements

Computer Vision Optical Flow
Automatic Image Alignment (direct) : Computational Photography Alexei Efros, CMU, Fall 2006 with a lot of slides stolen from Steve Seitz and Rick.
Motion Estimation I What affects the induced image motion? Camera motion Object motion Scene structure.
Announcements Quiz Thursday Quiz Review Tomorrow: AV Williams 4424, 4pm. Practice Quiz handout.
Optical Flow Methods 2007/8/9.
Today Feature Tracking Structure from Motion on Monday (1/29)
Lecture 9 Optical Flow, Feature Tracking, Normal Flow
Announcements Project1 artifact reminder counts towards your grade Demos this Thursday, 12-2:30 sign up! Extra office hours this week David (T 12-1, W/F.
Feature matching and tracking Class 5 Read Section 4.1 of course notes Read Shi and Tomasi’s paper on.
Optical Flow Brightness Constancy The Aperture problem Regularization Lucas-Kanade Coarse-to-fine Parametric motion models Direct depth SSD tracking.
Announcements Project 1 test the turn-in procedure this week (make sure your folder’s there) grading session next Thursday 2:30-5pm –10 minute slot to.
Caltech, Oct Lihi Zelnik-Manor
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Optical Flow Brightness Constancy The Aperture problem Regularization Lucas-Kanade Coarse-to-fine Parametric motion models Direct depth SSD tracking.
Motion Computing in Image Analysis
Optical Flow Estimation
Lecture 19: Optical flow CS6670: Computer Vision Noah Snavely
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Motion Estimation Today’s Readings Trucco & Verri, 8.3 – 8.4 (skip 8.3.3, read only top half of p. 199) Numerical Recipes (Newton-Raphson), 9.4 (first.
1 Stanford CS223B Computer Vision, Winter 2006 Lecture 7 Optical Flow Professor Sebastian Thrun CAs: Dan Maynes-Aminzade, Mitul Saha, Greg Corrado Slides.
3D Rigid/Nonrigid RegistrationRegistration 1)Known features, correspondences, transformation model – feature basedfeature based 2)Specific motion type,
Matching Compare region of image to region of image. –We talked about this for stereo. –Important for motion. Epipolar constraint unknown. But motion small.
Automatic Image Alignment via Motion Estimation
Where have all the flowers gone? (motion and tracking) Computer Vision COS429 Fall /02 Guest lecture by Andras Ferencz Many slides adapted from.
KLT tracker & triangulation Class 6 Read Shi and Tomasi’s paper on good features to track
Optical Flow Digital Photography CSE558, Spring 2003 Richard Szeliski (notes cribbed from P. Anandan)
Announcements Project1 due Tuesday. Motion Estimation Today’s Readings Trucco & Verri, 8.3 – 8.4 (skip 8.3.3, read only top half of p. 199) Supplemental:
CSCE 641 Computer Graphics: Image Registration Jinxiang Chai.
Computer Vision Optical Flow Marc Pollefeys COMP 256 Some slides and illustrations from L. Van Gool, T. Darell, B. Horn, Y. Weiss, P. Anandan, M. Black,
Motion and optical flow Thursday, Nov 20 Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys, S. Lazebnik.
Optical flow Combination of slides from Rick Szeliski, Steve Seitz, Alyosha Efros and Bill Freeman.
Feature Tracking and Optical Flow
MASKS © 2004 Invitation to 3D vision Lecture 3 Image Primitives andCorrespondence.
CSE 473/573 Computer Vision and Image Processing (CVIP) Ifeoma Nwogu Lecture 19 – Dense motion estimation (OF) 1.
Feature Tracking and Optical Flow Computer Vision ECE 5554 Virginia Tech Devi Parikh 11/12/13 Slides borrowed from Derek Hoiem, who adapted many from Lana.
Optical Flow Donald Tanguay June 12, Outline Description of optical flow General techniques Specific methods –Horn and Schunck (regularization)
Structure from Motion, Feature Tracking, and Optical Flow Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 04/15/10 Many slides adapted.
Motion Segmentation By Hadas Shahar (and John Y.A.Wang, and Edward H. Adelson, and Wikipedia and YouTube) 1.
CSE 185 Introduction to Computer Vision Feature Tracking and Optical Flow.
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Perceptual and Sensory Augmented Computing Computer Vision WS 08/09 Computer Vision – Lecture 18 Motion and Optical Flow Bastian Leibe RWTH.
3D Imaging Motion.
Miguel Tavares Coimbra
Motion Estimation Today’s Readings Trucco & Verri, 8.3 – 8.4 (skip 8.3.3, read only top half of p. 199) Newton's method Wikpedia page
Feature Tracking and Optical Flow Computer Vision ECE 5554, ECE 4984 Virginia Tech Devi Parikh 11/10/15 Slides borrowed from Derek Hoiem, who adapted many.
Lecture 9 Feature Extraction and Motion Estimation Slides by: Michael Black Clark F. Olson Jean Ponce.
Motion Estimation Today’s Readings Trucco & Verri, 8.3 – 8.4 (skip 8.3.3, read only top half of p. 199) Newton's method Wikpedia page
Motion estimation Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2005/4/12 with slides by Michael Black and P. Anandan.
MASKS © 2004 Invitation to 3D vision Lecture 3 Image Primitives andCorrespondence.
Image Motion. The Information from Image Motion 3D motion between observer and scene + structure of the scene –Wallach O’Connell (1953): Kinetic depth.
Motion estimation Parametric motion (image alignment) Tracking Optical flow.
Motion estimation Digital Visual Effects, Spring 2005 Yung-Yu Chuang 2005/3/23 with slides by Michael Black and P. Anandan.
Motion and optical flow
Feature Tracking and Optical Flow
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
CPSC 641: Image Registration
Motion and Optical Flow
Image Primitives and Correspondence
Feature Tracking and Optical Flow
Motion Estimation Today’s Readings
Filtering Things to take away from this lecture An image as a function
Announcements more panorama slots available now
Announcements Questions on the project? New turn-in info online
Coupled Horn-Schunck and Lukas-Kanade for image processing
Announcements more panorama slots available now
23 April 2019.
Optical flow Computer Vision Spring 2019, Lecture 21
Open Topics.
Optical flow and keypoint tracking
Presentation transcript:

Optical flow and keypoint tracking Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys

Motion is a powerful perceptual cue Sometimes, it is the only cue

Motion is a powerful perceptual cue Even “impoverished” motion data can evoke a strong percept G. Johansson, “Visual Perception of Biological Motion and a Model For Its Analysis", Perception and Psychophysics 14, , 1973.

Motion is a powerful perceptual cue Even “impoverished” motion data can evoke a strong percept G. Johansson, “Visual Perception of Biological Motion and a Model For Its Analysis", Perception and Psychophysics 14, , 1973.

Uses of motion in computer vision 3D shape reconstruction Object segmentation Learning and tracking of dynamical models Event and activity recognition

Preview: Structure from motion Given a set of corresponding points in two or more images, compute the camera parameters and the 3D point coordinates R 1,t 1 R 2,t 2 R 3,t 3 ? ? ? ?

Keypoint tracking C. Tomasi and T. Kanade. Shape and motion from image streams under orthography: A factorization method. IJCV, 9(2): , November 1992.Shape and motion from image streams under orthography: A factorization method.

Motion field The motion field is the projection of the 3D scene motion into the image

Optical flow Definition: optical flow is the apparent motion of brightness patterns in the image Ideally, optical flow would be the same as the motion field Have to be careful: apparent motion can be caused by lighting changes without any actual motion Think of a uniform rotating sphere under fixed lighting vs. a stationary sphere under moving illumination

Estimating optical flow Given two subsequent frames, estimate the apparent motion field u(x,y) and v(x,y) between them Key assumptions Brightness constancy: projection of the same point looks the same in every frame Small motion: points do not move very far Spatial coherence: points move like their neighbors I(x,y,t–1)I(x,y,t)I(x,y,t)

Brightness Constancy Equation: Linearizing the right side using Taylor expansion: The brightness constancy constraint I(x,y,t–1)I(x,y,t)I(x,y,t) Hence,

The brightness constancy constraint How many equations and unknowns per pixel? One equation, two unknowns What does this constraint mean? The component of the flow perpendicular to the gradient (i.e., parallel to the edge) is unknown

The brightness constancy constraint How many equations and unknowns per pixel? One equation, two unknowns What does this constraint mean? The component of the flow perpendicular to the gradient (i.e., parallel to the edge) is unknown edge (u,v)(u,v) (u’,v’) gradient (u+u’,v+v’) If (u, v) satisfies the equation, so does (u+u’, v+v’) if

The aperture problem Perceived motion

The aperture problem Actual motion

The barber pole illusion

The barber pole illusion

Solving the aperture problem How to get more equations for a pixel? Spatial coherence constraint: pretend the pixel’s neighbors have the same (u,v) E.g., if we use a 5x5 window, that gives us 25 equations per pixel B. Lucas and T. Kanade. An iterative image registration technique with an application toAn iterative image registration technique with an application to stereo vision.stereo vision. In Proceedings of the International Joint Conference on Artificial Intelligence, pp. 674–679, 1981.

Solving the aperture problem Least squares problem: B. Lucas and T. Kanade. An iterative image registration technique with an application toAn iterative image registration technique with an application to stereo vision.stereo vision. In Proceedings of the International Joint Conference on Artificial Intelligence, pp. 674–679, When is this system solvable? What if the window contains just a single straight edge?

Conditions for solvability “Bad” case: single straight edge

Conditions for solvability “Good” case

Lucas-Kanade flow Linear least squares problem B. Lucas and T. Kanade. An iterative image registration technique with an application toAn iterative image registration technique with an application to stereo vision.stereo vision. In Proceedings of the International Joint Conference on Artificial Intelligence, pp. 674–679, The summations are over all pixels in the window Solution given by

Lucas-Kanade flow Recall the Harris corner detector: M = A T A is the second moment matrix We can figure out whether the system is solvable by looking at the eigenvalues of the second moment matrix The eigenvectors and eigenvalues of M relate to edge direction and magnitude The eigenvector associated with the larger eigenvalue points in the direction of fastest intensity change, and the other eigenvector is orthogonal to it

Recall: second moment matrix 1 2 “Corner” 1 and 2 are large, 1 ~ 2 1 and 2 are small “Edge” 1 >> 2 “Edge” 2 >> 1 “Flat” region Classification of image points using eigenvalues of the second moment matrix:

Uniform region – gradients have small magnitude – small  1, small 2 – system is ill-conditioned

Edge – gradients have one dominant direction – large  1, small 2 – system is ill-conditioned

High-texture or corner region – gradients have different directions, large magnitudes – large  1, large 2 – system is well-conditioned

Example of optical flow estimation * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Example of optical flow estimation * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Multi-resolution estimation * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Multi-resolution estimation * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Errors in Lucas-Kanade The motion is large (larger than a pixel) Coarse-to-fine estimation Iterative refinement Exhaustive neighborhood search (feature matching) A point does not move like its neighbors Motion segmentation Brightness constancy does not hold Exhaustive neighborhood search with normalized correlation

Feature tracking If we have more than two images, we can track a feature from one frame to the next by following the optical flow Challenges Finding good features to track Adding and deleting tracks

Shi-Tomasi feature tracker Find good features using eigenvalues of second- moment matrix Key idea: “good” features to track are the ones whose motion can be estimated reliably From frame to frame, track with Lucas-Kanade This amounts to assuming a translation model for frame-to-frame feature movement Check consistency of tracks by affine registration to the first observed instance of the feature Affine model is more accurate for larger displacements Comparing to the first frame helps to minimize drift J. Shi and C. Tomasi. Good Features to Track. CVPR 1994.Good Features to Track

Tracking example J. Shi and C. Tomasi. Good Features to Track. CVPR 1994.Good Features to Track