flow estimation - university of torontourtasun/courses/csc2541/03_scene_flow.pdf · optic flow vs...

54

Upload: others

Post on 14-Jan-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Flow Estimation

Min Bai

University of Toronto

February 8, 2016

Min Bai (UofT) Flow Estimation February 8, 2016 1 / 47

Page 2: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Outline

Optical Flow - Continued

Better descriptors for matching - DeepFlow (ICCV 2013)Better dense optical �ow generation - EpicFlow (CVPR 2015)

Scene Flow

Optic Flow vs Scene Flow3D to 2D Projection ReviewEpipolar Constraint ReviewStatic scene structure from monocular vision - Robust MonocularEpipolar Flow Estimation (CVPR13)Dynamic scene structure from stereo + time sequence - 3D Scene FlowEstimation with a Piecewise Rigid Scene Model (CVPR15)

Min Bai (UofT) Flow Estimation February 8, 2016 2 / 47

Page 3: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Outline

Optical Flow - Continued

Better descriptors for matching - DeepFlow (ICCV 2013)

Better dense optical �ow generation - EpicFlow (CVPR 2015)

Scene Flow

Optic Flow vs Scene Flow3D to 2D Projection ReviewEpipolar Constraint ReviewStatic scene structure from monocular vision - Robust MonocularEpipolar Flow Estimation (CVPR13)Dynamic scene structure from stereo + time sequence - 3D Scene FlowEstimation with a Piecewise Rigid Scene Model (CVPR15)

Min Bai (UofT) Flow Estimation February 8, 2016 2 / 47

Page 4: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Outline

Optical Flow - Continued

Better descriptors for matching - DeepFlow (ICCV 2013)Better dense optical �ow generation - EpicFlow (CVPR 2015)

Scene Flow

Optic Flow vs Scene Flow3D to 2D Projection ReviewEpipolar Constraint ReviewStatic scene structure from monocular vision - Robust MonocularEpipolar Flow Estimation (CVPR13)Dynamic scene structure from stereo + time sequence - 3D Scene FlowEstimation with a Piecewise Rigid Scene Model (CVPR15)

Min Bai (UofT) Flow Estimation February 8, 2016 2 / 47

Page 5: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Outline

Optical Flow - Continued

Better descriptors for matching - DeepFlow (ICCV 2013)Better dense optical �ow generation - EpicFlow (CVPR 2015)

Scene Flow

Optic Flow vs Scene Flow3D to 2D Projection ReviewEpipolar Constraint ReviewStatic scene structure from monocular vision - Robust MonocularEpipolar Flow Estimation (CVPR13)Dynamic scene structure from stereo + time sequence - 3D Scene FlowEstimation with a Piecewise Rigid Scene Model (CVPR15)

Min Bai (UofT) Flow Estimation February 8, 2016 2 / 47

Page 6: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Outline

Optical Flow - Continued

Better descriptors for matching - DeepFlow (ICCV 2013)Better dense optical �ow generation - EpicFlow (CVPR 2015)

Scene Flow

Optic Flow vs Scene Flow3D to 2D Projection ReviewEpipolar Constraint ReviewStatic scene structure from monocular vision - Robust MonocularEpipolar Flow Estimation (CVPR13)Dynamic scene structure from stereo + time sequence - 3D Scene FlowEstimation with a Piecewise Rigid Scene Model (CVPR15)

Min Bai (UofT) Flow Estimation February 8, 2016 2 / 47

Page 7: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Outline

Optical Flow - Continued

Better descriptors for matching - DeepFlow (ICCV 2013)Better dense optical �ow generation - EpicFlow (CVPR 2015)

Scene Flow

Optic Flow vs Scene Flow

3D to 2D Projection ReviewEpipolar Constraint ReviewStatic scene structure from monocular vision - Robust MonocularEpipolar Flow Estimation (CVPR13)Dynamic scene structure from stereo + time sequence - 3D Scene FlowEstimation with a Piecewise Rigid Scene Model (CVPR15)

