Optical flow. Subhransu Maji. CMPSCI 670: Computer Vision. October 20, 2016

Similar documents
Motion estimation. Digital Visual Effects Yung-Yu Chuang. with slides by Michael Black and P. Anandan

Optical Flow, Motion Segmentation, Feature Tracking

Lecture 13: Tracking mo3on features op3cal flow

6.869 Advances in Computer Vision. Prof. Bill Freeman March 1, 2005

Keypoint extraction: Corners Harris Corners Pkwy, Charlotte, NC

Elaborazione delle Immagini Informazione multimediale - Immagini. Raffaella Lanzarotti

Instance-level l recognition. Cordelia Schmid INRIA

INTEREST POINTS AT DIFFERENT SCALES

Computer Vision I. Announcements

Lucas-Kanade Optical Flow. Computer Vision Carnegie Mellon University (Kris Kitani)

Introduction to motion correspondence

Lecture 05 Point Feature Detection and Matching

Feature extraction: Corners and blobs

Feature extraction: Corners and blobs

Instance-level recognition: Local invariant features. Cordelia Schmid INRIA, Grenoble

Instance-level recognition: Local invariant features. Cordelia Schmid INRIA, Grenoble

Lecture 8: Interest Point Detection. Saad J Bedros

Camera calibration. Outline. Pinhole camera. Camera projection models. Nonlinear least square methods A camera calibration tool

Interest Operators. All lectures are from posted research papers. Harris Corner Detector: the first and most basic interest operator

Recap: edge detection. Source: D. Lowe, L. Fei-Fei

Corners, Blobs & Descriptors. With slides from S. Lazebnik & S. Seitz, D. Lowe, A. Efros

Motion Estimation (I) Ce Liu Microsoft Research New England

CS4495/6495 Introduction to Computer Vision. 6B-L1 Dense flow: Brightness constraint

Iterative Image Registration: Lucas & Kanade Revisited. Kentaro Toyama Vision Technology Group Microsoft Research

Edges and Scale. Image Features. Detecting edges. Origin of Edges. Solution: smooth first. Effects of noise

Perception III: Filtering, Edges, and Point-features

Instance-level recognition: Local invariant features. Cordelia Schmid INRIA, Grenoble

Lecture 8: Interest Point Detection. Saad J Bedros

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Optical Flow, KLT Feature Tracker.

Advances in Computer Vision. Prof. Bill Freeman. Image and shape descriptors. Readings: Mikolajczyk and Schmid; Belongie et al.

Image Alignment and Mosaicing

Instance-level l recognition. Cordelia Schmid & Josef Sivic INRIA

Announcements. Tracking. Comptuer Vision I. The Motion Field. = ω. Pure Translation. Motion Field Equation. Rigid Motion: General Case

CS9840 Learning and Computer Vision Prof. Olga Veksler. Lecture 2. Some Concepts from Computer Vision Curse of Dimensionality PCA

CS 664 Segmentation (2) Daniel Huttenlocher

Scale & Affine Invariant Interest Point Detectors

Image Analysis. Feature extraction: corners and blobs

Video and Motion Analysis Computer Vision Carnegie Mellon University (Kris Kitani)

Methods in Computer Vision: Introduction to Optical Flow

2D Geometric Transformations. (Chapter 5 in FVD)

Motion Estimation (I)

Corner detection: the basic idea

Image Alignment and Mosaicing Feature Tracking and the Kalman Filter

Shai Avidan Tel Aviv University

CS376 Computer Vision Lecture 6: Optical Flow

* h + = Lec 05: Interesting Points Detection. Image Analysis & Retrieval. Outline. Image Filtering. Recap of Lec 04 Image Filtering Edge Features

CS 3710: Visual Recognition Describing Images with Features. Adriana Kovashka Department of Computer Science January 8, 2015

CS4670: Computer Vision Kavita Bala. Lecture 7: Harris Corner Detec=on

Optical flow. Visual motion. Motion and perceptual organization. Motion and perceptual organization. Subhransu Maji. CMPSCI 670: Computer Vision

LESSON 35: EIGENVALUES AND EIGENVECTORS APRIL 21, (1) We might also write v as v. Both notations refer to a vector.

CS5670: Computer Vision

Robustifying the Flock of Trackers

Visual motion. Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys

Covariance Tracking Algorithm on Bilateral Filtering under Lie Group Structure Yinghong Xie 1,2,a Chengdong Wu 1,b

Do We Really Have to Consider Covariance Matrices for Image Feature Points?

CS 378: Computer Game Technology

Mathematics 309 Conic sections and their applicationsn. Chapter 2. Quadric figures. ai,j x i x j + b i x i + c =0. 1. Coordinate changes

Unit 12 Study Notes 1 Systems of Equations

An Axiomatic Approach to Corner Detection

Blobs & Scale Invariance

Invariant local features. Invariant Local Features. Classes of transformations. (Good) invariant local features. Case study: panorama stitching

