Motion and Optical Flow. Moving to Multiple Images So far, we’ve looked at processing a single imageSo far, we’ve looked at processing a single image.

Slides:



Advertisements
Similar presentations
Feature extraction: Corners
Advertisements

Computer Vision Optical Flow
3D Computer Vision and Video Computing 3D Vision Topic 4 of Part II Visual Motion CSc I6716 Fall 2011 Cover Image/video credits: Rick Szeliski, MSR Zhigang.
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.
Feature tracking. Identify features and track them over video –Small difference between frames –potential large difference overall Standard approach:
Announcements Quiz Thursday Quiz Review Tomorrow: AV Williams 4424, 4pm. Practice Quiz handout.
Optical Flow Methods 2007/8/9.
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.
Computing motion between images
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.
Optical flow and Tracking CISC 649/849 Spring 2009 University of Delaware.
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
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.
COMP 290 Computer Vision - Spring Motion II - Estimation of Motion field / 3-D construction from motion Yongjik Kim.
Image Primitives and Correspondence
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 (feature-based) : Computational Photography Alexei Efros, CMU, Fall 2006 with a lot of slides stolen from Steve Seitz and.
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:
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.
MASKS © 2004 Invitation to 3D vision Lecture 3 Image Primitives andCorrespondence.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
CSSE463: Image Recognition Day 30 This week This week Today: motion vectors and tracking Today: motion vectors and tracking Friday: Project workday. First.
1 Interest Operators Harris Corner Detector: the first and most basic interest operator Kadir Entropy Detector and its use in object recognition SIFT interest.
Optical Flow Donald Tanguay June 12, Outline Description of optical flow General techniques Specific methods –Horn and Schunck (regularization)
The Brightness Constraint
The Measurement of Visual Motion P. Anandan Microsoft Research.
EECS 274 Computer Vision Motion Estimation.
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Uses of Motion 3D shape reconstruction Segment objects based on motion cues Recognize events and activities Improve video quality Track objects Correct.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm Lecture #16.
Effective Optical Flow Estimation
Feature extraction: Corners 9300 Harris Corners Pkwy, Charlotte, NC.
3D Imaging Motion.
Optical Flow. Distribution of apparent velocities of movement of brightness pattern in an image.
1 Motion Analysis using Optical flow CIS601 Longin Jan Latecki Fall 2003 CIS Dept of Temple University.
Segmentation of Vehicles in Traffic Video Tun-Yu Chiang Wilson Lau.
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 I What affects the induced image motion?
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 / Optical Flow II Estimation of Motion Field Avneesh Sud.
Motion estimation Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2005/4/12 with slides by Michael Black and P. Anandan.
Optical flow and keypoint tracking Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
MASKS © 2004 Invitation to 3D vision Lecture 3 Image Primitives andCorrespondence.
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
The Brightness Constraint
Image Primitives and Correspondence
The Brightness Constraint
The Brightness Constraint
CSE 455 – Guest Lectures 3 lectures Contact Interest points 1
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
Filtering An image as a function Digital vs. continuous images
Optical flow and keypoint tracking
Presentation transcript:

Motion and Optical Flow

Moving to Multiple Images So far, we’ve looked at processing a single imageSo far, we’ve looked at processing a single image Multiple imagesMultiple images – Multiple cameras at one time: stereo – Single camera at many times: video – (Multiple cameras at multiple times)

Applications of Multiple Images 2D2D – Feature / object tracking – Segmentation based on motion 3D3D – Shape extraction – Motion capture

Applications of Multiple Images in Graphics Stitching images into panoramasStitching images into panoramas Automatic image morphingAutomatic image morphing Reconstruction of 3D models for renderingReconstruction of 3D models for rendering Capturing articulated motion for animationCapturing articulated motion for animation

Applications of Multiple Images in Biological Systems Shape inferenceShape inference Peripheral sensitivity to motionPeripheral sensitivity to motion Looming field – obstacle avoidanceLooming field – obstacle avoidance Very similar applications in roboticsVery similar applications in robotics

Looming Field Pure translation: motion looks like it originates at a point – focus of expansionPure translation: motion looks like it originates at a point – focus of expansion

Key Problem Main problem in most multiple-image methods: correspondenceMain problem in most multiple-image methods: correspondence

Correspondence Small displacementsSmall displacements – Differential algorithms – Based on gradients in space and time – Dense correspondence estimates – Most common with video Large displacementsLarge displacements – Matching algorithms – Based on correlation or features – Sparse correspondence estimates – Most common with multiple cameras / stereo

Result of Correspondence For points in image i displacements to corresponding locations in image jFor points in image i displacements to corresponding locations in image j In stereo, usually called disparityIn stereo, usually called disparity In video, usually called motion fieldIn video, usually called motion field

