Dense Image-based Motion Estimation Algorithms & Optical Flow

Similar documents
CS 4495 Computer Vision Motion and Optic Flow

EE795: Computer Vision and Intelligent Systems

EE795: Computer Vision and Intelligent Systems

CS6670: Computer Vision

Peripheral drift illusion

Lucas-Kanade Motion Estimation. Thanks to Steve Seitz, Simon Baker, Takeo Kanade, and anyone else who helped develop these slides.

Feature Tracking and Optical Flow

Multi-stable Perception. Necker Cube

Lecture 16: Computer Vision

Lecture 16: Computer Vision

Feature Tracking and Optical Flow

Optical Flow-Based Motion Estimation. Thanks to Steve Seitz, Simon Baker, Takeo Kanade, and anyone else who helped develop these slides.

Finally: Motion and tracking. Motion 4/20/2011. CS 376 Lecture 24 Motion 1. Video. Uses of motion. Motion parallax. Motion field

Motion. 1 Introduction. 2 Optical Flow. Sohaib A Khan. 2.1 Brightness Constancy Equation

VC 11/12 T11 Optical Flow

Matching. Compare region of image to region of image. Today, simplest kind of matching. Intensities similar.

Mariya Zhariy. Uttendorf Introduction to Optical Flow. Mariya Zhariy. Introduction. Determining. Optical Flow. Results. Motivation Definition

Overview. Video. Overview 4/7/2008. Optical flow. Why estimate motion? Motion estimation: Optical flow. Motion Magnification Colorization.

Motion estimation. Lihi Zelnik-Manor

Autonomous Navigation for Flying Robots

Ninio, J. and Stevens, K. A. (2000) Variations on the Hermann grid: an extinction illusion. Perception, 29,

Motion and Optical Flow. Slides from Ce Liu, Steve Seitz, Larry Zitnick, Ali Farhadi

Computer Vision Lecture 20

Motion and Tracking. Andrea Torsello DAIS Università Ca Foscari via Torino 155, Mestre (VE)

Optical flow and tracking

Automatic Image Alignment (direct) with a lot of slides stolen from Steve Seitz and Rick Szeliski

Computer Vision Lecture 20

Motion Estimation. There are three main types (or applications) of motion estimation:

Capturing, Modeling, Rendering 3D Structures

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

Displacement estimation

Fundamental matrix. Let p be a point in left image, p in right image. Epipolar relation. Epipolar mapping described by a 3x3 matrix F

Visual Tracking (1) Tracking of Feature Points and Planar Rigid Objects

Comparison between Motion Analysis and Stereo

Image processing and features

Optic Flow and Basics Towards Horn-Schunck 1

CS-465 Computer Vision

Lecture 19: Motion. Effect of window size 11/20/2007. Sources of error in correspondences. Review Problem set 3. Tuesday, Nov 20

Visual Tracking (1) Feature Point Tracking and Block Matching

CS664 Lecture #18: Motion

Optical Flow CS 637. Fuxin Li. With materials from Kristen Grauman, Richard Szeliski, S. Narasimhan, Deqing Sun

EECS 556 Image Processing W 09

CS 565 Computer Vision. Nazar Khan PUCIT Lectures 15 and 16: Optic Flow

Chapter 3 Image Registration. Chapter 3 Image Registration

Visual Tracking. Image Processing Laboratory Dipartimento di Matematica e Informatica Università degli studi di Catania.

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

Motion detection Computing image motion Motion estimation Egomotion and structure from motion Motion classification

SE 263 R. Venkatesh Babu. Object Tracking. R. Venkatesh Babu

CS201: Computer Vision Introduction to Tracking

ELEC Dr Reji Mathew Electrical Engineering UNSW

Spatial track: motion modeling

Ruch (Motion) Rozpoznawanie Obrazów Krzysztof Krawiec Instytut Informatyki, Politechnika Poznańska. Krzysztof Krawiec IDSS