15. Eigenvalues, Eigenvectors

An Adaptive Confidence Measure for Optical Flows Based on Linear Subspace Projections

Robust Motion Segmentation by Spectral Clustering

Maximally Stable Local Description for Scale Selection

14.1 Systems of Linear Equations in Two Variables

Vlad Estivill-Castro (2016) Robots for People --- A project for intelligent integrated systems

CS 231A Section 1: Linear Algebra & Probability Review

CS 231A Section 1: Linear Algebra & Probability Review. Kevin Tang

Robert Collins CSE486, Penn State. Lecture 25: Structure from Motion

Course Requirements. Course Mechanics. Projects & Exams. Homework. Week 1. Introduction. Fast Multipole Methods: Fundamentals & Applications

x y plane is the plane in which the stresses act, yy xy xy Figure 3.5.1: non-zero stress components acting in the x y plane

Lecture 6: Finding Features (part 1/2)

Lecture 12. Local Feature Detection. Matching with Invariant Features. Why extract features? Why extract features? Why extract features?

Lecture: Face Recognition

CSE 473/573 Computer Vision and Image Processing (CVIP)

Scale & Affine Invariant Interest Point Detectors

Nonlinear Diffusion. 1 Introduction: Motivation for non-standard diffusion

9.1 VECTORS. A Geometric View of Vectors LEARNING OBJECTIVES. = a, b

1 HOMOGENEOUS TRANSFORMATIONS

Feature detectors and descriptors. Fei-Fei Li

Image Processing 1 (IP1) Bildverarbeitung 1

Reading. 4. Affine transformations. Required: Watt, Section 1.1. Further reading:

Wavelets bases in higher dimensions

MATRIX TRANSFORMATIONS

INF Introduction to classifiction Anne Solberg Based on Chapter 2 ( ) in Duda and Hart: Pattern Classification

5. Nonholonomic constraint Mechanics of Manipulation

Affine transformations

TRACKING and DETECTION in COMPUTER VISION

VECTORS IN THREE DIMENSIONS

Affine transformations. Brian Curless CSE 557 Fall 2014

Extract useful building blocks: blobs. the same image like for the corners

CSCI 250: Intro to Robotics. Spring Term 2017 Prof. Levy. Computer Vision: A Brief Survey

Feature detectors and descriptors. Fei-Fei Li

Blob Detection CSC 767

1 Kernel methods & optimization

Interest Point Detection. Lecture-4

Computer Vision Motion

Transcription:

Optical flow Subhransu Maji CMPSC 670: Computer Vision October 20, 2016

Visual motion Man slides adapted from S. Seitz, R. Szeliski, M. Pollefes CMPSC 670 2

Motion and perceptual organization Sometimes, motion is the onl cue CMPSC 670 3

Motion and perceptual organization Sometimes, motion is the onl cue CMPSC 670 4

Motion and perceptual organization Even impoverished motion data can evoke a strong percept G. Johansson, Visual Perception of Biological Motion and a Model For ts Analsis", Perception and Pschophsics 14, 201-211, 1973. CMPSC 670 5

Uses of motion Segmenting objects based on motion cues Estimating the 3D structure Learning and tracking dnamical models Recognizing events and activities CMPSC 670 6

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

Optical flow Definition: optical flow is the apparent motion of brightness patterns in the image deall, optical flow would be the same as the motion field Have to be careful: apparent motion can be caused b lighting changes without an actual motion Think of a uniform rotating sphere under fied lighting vs. a stationar sphere under moving illumination CMPSC 670 8

Estimating optical flow Given two subsequent frames, estimate the apparent motion field u, and v, between them,,t 1,,t Ke assumptions Brightness constanc: projection of the same point looks the same in ever frame Small motion: points do not move ver far Spatial coherence: points move like their neighbors CMPSC 670 9

The brightness constanc constraint,,t 1,,t Brightness Constanc Equation:,, t 1 = + u,, + v,, t Linearizing the right side using Talor epansion:,, t 1,, t + u, v, + Hence, u + v + t 0 CMPSC 670 10

The brightness constanc constraint - How man equations and unknowns per piel? One equation, two unknowns u + v + t = 0 What does this constraint mean? u, v + = The component of the flow perpendicular to the gradient i.e., parallel to the edge is unknown t 0 CMPSC 670 11

The brightness constanc constraint - How man equations and unknowns per piel? One equation, two unknowns u + v + t = 0 What does this constraint mean? u, v + = The component of the flow perpendicular to the gradient i.e., parallel to the edge is unknown t 0 f u, v satisfies the equation, so does u+u, v+v if u', v' = 0 gradient u,v u,v u+u,v+v CMPSC 670 edge 12

The aperture problem Perceived motion

The aperture problem Actual motion

The aperture problem What direction is the motion?

The barber pole illusion http://en.wikipedia.org/wiki/barberpole_illusion