Min Bai (UofT) Flow Estimation February 8, 2016 2 / 47

Page 8: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Outline

Optical Flow - Continued

Better descriptors for matching - DeepFlow (ICCV 2013)Better dense optical �ow generation - EpicFlow (CVPR 2015)

Scene Flow

Optic Flow vs Scene Flow3D to 2D Projection Review

Epipolar Constraint ReviewStatic scene structure from monocular vision - Robust MonocularEpipolar Flow Estimation (CVPR13)Dynamic scene structure from stereo + time sequence - 3D Scene FlowEstimation with a Piecewise Rigid Scene Model (CVPR15)

Min Bai (UofT) Flow Estimation February 8, 2016 2 / 47

Page 9: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Outline

Optical Flow - Continued

Better descriptors for matching - DeepFlow (ICCV 2013)Better dense optical �ow generation - EpicFlow (CVPR 2015)

Scene Flow

Optic Flow vs Scene Flow3D to 2D Projection ReviewEpipolar Constraint Review

Static scene structure from monocular vision - Robust MonocularEpipolar Flow Estimation (CVPR13)Dynamic scene structure from stereo + time sequence - 3D Scene FlowEstimation with a Piecewise Rigid Scene Model (CVPR15)

Min Bai (UofT) Flow Estimation February 8, 2016 2 / 47

Page 10: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Outline

Optical Flow - Continued

Better descriptors for matching - DeepFlow (ICCV 2013)Better dense optical �ow generation - EpicFlow (CVPR 2015)

Scene Flow

Optic Flow vs Scene Flow3D to 2D Projection ReviewEpipolar Constraint ReviewStatic scene structure from monocular vision - Robust MonocularEpipolar Flow Estimation (CVPR13)

Dynamic scene structure from stereo + time sequence - 3D Scene FlowEstimation with a Piecewise Rigid Scene Model (CVPR15)

Min Bai (UofT) Flow Estimation February 8, 2016 2 / 47

Page 11: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Outline

Optical Flow - Continued

Better descriptors for matching - DeepFlow (ICCV 2013)Better dense optical �ow generation - EpicFlow (CVPR 2015)

Scene Flow

Optic Flow vs Scene Flow3D to 2D Projection ReviewEpipolar Constraint ReviewStatic scene structure from monocular vision - Robust MonocularEpipolar Flow Estimation (CVPR13)Dynamic scene structure from stereo + time sequence - 3D Scene FlowEstimation with a Piecewise Rigid Scene Model (CVPR15)

Min Bai (UofT) Flow Estimation February 8, 2016 2 / 47

Page 12: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

DeepFlow - Motivation

DeepFlow: Large Displacement Optical Flow with Deep Matching

Weinzaepfel et al, ICCV 2013

Challenges in �nding correct matching points in image pairs:

Distortions due to perspective changesDistortions due to large displacements of object between imagecapturesOcclusion, scale, texture, etc

DeepFlow addresses �rst two items

Min Bai (UofT) Flow Estimation February 8, 2016 3 / 47

Page 13: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

DeepFlow - Comparison with SIFT

Creates descriptive feature unique to one point based on context patch

Source: Bandara @ codeproject.com

Min Bai (UofT) Flow Estimation February 8, 2016 4 / 47

Page 14: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

DeepFlow - Comparison with SIFT

Left and middle - traditional SIFT matching

Based on rigid patch

Right - more optimal matching

Non rigid, deformable patch

Source: Weinzaepfel et al, ICCV 2013

Min Bai (UofT) Flow Estimation February 8, 2016 5 / 47

Page 15: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

DeepFlow - Architecture

Inspired by deep convolutional neural networks

Source: Weinzaepfel et al, ICCV 2013

Min Bai (UofT) Flow Estimation February 8, 2016 6 / 47

