CPSC 425: Computer Vision

Similar documents
CPSC 425: Computer Vision

CPSC 425: Computer Vision

CPSC 425: Computer Vision

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

CS 4495 Computer Vision Motion and Optic Flow

Feature Tracking and Optical Flow

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

Peripheral drift illusion

Feature Tracking and Optical Flow

Optical flow and tracking

Computer Vision Lecture 20

Computer Vision Lecture 20

CS664 Lecture #18: Motion

EECS 556 Image Processing W 09

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

Multi-stable Perception. Necker Cube

Lecture 16: Computer Vision

Comparison between Motion Analysis and Stereo

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

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

Visual Tracking (1) Feature Point Tracking and Block Matching

Computer Vision Lecture 20

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

CS 534: Computer Vision Segmentation and Perceptual Grouping

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

CPSC 425: Computer Vision

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

Lecture 16: Computer Vision

VC 11/12 T11 Optical Flow

Computer Vision Lecture 17

EE795: Computer Vision and Intelligent Systems

Stereo. Outline. Multiple views 3/29/2017. Thurs Mar 30 Kristen Grauman UT Austin. Multi-view geometry, matching, invariant features, stereo vision

Computer Vision Lecture 17

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

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

CS 4495 Computer Vision A. Bobick. Motion and Optic Flow. Stereo Matching

CS231A Section 6: Problem Set 3

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

CS 534: Computer Vision Segmentation and Perceptual Grouping

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

Lecture 20: Tracking. Tuesday, Nov 27

Optic Flow and Basics Towards Horn-Schunck 1

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

Image processing and features

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

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

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

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

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

CS 4495 Computer Vision A. Bobick. Motion and Optic Flow. Stereo Matching

Final Exam Study Guide

Stereo Vision. MAN-522 Computer Vision

CMPSCI 670: Computer Vision! Grouping

CHAPTER 3 DISPARITY AND DEPTH MAP COMPUTATION

Outline. Segmentation & Grouping. Examples of grouping in vision. Grouping in vision. Grouping in vision 2/9/2011. CS 376 Lecture 7 Segmentation 1

Chaplin, Modern Times, 1936

Lecture 14: Basic Multi-View Geometry

Segmentation by Clustering

ECE Digital Image Processing and Introduction to Computer Vision

Stereo vision. Many slides adapted from Steve Seitz

Stereo. 11/02/2012 CS129, Brown James Hays. Slides by Kristen Grauman

The 2D/3D Differential Optical Flow

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

Segmentation and Grouping April 19 th, 2018

Grouping and Segmentation

Final project bits and pieces

BIL Computer Vision Apr 16, 2014

There are many cues in monocular vision which suggests that vision in stereo starts very early from two similar 2D images. Lets see a few...

Recap: Features and filters. Recap: Grouping & fitting. Now: Multiple views 10/29/2008. Epipolar geometry & stereo vision. Why multiple views?

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

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

Dense 3D Reconstruction. Christiano Gava

Spatial track: motion modeling

CS6670: Computer Vision

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

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

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

Dense Image-based Motion Estimation Algorithms & Optical Flow

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

Dense 3D Reconstruction. Christiano Gava

Applications. Foreground / background segmentation Finding skin-colored regions. Finding the moving objects. Intelligent scissors

Segmentation and Grouping

Lecture 14: Tracking mo3on features op3cal flow

Stereo. Many slides adapted from Steve Seitz

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

EE795: Computer Vision and Intelligent Systems

Recovering structure from a single view Pinhole perspective projection

Stereo CSE 576. Ali Farhadi. Several slides from Larry Zitnick and Steve Seitz

3D Computer Vision. Structure from Motion. Prof. Didier Stricker

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

Segmentation by Clustering Reading: Chapter 14 (skip 14.5)

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

Segmentation by Clustering. Segmentation by Clustering Reading: Chapter 14 (skip 14.5) General ideas

ELEC Dr Reji Mathew Electrical Engineering UNSW

Stereo: Disparity and Matching

CPSC 425: Computer Vision

CS 664 Segmentation. Daniel Huttenlocher

CS4495/6495 Introduction to Computer Vision. 3B-L3 Stereo correspondence

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

