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

Similar documents
Capturing, Modeling, Rendering 3D Structures

CS6670: Computer Vision

EE795: Computer Vision and Intelligent Systems

Lecture 16: Computer Vision

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

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

Lecture 16: Computer Vision

Feature Tracking and Optical Flow

CS 4495 Computer Vision Motion and Optic Flow

Feature Tracking and Optical Flow

Peripheral drift illusion

EE795: Computer Vision and Intelligent Systems

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

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,

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

Multi-stable Perception. Necker Cube

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

Computer Vision Lecture 20

Computer Vision Lecture 20

Dense Image-based Motion Estimation Algorithms & Optical Flow

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

VC 11/12 T11 Optical Flow

Comparison between Motion Analysis and Stereo

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

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

Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923

Lecture 20: Tracking. Tuesday, Nov 27

Optical flow and tracking

ECE Digital Image Processing and Introduction to Computer Vision

Visual Tracking (1) Feature Point Tracking and Block Matching

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

EECS 556 Image Processing W 09

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

Displacement estimation

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

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

Visual Tracking (1) Pixel-intensity-based methods

CS664 Lecture #18: Motion

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

Computer Vision Lecture 20

Horn-Schunck and Lucas Kanade 1

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

Edge and corner detection

Image matching. Announcements. Harder case. Even harder case. Project 1 Out today Help session at the end of class. by Diva Sian.

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

CS5670: Computer Vision

Stereo Matching.

Optic Flow and Basics Towards Horn-Schunck 1

Tracking Computer Vision Spring 2018, Lecture 24

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

CS5670: Computer Vision

Autonomous Navigation for Flying Robots

Feature Based Registration - Image Alignment

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

CS201: Computer Vision Introduction to Tracking

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

The Lucas & Kanade Algorithm

Mosaics. Today s Readings

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

Final Exam Study Guide

CS-465 Computer Vision

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

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

Announcements. Edges. Last Lecture. Gradients: Numerical Derivatives f(x) Edge Detection, Lines. Intro Computer Vision. CSE 152 Lecture 10

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

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

Stereo and Epipolar geometry

Computer Vision II Lecture 4

Final Review CMSC 733 Fall 2014

Prof. Feng Liu. Spring /26/2017

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

CS231A Section 6: Problem Set 3

Correspondence and Stereopsis. Original notes by W. Correa. Figures from [Forsyth & Ponce] and [Trucco & Verri]

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

Local Feature Detectors

Optic Flow and Motion Detection

Automatic Image Alignment (feature-based)

Large-Scale 3D Point Cloud Processing Tutorial 2013

CPSC 425: Computer Vision

EE795: Computer Vision and Intelligent Systems

Announcements. Motion. Structure-from-Motion (SFM) Motion. Discrete Motion: Some Counting

Computer Vision I. Announcement. Corners. Edges. Numerical Derivatives f(x) Edge and Corner Detection. CSE252A Lecture 11

Image Features. Work on project 1. All is Vanity, by C. Allan Gilbert,

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

Optical Flow Estimation

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

Local invariant features

Marcel Worring Intelligent Sensory Information Systems

Step-by-Step Model Buidling

EXAM SOLUTIONS. Image Processing and Computer Vision Course 2D1421 Monday, 13 th of March 2006,

arxiv: v1 [cs.cv] 2 May 2016

Outline 7/2/201011/6/

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

Problems with template matching

Kanade Lucas Tomasi Tracking (KLT tracker)

CS4670: Computer Vision

Announcements. Stereo Vision Wrapup & Intro Recognition

Image processing and features

Transcription:

Matching Compare region of image to region of image. We talked about this for stereo. Important for motion. Epipolar constraint unknown. But motion small. Recognition Find object in image. Recognize object. Today, simplest kind of matching. Intensities similar.

Matching in Motion: optical flow Solve pixel correspondence problem given a pixel in H, look for nearby pixels of the same color in I How to estimate pixel motion from image H to image I?

Matching: Finding objects

Matching: Identifying Objects

Matching: what to match Simplest: SSD with windows. We talked about this for stereo as well: Windows needed because pixels not informative enough. (More on this later).

Comparing Windows: (Camps)

Window size Effect of window size W = 3 W = 20 Better results with adaptive window T. Kanade and M. Okutomi, A Stereo Matching Algorithm with an Adaptive Window: Theory and Experiment,, Proc. International Conference on Robotics and Automation, 1991. D. Scharstein and R. Szeliski. Stereo matching with nonlinear diffusion. International Journal of Computer Vision, 28(2):155-174, July 1998

Subpixel SSD When motion is a few pixels or less, motion of an integer no. of pixels can be insufficient.

Bilinear Interpolation To compare pixels that are not at integer grid points, we resample the image. Assume image is locally bilinear. I(x,y) = ax + by + cxy + d = 0. Given the value of the image at four points: I(x,y), I(x+1,y), I(x,y+1), I(x+1,y+1) we can solve for a,b,c,d linearly. Then, for any u between x and x+1, for any v between y and y+1, we use this equation to find I(u,v).

Matching: How to Match Efficiently Baseline approach: try everything. arg min u, v ( W ( x, y) I( x u, y v) ) + + Could range over whole image. Or only over a small displacement. 2