Page 16: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

DeepFlow - Architecture

Progression of image data through architecture

Source: Weinzaepfel et al, ICCV 2013

Min Bai (UofT) Flow Estimation February 8, 2016 7 / 47

Page 17: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

DeepFlow - Energy optimization

Traditionally, �ow �eld is estimated by minimizing the following energyover the image:

E (w) = Edata + αEsmoothness

data term encourages color and gradient consistencysmoothness term discourages abrupt changes in �ow �eld

DeepFlow adds one more term to encourage �ow estimation to equaldisplacements from matching

E (w) = Edata + αEsmoothness + βEmatching

matching term also takes quality of matches into account

Min Bai (UofT) Flow Estimation February 8, 2016 8 / 47

Page 18: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

EpicFlow

EpicFlow: Edge-Preserving Interpolation of Correspondences forOptical Flow

Revaud et al, CVPR2015

Based in part on Deep Matching (as developed in DeepFlow)

Also incorporates knowledge about visual edges in images

Min Bai (UofT) Flow Estimation February 8, 2016 9 / 47

Page 19: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

EpicFlow - Motivation

Commonly used method - coarse-to-�ne interpolation / energyminimization

Start with smoothed or down-sampled image, estimate �owUse estimated �ow for a less down-sampled image for furtherre�nement

Esmooth = Ψ(‖∇u‖2 + ‖∇v‖2)

Ψ is a robust penalization function

Min Bai (UofT) Flow Estimation February 8, 2016 10 / 47

Page 20: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

EpicFlow - Motivation

Question:

Should smoothness in �ow �eld be uniformly encouraged?What e�ect does this have on natural motion discontinuities in 3D?What e�ect does this have on small but fast moving objects?

Source: KITTI

Min Bai (UofT) Flow Estimation February 8, 2016 11 / 47

Page 21: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

EpicFlow - Motivation

Question:

Should smoothness in �ow �eld be uniformly encouraged?What e�ect does this have on natural motion discontinuities in 3D?What e�ect does this have on small but fast moving objects?

Source: KITTI

Min Bai (UofT) Flow Estimation February 8, 2016 12 / 47

Page 22: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

EpicFlow - Key Insight

Motion discontinuities tend to occur at image edges

In the natural world, the same objects tend to be coherent in color(compared to background)Abrupt changes in true optical �ow tends to be due to 3D points notbelonging to the same rigidly moving body or abrupt changes in depth

Min Bai (UofT) Flow Estimation February 8, 2016 13 / 47

Page 23: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

EpicFlow - Architecture

Run edge detection algorithm (based on Structured Forests for FastEdge Detection, ICCV 2013)

Run Deep Matching (same algorithm as discussed previously)

Flow �eld interpolation through edge-aware distances

This skips the coarse-to-�ne pyramid!

One level energy minimization

Source: Revaud et al, CVPR 2015

Min Bai (UofT) Flow Estimation February 8, 2016 14 / 47

Page 24: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

EpicFlow - Sparse to Dense Flow Field Interpolation

Start with sparse �ow �eld from key point matching

Calculate "edge aware distance" between two pixels p and q

Then perform weighted average interpolation for �ow at pixel p

Finally smooth over �ow image using one level variational method

E (w) = Edata + αEsmoothness

Min Bai (UofT) Flow Estimation February 8, 2016 15 / 47

Page 25: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

EpicFlow - KITTI

Table : KITTI Results

Inputs

Matching

Edges

Result

Source: Revaud et al, CVPR 2015Min Bai (UofT) Flow Estimation February 8, 2016 16 / 47

Page 26: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Di�erence between Scene Flow and Optical FLow

Optical �ow reasons in 2D

Output is only �ow �eld showing 2D pixel correspondences

Scene �ow reasons in 3D

Recognizes that changes in the 2D image are due to object motionand/or change in camera position in 3DOptical �ow = projection of 3D scene �ow onto imageOutput can include:

3D structure (depth)3D Camera motion3D Object motion

Min Bai (UofT) Flow Estimation February 8, 2016 17 / 47

Page 27: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Why bother with scene �ow?

Optical �ow reasons about things like matching points, edges,interpolation, regional smoothing, etc in 2D

Can only incorporate intuition about 2D

But we know much about the world in 3D! For example, we know thatin general...

Many (most) objects are rigidMany (most) surfaces are planarObjects have continuous motion - no teleportation (in classical physics)

Plus some domain speci�c knowledge (eg for driving):

Most of a scene is likely static (road, trees, buildings)Most object motion is con�ned to road plane (for now)Camera motion is con�ned to road plane (if car is driven well)

How do we incorporate these beliefs?

Reason in 3D!

Min Bai (UofT) Flow Estimation February 8, 2016 18 / 47

Page 28: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Why bother with scene �ow?

Source: KITTI

Min Bai (UofT) Flow Estimation February 8, 2016 19 / 47

Page 29: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Why is Scene Flow Hard?

Inherent ambiguity:

Need to infer 3D information from 2D images2D observed �ow can be due to any combination of object motion,camera motion, depth

Similar problems as optical �ow

Sparseness of matchesErrors in matchingOcclusions, displacement, view point changes, etc

Min Bai (UofT) Flow Estimation February 8, 2016 20 / 47

Page 30: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D to 2D Projection Review

Given a 3D point P = [X ,Y ,Z , 1]ᵀ in homogeneous coordinates

Projection into image is p = [x , y , 1]ᵀ

p = [K |0][R|~t]P (1)

For canonical camera at world center: K =

1 0 00 1 00 0 f

, R = I , ~t = 0

and thus x = f X

Z, y = f Y

Z

Min Bai (UofT) Flow Estimation February 8, 2016 21 / 47

Page 31: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Epipolar Geometry Review

Given two images I and I' of a static scene, p' corresponding to pmust lie on epipolar line:

pᵀFp' = 0

F ⊂ R3x3 = fundamental matrix, rank = 2

Source: IMAGINE @ http://imagine.enpc.fr/

Min Bai (UofT) Flow Estimation February 8, 2016 22 / 47

Page 32: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Robust Monocular Epipolar Flow Estimation

Robust Monocular Epipolar Flow Estimation

Yamaguchi, McAllester, Urtasun, CVPR2013

Scene �ow estimation from monocular (not stereo) image pairs atdi�erent times

Assumes static scene

Based on

Epipolar �owPlanar superpixel assumptionSmoothing

Min Bai (UofT) Flow Estimation February 8, 2016 23 / 47

Page 33: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Epipolar Flow

Optical �ow assumed to consist of two components

p and p′ are corresponding points in I and I ′

Flow u = p′ − p

u = uw(p) + uv(p) has two components:

uw(p) due to camera rotationuv(p) due to camera translation

Idea:

Undo camera rotation �rst (by estimating F )Treat problem as epipolar �ow

Min Bai (UofT) Flow Estimation February 8, 2016 24 / 47

Page 34: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Epipolar Flow - Recti�cation

Stereo recti�cation

Source: S. Savarese

Epipolar recti�cation

Source: Yamaguchi et al

Min Bai (UofT) Flow Estimation February 8, 2016 25 / 47

Page 35: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Epipolar Flow - Recti�cation

Epipolar expansion (or contraction)

Only valid when camera motion is purely translational!Flow is con�ned to epipolar lines coming out of epipoleEpipole is found by right nullspace of F

Fo′ = 0

Recti�ed image pair have epipole at SAME locationKnowing F and o′ we can �nd epipolar line in I ′ on which p′ must lie

Source: Yamaguchi et al

Min Bai (UofT) Flow Estimation February 8, 2016 26 / 47