Massachusetts Institute of Technology Department of Computer Science and Electrical Engineering 6.801/6.866 Machine Vision QUIZ II

Transcription:

1 / 49 CPSC 425: Computer Vision Instructor: Fred Tung ftung@cs.ubc.ca Department of Computer Science University of British Columbia Lecture Notes 2015/2016 Term 2

2 / 49 Menu March 10, 2016 Topics: Motion and Optical Flow (cont.) Clustering Reading: Today: Forsyth & Ponce (2nd ed.) 6.2.2, 9.3.1, 9.3.3, 9.4.2 Next: Forsyth & Ponce (2nd ed.) 15.1, 15.2 Handouts: Assignment 6: Optical Flow Reminders: Assignment 6 due Thursday, March 24 www: http://www.cs.ubc.ca/~ftung/cpsc425/ piazza: https://piazza.com/ubc.ca/winterterm22015/cpsc425/

3 / 49 Today s Fun Example: Barber s Pole Illusion Today s example is one of the most well known motion illusions, the barber s pole illusion. Point your web browser to http://en.wikipedia.org/wiki/barber_pole_illusion A barber s pole rotates about its vertical axis so that the true motion is purely horizontal. But, the stripes appear to be traveling vertically up the length of the pole, rather than around it Note: A barber s pole is a traditional sign at a location where barbers perform their craft, dating back to the middle ages. See http://en.wikipedia.org/wiki/barber s_pole

4 / 49 Lecture 16: Re-cap Stereo is formulated as a correspondence problem determine match between location of a scene point in one image and its location in another If we assume calibrated cameras and image rectification, epipolar lines are horizontal scan lines What do we match? Individual pixels? Patches? Edges? Optical flow is the apparent motion of brightness patterns in the image Usually we assume optical flow and 2-D motion coincide, but this is not necessarily the case

5 / 49 Example: Flying Insects and Birds Figure credit: M. Srinivasan c IEEE Bee strategy: Balance the optical flow experienced by the two eyes

6 / 49 Example: Flying Insects and Birds How do bees land safely on surfaces? During their approach, bees continually adjust their speed to hold constant the optical flow in the vicinity of the target approach speed decreases as the target is approached and reduces to zero at the point of touchdown no need to estimate the distance to the target at any time

7 / 49 Example: Flying Insects and Birds Figure credit: M. Srinivasan c IEEE Bees approach the surface more slowly if the spiral is rotated to augment the rate of expansion, and more quickly if the spiral is rotated in the opposite direction

8 / 49 Clicker Exercise (1 question) Please turn on clickers

11 / 49 Exercise 1 Figure credit: M. Srinivasan c IEEE

12 / 49 Aperture Problem? Without distinct features to track, the true visual motion is ambiguous Locally, one can compute only the component of the visual motion in the direction perpendicular to the contour

13 / 49 Visual Motion Visual motion is determined when there are distinct features to track, provided: the features can be detected and localized accurately; and the features can be correctly matched over time

14 / 49 Motion as Matching Representation Result is... Point/feature based Contour based (Differential) gradient based (very) sparse (relatively) sparse dense

15 / 49 Optical Flow Constraint Equation Consider image intensity also to be a function of time, t. We write I(x, y, t) (1)

16 / 49 Optical Flow Constraint Equation Consider image intensity also to be a function of time, t. We write I(x, y, t) (1) Applying the chain rule for differentiation to (1), we obtain di dt = I x dx dt + I y dy dt + I t where subscripts denote partial differentiation Define u = dx dt and v = dy dt. Then [u, v] is the 2-D motion and the space of all such u and v is the 2-D velocity space Suppose di dt = 0. Then we obtain the (classic) optical flow constraint equation I x u + I y v + I t = 0 (2)

17 / 49 Optical Flow Constraint Equation (cont d) v Ixu + Iyv + I t = 0 u Equation (2) determines a straight line in velocity space

18 / 49 Lucas Kanade Observations: 1 The 2-D motion, [u, v], at a given point, [x, y], has two degrees-of-freedom 2 The partial derivatives, I x, I y, I t, provide one constraint 3 The 2-D motion, [u, v], cannot be determined locally from I x, I y, I t alone Lucas Kanade Idea: Obtain additional local constraint by computing the partial derivatives, I x, I y, I t, in a window centered at the given [x, y]