Computing Motion Field Basic idea: a small portion of the image (“local neighborhood”) shifts positionBasic idea: a small portion of the image (“local neighborhood”) shifts position AssumptionsAssumptions – No / small changes in reflected light – No / small changes in scale – No occlusion or disocclusion – Neighborhood is correct size: aperture problem

Actual and Apparent Motion If these assumptions violated, can still use the same methods – apparent motionIf these assumptions violated, can still use the same methods – apparent motion Result of algorithm is optical flow (vs. ideal motion field)Result of algorithm is optical flow (vs. ideal motion field) Most obvious effects:Most obvious effects: – Aperture problem: can only get motion perpendicular to edges – Errors near discontinuities (occlusions)

Computing Optical Flow: Preliminaries Image sequence I(x,y,t)Image sequence I(x,y,t) Uniform discretization along x,y,t – “cube” of dataUniform discretization along x,y,t – “cube” of data Differential framework: compute partial derivatives along x,y,t by convolving with derivative of GaussianDifferential framework: compute partial derivatives along x,y,t by convolving with derivative of Gaussian

Computing Optical Flow: Image Brightness Constancy Basic idea: a small portion of the image (“local neighborhood”) shifts positionBasic idea: a small portion of the image (“local neighborhood”) shifts position Brightness constancy assumptionBrightness constancy assumption

Computing Optical Flow: Image Brightness Constancy This does not say that the image remains the same brightness!This does not say that the image remains the same brightness! vs. : total vs. partial derivative vs. : total vs. partial derivative Use chain ruleUse chain rule

Computing Optical Flow: Image Brightness Constancy Given optical flow v(x,y)Given optical flow v(x,y) Image brightness constancy equation

Computing Optical Flow: Discretization Look at some neighborhood N:Look at some neighborhood N:

Computing Optical Flow: Least Squares In general, overconstrained linear systemIn general, overconstrained linear system Solve by least squaresSolve by least squares

Computing Optical Flow: Stability Has a solution unless C = A T A is singularHas a solution unless C = A T A is singular

Computing Optical Flow: Stability Where have we encountered C before?Where have we encountered C before? Corner detector!Corner detector! C is singular if intensity is constant or if there’s an edgeC is singular if intensity is constant or if there’s an edge Use eigenvalues of C:Use eigenvalues of C: – to evaluate stability of optical flow computation – to find good places to compute optical flow (finding good features to track)

Computing Optical Flow: Improvements Assumption that optical flow is constant over neighborhood not always goodAssumption that optical flow is constant over neighborhood not always good Decreasing size of neighborhood  C more likely to be singularDecreasing size of neighborhood  C more likely to be singular Alternative: weighted least-squaresAlternative: weighted least-squares – Points near center = higher weight – Still use larger neighborhood

Computing Optical Flow: Weighted Least Squares Let W be a matrix of weightsLet W be a matrix of weights

Computing Optical Flow: Improvements What if windows are still bigger?What if windows are still bigger? Adjust motion model: no longer constant within a windowAdjust motion model: no longer constant within a window Popular choice: affine modelPopular choice: affine model

Computing Optical Flow: Affine Motion Model Translational modelTranslational model Affine modelAffine model

Computing Optical Flow: Improvements Larger motion: how to maintain “differential” approximation?Larger motion: how to maintain “differential” approximation? Solution: iterateSolution: iterate Even better: adjust window / smoothingEven better: adjust window / smoothing – Early iterations: use larger Gaussians to allow more motion – Late iterations: use less blur to find exact solution, lock on to high-frequency detail

Computing Optical Flow: Lucas-Kanade Iterative algorithm:Iterative algorithm: 1. Set  = large (e.g. 3 pixels) 2. Set I’  I 1 3. Set v  0 4. Repeat while SSD(I’, I 2 ) >  1.v += Optical flow(I’  I 2 ) 2.I’  Warp(I 1, v) 5. After n iterations, set  = small (e.g. 1.5 pixels)

Computing Optical Flow: Lucas-Kanade I’ always holds warped version of I 1I’ always holds warped version of I 1 – Best estimate of I 2 Gradually reduce thresholdsGradually reduce thresholds Stop when difference between I’ and I 2 smallStop when difference between I’ and I 2 small – Simplest difference metric = sum of squared differences (SSD) between pixels

Optical Flow Applications [Feng & Perona] Video Frames

Optical Flow Applications Optical Flow Depth Reconstruction [Feng & Perona]

Optical Flow Applications Obstacle Detection: Unbalanced Optical Flow Temizer

Optical Flow Applications Collision avoidance: keep optical flow balanced between sides of image Temizer