VC 11/12 T11 Optical Flow

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

CS 4495 Computer Vision Motion and Optic Flow

Lecture 16: Computer Vision

Lecture 16: Computer Vision

CS6670: 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.

Feature Tracking and Optical Flow

EE795: Computer Vision and Intelligent Systems

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

Peripheral drift illusion

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

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

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

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

EE795: Computer Vision and Intelligent Systems

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

Dense Image-based Motion Estimation Algorithms & Optical Flow

Multi-stable Perception. Necker Cube

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

EECS 556 Image Processing W 09

Optical flow and tracking

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 motion. Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys

Capturing, Modeling, Rendering 3D Structures

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

Visual Tracking (1) Feature Point Tracking and Block Matching

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

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

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

Comparison between Motion Analysis and Stereo

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

Lecture 20: Tracking. Tuesday, Nov 27

Computer Vision Lecture 20

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

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

Computer Vision Lecture 20

ECE Digital Image Processing and Introduction to Computer Vision

CS-465 Computer Vision

Computer Vision Lecture 20

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

Comparison Between The Optical Flow Computational Techniques

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

Optic Flow and Basics Towards Horn-Schunck 1

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

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

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

Marcel Worring Intelligent Sensory Information Systems

The 2D/3D Differential Optical Flow

Spatial track: motion modeling

Horn-Schunck and Lucas Kanade 1

CS231A Section 6: Problem Set 3

Computer Vision II Lecture 4

Optic Flow and Motion Detection

Fast Optical Flow Using Cross Correlation and Shortest-Path Techniques

Spatial track: motion modeling

CS664 Lecture #18: Motion

CPSC 425: Computer Vision

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

Optical flow. Cordelia Schmid

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

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

Edge and corner detection

Visual Tracking (1) Pixel-intensity-based methods

Computer Vision II Lecture 4

VC 10/11 T9 Region-Based Segmentation

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

Optical flow. Cordelia Schmid

CS201: Computer Vision Introduction to Tracking

VC 12/13 T16 Video Compression

Autonomous Navigation for Flying Robots

Optical Flow Estimation

CSCI 1290: Comp Photo

Notes 9: Optical Flow

Lecture 14: Tracking mo3on features op3cal flow

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

C18 Computer vision. C18 Computer Vision. This time... Introduction. Outline.

The Lucas & Kanade Algorithm

Final Exam Study Guide

ELEC Dr Reji Mathew Electrical Engineering UNSW

Image processing and features

Displacement estimation

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

Motion estimation. Lihi Zelnik-Manor