Leow Wee Kheng CS4243 Computer Vision and Pattern Recognition. Motion Tracking. CS4243 Motion Tracking 1

Visual Tracking. Antonino Furnari. Image Processing Lab Dipartimento di Matematica e Informatica Università degli Studi di Catania

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Selim Aksoy

Lecture 20: Tracking. Tuesday, Nov 27

Multimedia Systems Video II (Video Coding) Mahdi Amiri April 2012 Sharif University of Technology

Motion detection Computing image motion Motion estimation Egomotion and structure from motion Motion classification. Time-varying image analysis- 1

Horn-Schunck and Lucas Kanade 1

SURVEY OF LOCAL AND GLOBAL OPTICAL FLOW WITH COARSE TO FINE METHOD

Computer Vision Lecture 20

Computer Vision I - Basics of Image Processing Part 2

Computational Optical Imaging - Optique Numerique. -- Single and Multiple View Geometry, Stereo matching --

Local Feature Detectors

Computer Vision I - Filtering and Feature detection

Optical Flow Estimation

Computer Vision for HCI. Motion. Motion

Particle Tracking. For Bulk Material Handling Systems Using DEM Models. By: Jordan Pease

ECE Digital Image Processing and Introduction to Computer Vision

Marcel Worring Intelligent Sensory Information Systems

Visual Tracking (1) Pixel-intensity-based methods

Representing Moving Images with Layers. J. Y. Wang and E. H. Adelson MIT Media Lab

Optic Flow and Motion Detection

Comparison Between The Optical Flow Computational Techniques

CSE 252A Computer Vision Homework 3 Instructor: Ben Ochoa Due : Monday, November 21, 2016, 11:59 PM

Robert Collins CSE598G. Intro to Template Matching and the Lucas-Kanade Method

Image Stitching. Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi

Spatial track: motion modeling

Optical flow. Cordelia Schmid

Augmented Reality VU. Computer Vision 3D Registration (2) Prof. Vincent Lepetit

Video Alignment. Literature Survey. Spring 2005 Prof. Brian Evans Multidimensional Digital Signal Processing Project The University of Texas at Austin

Outline 7/2/201011/6/

Fi#ng & Matching Region Representa3on Image Alignment, Op3cal Flow

Optical flow. Cordelia Schmid

CS4495 Fall 2014 Computer Vision Problem Set 5: Optic Flow

Normalized cuts and image segmentation

Using Subspace Constraints to Improve Feature Tracking Presented by Bryan Poling. Based on work by Bryan Poling, Gilad Lerman, and Arthur Szlam

EE 264: Image Processing and Reconstruction. Image Motion Estimation I. EE 264: Image Processing and Reconstruction. Outline

Tracking Computer Vision Spring 2018, Lecture 24

Final Exam Study Guide CSE/EE 486 Fall 2007

Computer Vision I. Announcements. Fourier Tansform. Efficient Implementation. Edge and Corner Detection. CSE252A Lecture 13.

Midterm Exam Solutions

CS5670: Computer Vision

Notes 9: Optical Flow

Computer Vision 2. SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung. Computer Vision 2 Dr. Benjamin Guthier

Face Tracking : An implementation of the Kanade-Lucas-Tomasi Tracking algorithm

3D Photography. Marc Pollefeys, Torsten Sattler. Spring 2015

Announcements. Computer Vision I. Motion Field Equation. Revisiting the small motion assumption. Visual Tracking. CSE252A Lecture 19.

Comparison between Optical Flow and Cross-Correlation Methods for Extraction of Velocity Fields from Particle Images

Wikipedia - Mysid

Transcription:

Dense mage-based Motion Estimation Algorithms & Optical Flow

Video A video is a sequence of frames captured at different times The video data is a function of v time (t) v space (x,y)