Page 36: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Epipolar Flow - Searching for Matches

Search along epipolar lines to �nd matching point pairsGenerate dense matches (�ow �eld)

Minimize matching cost using Semi Global Smoothing(for more info: http://www.ifp.uni-stuttgart.de/publications/phowo11/180Hirschmueller.pdf)

Source: neurology.org

Min Bai (UofT) Flow Estimation February 8, 2016 27 / 47

Page 37: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Epipolar Flow - Segmentation and Smoothing

Given motion is only translation + static scene

constant vz for all 3D points relative to camera

De�ne a ratio ωp =vp

Zpcalled the vz-index for each point p

Source: Yamaguchi et al

Min Bai (UofT) Flow Estimation February 8, 2016 28 / 47

Page 38: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Epipolar Flow - Segmentation and Smoothing

Assume each piecewise planar world - superpixels represent 3D planesJointly segment image into slanted plane superpixels using

Pixel appearance + locationFlow information (use the vz-index for each p)Regularizers

Planar assumption constrains vz-ratios for all p = (u, v) belonging tosuperpixel i centered at ci to disparity plane:

ωi = αi (u − civ ) + βi (v − civ ) + γiGoal - �t one such disparity plane described by αi , βi , γi to eachsuperpixel

Source: Yamaguchi et al

Min Bai (UofT) Flow Estimation February 8, 2016 29 / 47

Page 39: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Question

What about scenes with moving objects?

Points in general no longer obey the same epipolar constraint

How can we estimate both world geometry AND object motion?

Min Bai (UofT) Flow Estimation February 8, 2016 30 / 47

Page 40: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model

3D Scene Flow Estimation with a Piecewise Rigid Scene Model

Vogel et al, IJCV 2015

Scene �ow estimation from stereo image pairs + time series of images

Handles dynamic environment

Based on

HomographiesPiecewise planar assumption of 3D worldSingle reference view energy minimizationMulti-frame motion continuity

Min Bai (UofT) Flow Estimation February 8, 2016 31 / 47

Page 41: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Homography Review

Similar idea to epipolar geometry and fundamental matrix, butdi�erent

Fundamental Matrix:

F ⊂ R3x3, rank 2 maps point p in I to line l ′ = Fp in I ′

Valid for general 3D points in world

Homography Matrix

H ⊂ R3x3, rank 3 maps point p in I to point p′ = Hp in I ′

Valid for 3D points in world belonging to same plane nᵀP = 0

Min Bai (UofT) Flow Estimation February 8, 2016 32 / 47

Page 42: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Homography Review

"Homography" means "similar drawing"

Source: IMAGINE @ http://imagine.enpc.fr/

Min Bai (UofT) Flow Estimation February 8, 2016 33 / 47

Page 43: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Homography Review

Let π = π(R, t,~n) be a moving plane in 3D with 9 total degrees offreedom

3 degrees in each of R, t, ~n

Two observing cameras l and r taking two pictures each at t = 0 andt = 1

Camera l at t = 0 considered canonical, aka p0l

= [K |0]P0

Camera r at t = 0 has projection matrix M, or p0r

= [M|m]P0

Thus view of plane can be transformed between view points and time:

Source: Vogel et al

Min Bai (UofT) Flow Estimation February 8, 2016 34 / 47

Page 44: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Technique

Method assumes scene is piecewise planar

Fits parameters to each plane by energy minimization involving:

Single reference image (2 cameras, 2 times), or more generallyEntire image sequence terms (2 cameras, consistent motion throughtime)

Source: Vogel et al

Min Bai (UofT) Flow Estimation February 8, 2016 35 / 47

Page 45: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Technique

Single reference image (2 cameras, 2 times)

Let P be the assignment of pixels to segments

Let S be the assignment of segments to 3D moving plane

E (P,S) = ED(P,S) + λER(P,S) + µES(P) + EV(P,S)

To initialize inference, use output of other optical / stereo / scene�ow algorithms

Energy here essentially further re�nes �ow by adding additional priors

Min Bai (UofT) Flow Estimation February 8, 2016 36 / 47

Page 46: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Technique

Single reference image (2 cameras, 2 times)

Let P be the assignment of pixels to segments

Let S be the assignment of segments to 3D moving plane

E (P,S) = ED(P,S) + λER(P,S) + µES(P) + EV(P,S)

ED(P,S) encourages view consistency of planes between cameras and time

Source: Vogel et al

Min Bai (UofT) Flow Estimation February 8, 2016 37 / 47

Page 47: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Technique

Single reference image (2 cameras, 2 times)

Let P be the assignment of pixels to segments

Let S be the assignment of segments to 3D moving plane

E (P,S) = ED(P,S) + λER(P,S) + µES(P) + EV(P,S)

ER(P,S) builds in a prior favoring simpler scene geometry and motion

Source: Vogel et al

Min Bai (UofT) Flow Estimation February 8, 2016 38 / 47

Page 48: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Technique

Single reference image (2 cameras, 2 times)

Let P be the assignment of pixels to segments

Let S be the assignment of segments to 3D moving plane

E (P,S) = ED(P,S) + λER(P,S) + µES(P) + EV(P,S)

ES(P) sets maximum superpixel size so that scene model doesn't becomeoverly simple

Min Bai (UofT) Flow Estimation February 8, 2016 39 / 47

Page 49: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Technique

Single reference image (2 cameras, 2 times)

Let P be the assignment of pixels to segments

Let S be the assignment of segments to 3D moving plane

E (P,S) = ED(P,S) + λER(P,S) + µES(P) + EV(P,S)

EV(S) - based on estimation for changes in visibility of areas of image,penalize inconsistent motion proposals

Min Bai (UofT) Flow Estimation February 8, 2016 40 / 47

Page 50: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Technique

Extension to View-Consistent Model (2 cameras, more than 2 times)

Prior: objects don't suddenly teleport within sequence of frames

Prior: objects have non-zero mass (no instantaneous acceleration,smooth velocity)

Let P be the assignment of pixels to segments

Let S be the assignment of segments to 3D moving plane

E (P,S) = EVC

D (P,S) + λEVC

R (P,S) + µEVC

S (P)

Min Bai (UofT) Flow Estimation February 8, 2016 41 / 47

Page 51: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Technique

Extension to View-Consistent Model (2 cameras, more than 2 times)

Let P be the assignment of pixels to segments

Let S be the assignment of segments to 3D moving plane

E (P,S) = EVC

D (P,S) + λEVC

R (P,S) + µEVC

S (P)

EVC

D (P,S) now encourages:

View consistency between cameras + times (same as before)

Plausibility of occlusions

Fewer cases of moving out of bounds

Fewer moving plane violations

Min Bai (UofT) Flow Estimation February 8, 2016 42 / 47

Page 52: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Technique

Extension to View-Consistent Model (2 cameras, more than 2 times)

Let P be the assignment of pixels to segments

Let S be the assignment of segments to 3D moving plane

E (P,S) = EVC

D (P,S) + λEVC

R (P,S) + µEVC

S (P)

EVC

D (P,S)

Source: Vogel et al

Min Bai (UofT) Flow Estimation February 8, 2016 43 / 47

Page 53: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

3D Piecewise Rigid Scene Model - Sample Result

Source: Vogel et al

Min Bai (UofT) Flow Estimation February 8, 2016 44 / 47

Page 54: Flow Estimation - University of Torontourtasun/courses/CSC2541/03_scene_flow.pdf · Optic Flow vs Scene Flow 3D to 2D Projection Review Epipolar Constraint Review Static scene structure

Wrap-up

Thanks!

Questions?

Suggestions for future directions?

Min Bai (UofT) Flow Estimation February 8, 2016 45 / 47