Matching: Multiscale search search search search (Weizmann Institute Vision Class)

Low resolution The Gaussian Pyramid G 4 = ( G 3 * gaussian) 2 G 3 = ( G 2 * gaussian blur ) 2 blur G 2 = ( G 1 * gaussian) 2 down-sample down-sample blur down-sample G 1 = ( G 0 * gaussian) 2 down-sample G 0 = Image blur High resolution (Weizmann Institute Vision Class)

When motion is small: Optical Flow Small motion: (u and v are less than 1 pixel) H(x,y) = I(x+u,y+v) Brute force not possible suppose we take the Taylor series expansion of I:

Optical flow equation Combining these two equations In the limit as u and v go to zero, this becomes exact

Optical flow equation Q: how many unknowns and equations per pixel? 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 This explains the Barber Pole illusion http://www.sandlotscience.com/ambiguous/barberpole.htm

Let s look at an example of this. Suppose we have an image in which H(x,y) = y. That is, the image will look like: 11111111111111 22222222222222 33333333333333 And suppose there is optical flow of (1,1). The new image will look like: ----------------------- -1111111111111-2222222222222 I(3,3) = 2. H(3,3) = 3. So I t (3,3) = -1. GRAD I(3,3) = (0,1). So our constraint equation will be: 0 = -1 + <(0,1), (u,v)>, which is 1 = v. We recover the v component of the optical flow, but not the u component. This is the aperture problem.

First Order Approximation When we assume: I( x + u, y + v) I( x, y) + I x u + I y v We assume an image locally is:

Aperture problem

Aperture problem

Solving the aperture problem 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!

Lukas-Kanade flow We have more equations than unknowns: solve least squares problem. This is given by: Summations over all pixels in the KxK window Does look familiar?

Let s look at an example of this. Suppose we have an image with a corner. 1111111111 ----------------- 1222222222 And this translates down and to the right: -1111111111 1233333333-1222222222 1234444444-1233333333 Let s compute I t for the whole second image: ---------- Ix = ---------- Iy = ------------- 0-1-1-1-1-1 --00000 -------------- -1-1-1-1-1-1 --.50000-0-.5-1-1-1-1-1-1-1-1-1-1-1-1- --1.5000-00-.5-1-1-1-1-1 Then the equations we get have the form: (.5,-.5)*(u,v) = 1, (1,0)*(u,v) = 1, (0,-1)(u,v) = 1. Together, these lead to a solution that u = 1, v = -1.

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)

Does this seem familiar? Formula for Finding Corners We look at matrix: Sum over a small region, the hypothetical corner Gradient with respect to x, times gradient with respect to y C = I I x 2 x I y I x y 2 y I I Matrix is symmetric WHY THIS?

= = 2 1 2 2 0 0 λ λ y y x y x x I I I I I I C First, consider case where: This means all gradients in neighborhood are: (k,0) or (0, c) or (0, 0) (or off-diagonals cancel). What is region like if: 1. λ1 = 0? 2. λ2 = 0? 3. λ1 = 0 and λ2 = 0? 4. λ1 > 0 and λ2 > 0?

General Case: From Singular Value Decomposition it follows that since C is symmetric: C λ 0 = R 1 1 0 λ2 R where R is a rotation matrix. So every case is like one on last slide.

So, corners are the things we can track Corners are when λ1, λ2 are big; this is also when Lucas-Kanade works. Corners are regions with two different directions of gradient (at least). Aperture problem disappears at corners. At corners, 1 st order approximation fails.

Edge large gradients, all the same large λ 1, small λ 2

Low texture region gradients have small magnitude small λ 1, small λ 2

High textured region gradients are different, large magnitudes large λ 1, large λ 2

Observation This is a two image problem BUT Can measure sensitivity by just looking at one of the images! This tells us which pixels are easy to track, which are hard very useful later on when we do feature tracking...

Errors in Lukas-Kanade What are the potential causes of errors in this procedure? Suppose A T A is easily invertible Suppose there is not much noise in the image When our assumptions are violated Brightness constancy is not satisfied The motion is not small A point does not move like its neighbors window size is too large what is the ideal window size?

Iterative Refinement Iterative Lukas-Kanade Algorithm 1. Estimate velocity at each pixel by solving Lucas- Kanade equations 2. Warp H towards I using the estimated flow field - use bilinear interpolation - Repeat until convergence

If Motion Larger: Reduce the resolution

Optical flow result Dewey morph

Tracking features over many Frames Compute optical flow for that feature for each consecutive H, I When will this go wrong? Occlusions feature may disappear need to delete, add new features Changes in shape, orientation allow the feature to deform Changes in color Large motions will pyramid techniques work for feature tracking?

Applications: MPEG application of feature tracking http://www.pixeltools.com/pixweb2.html

Image alignment Goal: estimate single (u,v) translation for entire image Easier subcase: solvable by pyramid-based Lukas-Kanade

Summary Matching: find translation of region to minimize SSD. Works well for small motion. Works pretty well for recognition sometimes. Need good algorithms. Brute force. Lucas-Kanade for small motion. Multiscale. Aperture problem: solve using corners. Other solutions use normal flow.