ntroduction to motion estimation Given a video sequence of moving objects or camera, what information can we extract? How is the camera moving? How many moving objects exist? What is the direction of each moving object? How fast is object moving? f we could get the answer of these questions we can interpret the scene better.

Applications Background Subtraction v a stationary camera is observing the scene v Goal: Separate the static background from the moving foreground

Applications Motion Segmentation Segment the video to the moving objects with different motions

Other Applications Estimating 3D structure Segmenting objects based on motion cues Recognizing events and activities mproving video quality (motion stabilization)

mage Alignment Alignment between two images or image patches template image image 0( x) discrete pixel locations { x = ( x, y )} i i i ( x) 1 { x i =( x i, y i )}

Motion Estimation To estimate motion between two or more images: Error Metric v Measuring the similarity/dissimilarity between images Search Technique v Full search (Simple but too slow) v Hierarchical coarse-to-fine methods based on image pyramids Optical Flow v Multiple independent motions

Translational Alignment Sum of Squared Differences [ ] 2 2 E ( u) = ( x + u) ( x ) = e SSD 1 i 0 i i i i v u=(u,v) : displacement vector v e i = 1 ( x i +u) 0 ( x i ) :the residual error Displaced Frame Difference ( Video Coding)

Translational Alignment [ ] 2 2 E ( u) = ( x + u) ( x ) = e SSD 1 i 0 i i i i

Robust Error Metrics E ( u) = ρ( ( x + u) ( x )) = ρ( e) SRD 1 i 0 i i i i Grows less quickly than the quadratic penalty associated with least squares E ( u) = ( x + u) ( x ) = e SAD 1 i 0 i i i i

Robust Error Metrics 2 x ρ GM ( x) = 1 + x / a 2 2 a: constant that can be thought of as an outlier threshold

Spatially Varying Weights [ ] 2 E ( u) = ω ( x ) ω ( x + u) ( x + u) ( x ) WSSD 0 i 1 i 1 i 0 i i Weighted (or Windowed) SSD function

Windowed SSD n case of a large range of motion: v The above metric has bias toward smaller overlapping solutions A + = ω0( xi) ω1( xi u) Overlapping Area i v Ton counteract this bias: RMS = E / A : per pixel squared pixel error WSSD

Bias and Gain (Exposure Differences) O#en the two images being aligned were not taken with the same exposure. Simple model of intensity varia<ons: α is the gain β is the bias ( x+u) = (1 + α) ( x) + β 1 0

Bias and Gain Least squares with bias and gain Performing a linear regression Color image [ α β] [ α β ] 2 2 = + = + E ( u) ( x +u) (1 ) ( x ) ( x ) e BG 1 i 0 i 0 i i i i Estimate bias and gain for each color channel Bias and gain compensation is also used in video codecs, known as Weighted Prediction.

Correlation Cross-Correlation Alternative to taking intensity difference Maximize the product of two aligned images E ( u) = ( x ) ( x + u) CC 0 i 1 i i s Bias and Gain modeling unnecessary? Bright patch exists in images

Normalized Cross-Correlation E NCC where ( u) = i i 0 i 0 1 i 1 2 2 0 i 0 1 i 1 i 0 0 N i 1 1 N i ( x ) ( x + u) ( x ) ( x + u) 1 = ( x ) and 1 = ( x + u) i i NCC in [-1,1] Works well when matching images taken with different exposure Degrades for noisy low-contrast regions (Zero variance)

Hierarchical Motion Estimation How can we find its minimum? Full search over some range of shifts Often used for block matching in motion compensated video compression Simple to implement but slow To accelerate the search process Hierarchical motion estimation

Hierarchical Motion Estimation Steps Construct image pyramid Full search over the range At coarser levels, search over a smaller number of discrete pixels The motion estimation from one level is used to initialize a smaller local search at next finer level Not guaranteed to produce the same results as a full search, but works almost as well and much faster u=1.25 pixels u=2.5 pixels u=5 pixels 2 l [ SS, ] 2 u=10 pixels image H Gaussian pyramid of image H image Gaussian pyramid of image