CMPSC 670 How to get more equations for a piel? Spatial coherence constraint: pretend the piel s neighbors have the same u,v E.g., if we use a 55 window, that gives us 25 equations per piel Solving the aperture problem 17 B. Lucas and T. Kanade. An iterative image registration technique with an application to stereo vision. n Proceedings of the nternational Joint Conference on Artificial ntelligence, pp. 674 679, 1981. 0 ], [ = + i i t v u " # % & = " # % & " # % & 2 1 2 2 1 1 n t t t n n v u

CMPSC 670 Least squares problem: Solving the aperture problem 18 B. Lucas and T. Kanade. An iterative image registration technique with an application to stereo vision. n Proceedings of the nternational Joint Conference on Artificial ntelligence, pp. 674 679, 1981. When is this sstem solvable? What if the window contains just a single straight edge? " # % & = " # % & " # % & 2 1 2 2 1 1 n t t t n n v u

Conditions for solvabilit Bad case: single straight edge CMPSC 670 19

Conditions for solvabilit Good case: corner CMPSC 670 20

CMPSC 670 Linear least squares problem Lucas-Kanade flow 21 B. Lucas and T. Kanade. An iterative image registration technique with an application to stereo vision. n Proceedings of the nternational Joint Conference on Artificial ntelligence, pp. 674 679, 1981. The summations are over all piels in the window Solution given b " # % & = " # % & " # % & 2 1 2 2 1 1 n t t t n n v u 1 1 2 2 = n n b A d b A Ad A T T = " # % & = " # % & " # % & t t v u

Lucas-Kanade flow & % #& u# "% v" & = % t t # " Recall the Harris corner detector: M = A T A is the second moment matri We can figure out whether the sstem is solvable b looking at the eigenvalues of the second moment matri 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 intensit change, and the other eigenvector is orthogonal to it CMPSC 670 22

Visualization of second moment matrices CMPSC 670 23

Visualization of second moment matrices CMPSC 670 24

nterpreting the eigenvalues Classification of image points using eigenvalues of the second moment matri: λ 2 Edge λ 2 >> λ 1 Corner λ 1 and λ 2 are large, λ 1 ~ λ 2 λ 1 and λ 2 are small Flat Edge region λ 1 >> λ 2 CMPSC 670 λ 1 25

Eample CMPSC 670 Subhransu Maji UMass, * From Fall Khurram 16 Hassan-Shafique CAP5415 Computer Vision 2003 26

Uniform region gradients have small magnitude small λ 1, small λ 2 sstem is ill-conditioned CMPSC 670 27

Edge CMPSC 670 gradients have one dominant direction large λ 1, small λ 2 sstem is ill-conditioned 28

High-teture or corner region gradients have different directions, large magnitudes large λ 1, large λ 2 sstem is well-conditioned CMPSC 670 29

Optical Flow Results CMPSC 670 * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003 30

Errors in Lucas-Kanade The motion is large larger than a piel terative refinement Coarse-to-fine estimation Ehaustive neighborhood search feature matching A point does not move like its neighbors Motion segmentation Brightness constanc does not hold Ehaustive neighborhood search with normalized correlation CMPSC 670 31

Multi-resolution registration CMPSC 670 * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003 32

Optical flow results CMPSC 670 * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003 33

Optical flow results CMPSC 670 * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003 34

State-of-the-art optical flow Start with something similar to Lucas-Kanade + gradient constanc + energ minimization with smoothing term + region matching + kepoint matching long-range Region-based +Piel-based +Kepoint-based Large displacement optical flow, Bro et al., CVPR 2009 CMPSC 670 Source: J. Has35

State-of-the-art optical flow Epic Flow: Feature matching + edge preserving flow interpolation EpicFlow: Edge-Preserving nterpolation of Correspondences for Optical Flow, Jerome Revaud, Philippe Weinzaepfel, Zaid Harchaoui and Cordelia Schmid, CVPR 2015. CMPSC 670 36

Feature tracking So far, we have onl considered optical flow estimation in a pair of images f we have more than two images, we can compute the optical flow from each frame to the net Given a point in the first image, we can in principle reconstruct its path b simpl following the arrows t t+1 t+2 CMPSC 670 37

Tracking challenges Ambiguit of optical flow Need to find good features to track Large motions, changes in appearance, occlusions, disocclusions Need mechanism for deleting, adding new features Drift errors ma accumulate over time Need to know when to terminate a track CMPSC 670 38

Shi-Tomasi feature tracker Find good features using eigenvalues of second-moment matri Ke idea: good features to track are the ones whose motion can be estimated reliabl From frame to frame, track with Lucas-Kanade This amounts to assuming a translation model for frame-to-frame feature movement Check consistenc of tracks b 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. CMPSC 670 39

Tracking eample CMPSC 670 J. Shi and C. Tomasi. Good Features to Track. CVPR 1994. 40

Tracking b matching CMPSC 670 41

Tracking eample CMPSC 670 https://www.outube.com/watch?v=rg5uv_h50b0 42