19 / 49 Lucas Kanade (cont d) Suppose [x 1, y 1 ] = [x, y] is the (original) center point in the window. Let [x 2, y 2 ] be any other point in the window. This gives us two equations that we can write as I x1 u + I y1 v = I t1 I x2 u + I y2 v = I t2 and that can be solved locally for u and v as [ u v ] [ ] 1 [ ] Ix1 I = y1 It1 provided that u and v are the same in both equations and provided that the required matrix inverse exists. I x2 I y2 I t2

20 / 49 Lucas Kanade (cont d) Considering all n points in the window, one obtains I x1 u + I y1 v = I t1 I x2 u + I y2 v = I t2.. I xn u + I yn v = I tn which can be written as the matrix equation where v = [u, v] T, A = A v = b (3) I y1 I t1 I y2.. and b = I t2. I x1 I x2 I xn I yn I tn

21 / 49 Lucas Kanade (cont d) The standard least squares solution, v, to (3) is v = (A T A) 1 A T b again provided that u and v are the same in all equations and provided that the rank of A T A is 2 (so that the required inverse exists)

22 / 49 Lucas Kanade (cont d) Note that we can explicitly write down an expression for A T A as A T A = Ix 2 Ix I y Ix I y Iy 2 which is identical to the matrix C that we saw in the context of Harris corner detection

23 / 49 Lucas Kanade: Summary A dense method to compute motion, [u, v], at every location in an image Key Assumptions: 1 Motion is slow enough and smooth enough that differential methods apply (i.e., that the partial derivatives, I x, I y, I t, are well-defined) 2 The optical flow constraint equation holds (i.e., di dt = 0) 3 A window size is chosen so that motion, [u, v], is constant in the window 4 A window size is chosen so that the rank of A T A is 2 for the window

24 / 49 Aside: Optical Flow Smoothness Constraint Many methods trade off a departure from the optical flow constraint cost with a departure from smoothness cost. The optimization objective to minimize becomes E = [(I x u + I y v + I t ) 2 + λ( u 2 + v 2 )] dxdy (4) where λ is a weighing parameter.

25 / 49 Grouping in Human Vision Humans routinely group features that belong together when looking at a scene. What are some cues that we use for grouping?

26 / 49 Grouping in Human Vision Humans routinely group features that belong together when looking at a scene. What are some cues that we use for grouping? Similarity Symmetry Common Fate Proximity...

27 / 49 Grouping in Human Vision A Kanizsa triangle C Idesawa s spiky sphere B Tse s volumetric worm D Tse s sea monster Figure credit: Steve Lehar http://cns-alumni.bu.edu/~slehar/lehar.html

28 / 49 Grouping in Human Vision Slide credit: Kristen Grauman

Grouping in Human Vision 29 / 49

30 / 49 Clustering It is often useful to be able to group together image regions with similar appearance (e.g. roughly coherent colour or texture) image compression approximate nearest neighbour search base unit for higher-level recognition tasks moving object detection in video sequences video summarization

31 / 49 Clustering Clustering is a set of techniques to try to find components that belong together (i.e., components that form clusters). Unsupervised learning Two basic clustering approaches are agglomerative clustering divisive clustering

32 / 49 Agglomerative Clustering Each data point starts as a separate cluster. Clusters are recursively merged. Algorithm: Make each point a separate cluster Until the clustering is satisfactory Merge the two clusters with the smallest inter-cluster distance end

33 / 49 Divisive Clustering The entire data set starts as a single cluster. Clusters are recursively split. Algorithm: Construct a single cluster containing all points Until the clustering is satisfactory Split the cluster that yields the two components with the largest inter-cluster distance end

49 / 49 Summary Motion, like binocular stereo, can be formulated as a matching problem. That is, given a scene point located at (x 0, y 0 ) in an image acquired at time t 0, what is its position, (x 1, y 1 ), in an image acquired at time t 1? Assuming image intensity does not change as a consequence of motion, we obtain the (classic) optical flow constraint equation I x u + I y v + I t = 0 where [u, v], is the 2-D motion at a given point, [x, y] and I x, I y, I t are the partial derivatives of intensity with respect to x, y, and t Lucas Kanade is a dense method to compute the motion, [u, v], at every location in an image