Optical Flow The most general and challenging version of motion estimation Computing an independent estimate of motion at each pixel of the image

Optical Flow Field

Problem Definition : Optical Flow How to estimate pixel motion from image H to image? Solve pixel correspondence problem given a pixel in H, look for nearby pixels of the same color in

Problem Definition Key assumptions v color constancy: a point in H looks the same in For grayscale images, this is brightness constancy v small motion: points do not move very far This is called the optical flow problem

Optical Flow Constraints (gray scale images) Let s look at these constraints more closely brightness constancy: Q: what s the equation? H(x, y) = (x+u, y+v) small motion: (u and v are less than 1 pixel) suppose we take the Taylor series expansion of :

Combining Equations What is t? The time derivative of the image at (x,y) How do we calculate it? The x-component of the gradient vector.

Optical Flow Equation Problem 1: Q: how many unknowns and equations per pixel? 1 equation, but 2 unknowns (u and v)

Problem 2: The Aperture Problem For points on a line of fixed intensity we can only recover the normal flow Time t Time t+dt? Where did the blue point move to? We need additional constraints

Use Local nformation Sometimes enlarging the aperture can help

Local smoothness Lucas Kanade (1984) t y x v u = + [ ] t y x v u = assume locally constant motion v pretend the pixel s neighbors have the same (u,v) ü f we use a 5x5 window, that gives us 25 equations per pixel! =!! 2 1 2 2 1 1 t t y x y x v u A = b u!

Lucas Kanade (1984) Goal: Minimize! Au b 2 Method: Least-Squares A u! = b A T A u! = 2x2 2x1 A T b 2x1! u = ( T ) 1 T A A A b

How does Lucas-Kanade behave? ( ) b A A A T T 1 u =! = 2 2 y y x y x x T A A We want this matrix to be invertible. i.e., no zero eigenvalues

How does Lucas-Kanade behave? Edge è A T A becomes singular ( ) y, x ( ) x, y x 2 x y x y 2 y x y = 0 0 x y is eigenvector with eigenvalue 0

How does Lucas- Kanade behave? Homogeneous è è 0 eigenvalues A T A 0 ( ) 0, x y = 2 2 y y x y x x T A A

How does Lucas-Kanade behave? Textured regions è two high eigenvalues ( ) 0, x y

How does Lucas-Kanade behave? Edge è A T A becomes singular Homogeneous regions è low gradients High texture è A T A 0

When does it break? Homogeneous objects generate zero optical flow. Fixed sphere. Changing light source. Non-rigid texture motion

Other break-downs Brightness constancy is not satisfied Correlation based methods A point does not move like its neighbors what is the ideal window size? Regularization based methods The motion is not small (Taylor expansion doesn t hold) Use multi-scale estimation

Multi-Scale Flow Estimation u=1.25 pixels u=2.5 pixels u=5 pixels image t-1 u=10 pixels image t+1 Gaussian pyramid of image t Gaussian pyramid of image t+1

Multi-Scale Flow Estimation run Lucas-Kanade warp & upsample run Lucas-Kanade... image t-1 image t+1 Gaussian pyramid of image t Gaussian pyramid of image t+1

Examples: Motion Based Segmentation nput Segmentation result

Examples: Motion Based Segmentation nput Segmentation result

Other break- downs Brightness constancy is not satisfied Correlation based methods A point does not move like its neighbors what is the ideal window size? Regularization based methods The motion is not small (Taylor expansion doesn t hold) Use multi-scale estimation

Regularization Horn and Schunk (1981) Add global smoothness term Smoothness error: Error in brightness constancy equation E E ( 2 2) ( 2 2 u + u + v v ) dx dy s = x y x + D ( ) 2 u + v dx dy c = x y + D t y Minimize: E + λ c E s Solve by calculus of variations