A global issue in Computer Vision and Cognitive&Physiology Vision (

Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation

Final Exam Study Guide CSE/EE 486 Fall 2007

MASTER THESIS. Optical Flow Features for Event Detection. Mohammad Afrooz Mehr, Maziar Haghpanah

Image Coding with Active Appearance Models

Computer Vision for HCI. Motion. Motion

Motion Analysis. Motion analysis. Now we will talk about. Differential Motion Analysis. Motion analysis. Difference Pictures

VC 11/12 T14 Visual Feature Extraction

Computing Slow Optical Flow By Interpolated Quadratic Surface Matching

Local Feature Detectors

Optical Flow Estimation with CUDA. Mikhail Smirnov

3D Vision. Viktor Larsson. Spring 2019

CS 378: Autonomous Intelligent Robotics. Instructor: Jivko Sinapov

Tracking Computer Vision Spring 2018, Lecture 24

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

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

Transcription:

VC 11/12 T11 Optical Flow Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos Miguel Tavares Coimbra

Outline Optical Flow Constraint Equation Aperture problem. The Lucas & Kanade Algorithm Acknowledgements: Most of this course is based on the excellent courses offered by Prof. Shree Nayar at Columbia University, USA and by Prof. Srinivasa Narasimhan at CMU, USA. Please acknowledge the original source when reusing these slides for academic purposes.

Topic: Optical Flow Constraint Equation Optical Flow Constraint Equation Aperture problem. The Lucas & Kanade Algorithm

Optical Flow and Motion We are interested in finding the movement of scene objects from time-varying images (videos). Lots of uses Track object behavior Correct for camera jitter (stabilization) Align images (mosaics) 3D shape reconstruction Special effects

Exemplo Where can i find motion?

Lucas & Kanade Optical Flow method

Optical Flow What is that? Optical flow is the distribution of apparent velocities of movement of brightness patterns in an image Horn and Schunck 1980 The optical flow field approximates the true motion field which is a purely geometrical concept..., it is the [2D] projection into the image [plane] of [the sequence s] 3D motion vectors Horn and Schunk 1993 z Motion Plane y Image Plane What can i use it for? x

Tracking Rigid Objects (Simon Baker, CMU)

Tracking Non-rigid Objects (Comaniciu et al, Siemens)

Face Tracking (Simon Baker et al, CMU)

3D Structure from Motion (David Nister, Kentucky)

Motion Field Image velocity of a point moving in the scene v o t r i f ' Z Perspective projection: v vit Motion field d i r dt Y X 1 f ' r i ro r Z r o i o o o o f ' f ' r Z 2 o r Zv v o Scene point velocity: Image velocity: Z r r vo r Z 2 o o v i Z v o dr i dt d o r dt

Optical Flow Motion of brightness pattern in the image Ideally Optical flow = Motion field

Optical Flow Motion Field Motion field exists but no optical flow No motion field but shading changes

Problem Definition: Optical Flow How to estimate pixel motion from image H to image I? Find pixel correspondences Given a pixel in H, look for nearby pixels of the same color in I Key assumptions color constancy: a point in H looks the same in image I For grayscale images, this is brightness constancy small motion: points do not move very far

Optical Flow Constraint Equation Assume brightness of patch remains same in both images: Assume small motion: (Taylor expansion of LHS up to first order) ), ( y x ), ( t v y t u x t time t t time ), ( y x Optical Flow: Velocities ), ( v u Displacement: ), ( ), ( t v t u y x ),, ( ),, ( t y x E t t t v y t u x E ),, ( ),, ( t y x E t E t y E y x E x t y x E

Optical Flow Constraint Equation x E x Divide by dx dt E E y t 0 y t t and take the limit t 0 E x dy dt E y E t 0 u Constraint Equation E x u E y v E t 0 v NOTE: ( u, v) We can compute must lie on a straight line E, E, x y using gradient operators! But, (u,v) cannot VC 11/12 be - T11 found - Optical uniquely Flow with this constraint! E t

Optical Flow Constraint Intuitively, what does this constraint mean? The component of the flow in the gradient direction is determined. The component of the flow parallel to an edge is unknown.

Topic: Aperture problem Optical Flow Constraint Equation Aperture problem. The Lucas & Kanade Algorithm

Optical Flow Constraint

How does this show up visually? Known as the Aperture Problem [Gary Bradski, Intel Research and Stanford SAIL]

Aperture Problem Exposed [Gary Bradski, Intel Research and Stanford SAIL] Motion along just an edge is ambiguous

Computing Optical Flow Formulate Error in Optical Flow Constraint: We need additional constraints! e c image ( E u E v x Smoothness Constraint (as in shape from shading and stereo): dx Usually motion field varies smoothly in the image. So, penalize departure from smoothness: y E t 2 ) dy 2 2 2 2 es ( ux uy ) ( vx vy ) image dx dy Find (u,v) at each image point that MINIMIZES: e e e s c weighting factor

Example

Revisiting the Small Motion Assumption Is this motion small enough? Probably not it s much larger than one pixel (2 nd order terms dominate) How might we solve this problem?

Reduce the Resolution!

Coarse-to-fine Optical Flow Estimation u=1.25 pixels u=2.5 pixels u=5 pixels image H u=10 pixels image I I Gaussian pyramid of image H Gaussian pyramid of image I

Coarse-to-fine Optical Flow Estimation run iterative OF upsample run iterative OF... image H J Gaussian pyramid of image H image I I Gaussian pyramid of image I

Types of OF methods Differential Horn and Schunck [HS80], Lucas Kanade [LK81], Nagel [83]. Region-based matching Anandan [Anan87], Singh [Singh90], Digital video encoding standards. Energy-based Heeger [Heeg87] Phase-based Fleet and Jepson [FJ90] Open problem! Current solutions are not good enough!

Topic: The Lucas & Kanade Algorithm Optical Flow Constraint Equation Aperture problem. The Lucas & Kanade Algorithm

The Lucas & Kanade Method How to get more equations for a pixel? Basic idea: impose additional constraints most common is to assume that the flow field is smooth locally one method: pretend the pixel s neighbors have the same (u,v) If we use a 5x5 window, that gives us 25 equations per pixel! * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Lukas-Kanade flow Prob: we have more equations than unknowns Solution: solve least squares problem minimum least squares solution given by solution (in d) of: The summations are over all pixels in the K x K window This technique was first proposed by Lukas & Kanade (1981) described in Trucco & Verri reading * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Conditions for solvability Optimal (u, v) satisfies Lucas-Kanade equation When is This Solvable? A T A should be invertible A T A should not be too small due to noise eigenvalues 1 and 2 of A T A should not be too small A T A should be well-conditioned 1 / 2 should not be too large ( 1 = larger eigenvalue) * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Eigenvectors of A T A Suppose (x,y) is on an edge. What is A T A? gradients along edge all point the same direction gradients away from edge have small magnitude is an eigenvector with eigenvalue What s the other eigenvector of A T A? let N be perpendicular to N is the second eigenvector with eigenvalue 0 The eigenvectors of A T A relate to edge direction and magnitude * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Edge large gradients, all the same large 1, small 2 * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Low texture region gradients have small magnitude small 1, small 2 * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003

High textured region gradients are different, large magnitudes large 1, large 2 * From Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Sparse Motion Field We are only confident in motion vectors of areas with two strong eigenvectors. Optical flow. Not so confident when we have one or zero strong eigenvectors. Normal flow (apperture problem). Unknown flow (blank-wall problem).

Summing all up Optical flow: Algorithms try to approximate the true motion field of the image plane. The Optical Flow Constraint Equation needs an additional constraint (e.g. smoothness, constant local flow). The Lucas Kanade method is the most popular Optical Flow Algorithm. What applications is this useful for? What about block matching?

Resources Barron, Tutorial: Computing 2D and 3D Optical Flow., http://www.tinavision.net/docs/memos/2004-012.pdf CVonline: Optical Flow - http://homepages.inf.ed.ac.uk/cgi/rbf/cvonline/entries.pl?tag518 Fast Image Motion Estimation Demo http://extra.cmis.csiro.au/ia/changs/motion/