Today Feature Tracking Structure from Motion on Monday (1/29)

Slides:



Advertisements
Similar presentations
The fundamental matrix F
Advertisements

Structure from motion Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Zhengyou Zhang and Marc Pollefyes.
Structure from motion Digital Visual Effects, Spring 2005 Yung-Yu Chuang 2005/4/20 with slides by Richard Szeliski, Steve Seitz, Zhengyou Zhang and Marc.
MASKS © 2004 Invitation to 3D vision Lecture 7 Step-by-Step Model Buidling.
3D Reconstruction – Factorization Method Seong-Wook Joo KG-VISA 3/10/2004.
N-view factorization and bundle adjustment CMPUT 613.
Computer Vision Optical Flow
Structure from motion.
Automatic Image Alignment (direct) : Computational Photography Alexei Efros, CMU, Fall 2006 with a lot of slides stolen from Steve Seitz and Rick.
Stanford CS223B Computer Vision, Winter 2005 Lecture 11: Structure From Motion 2 Sebastian Thrun, Stanford Rick Szeliski, Microsoft Hendrik Dahlkamp and.
Adam Rachmielowski 615 Project: Real-time monocular vision-based SLAM.
Announcements Quiz Thursday Quiz Review Tomorrow: AV Williams 4424, 4pm. Practice Quiz handout.
Stanford CS223B Computer Vision, Winter 2007 Lecture 8 Structure From Motion Professors Sebastian Thrun and Jana Košecká CAs: Vaibhav Vaish and David Stavens.
Structure from motion. Multiple-view geometry questions Scene geometry (structure): Given 2D point matches in two or more images, where are the corresponding.
Uncalibrated Geometry & Stratification Sastry and Yang
Announcements Project1 artifact reminder counts towards your grade Demos this Thursday, 12-2:30 sign up! Extra office hours this week David (T 12-1, W/F.
Feature matching and tracking Class 5 Read Section 4.1 of course notes Read Shi and Tomasi’s paper on.
Stanford CS223B Computer Vision, Winter 2006 Lecture 8 Structure From Motion Professor Sebastian Thrun CAs: Dan Maynes-Aminzade, Mitul Saha, Greg Corrado.
Announcements Project 1 test the turn-in procedure this week (make sure your folder’s there) grading session next Thursday 2:30-5pm –10 minute slot to.
Previously Two view geometry: epipolar geometry Stereo vision: 3D reconstruction epipolar lines Baseline O O’ epipolar plane.
Computer Vision Structure from motion Marc Pollefeys COMP 256 Some slides and illustrations from J. Ponce, A. Zisserman, R. Hartley, Luc Van Gool, …
Lecture 19: Optical flow CS6670: Computer Vision Noah Snavely
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Multiple View Reconstruction Class 23 Multiple View Geometry Comp Marc Pollefeys.
Motion Estimation Today’s Readings Trucco & Verri, 8.3 – 8.4 (skip 8.3.3, read only top half of p. 199) Numerical Recipes (Newton-Raphson), 9.4 (first.
1 Stanford CS223B Computer Vision, Winter 2006 Lecture 7 Optical Flow Professor Sebastian Thrun CAs: Dan Maynes-Aminzade, Mitul Saha, Greg Corrado Slides.
CSCE 641 Computer Graphics: Image-based Modeling (Cont.) Jinxiang Chai.
3D Rigid/Nonrigid RegistrationRegistration 1)Known features, correspondences, transformation model – feature basedfeature based 2)Specific motion type,
Matching Compare region of image to region of image. –We talked about this for stereo. –Important for motion. Epipolar constraint unknown. But motion small.
KLT tracker & triangulation Class 6 Read Shi and Tomasi’s paper on good features to track
Optical Flow Digital Photography CSE558, Spring 2003 Richard Szeliski (notes cribbed from P. Anandan)
Announcements Project1 due Tuesday. Motion Estimation Today’s Readings Trucco & Verri, 8.3 – 8.4 (skip 8.3.3, read only top half of p. 199) Supplemental:
CSCE 641 Computer Graphics: Image-based Modeling (Cont.) Jinxiang Chai.
TP15 - Tracking Computer Vision, FCUP, 2013 Miguel Coimbra Slides by Prof. Kristen Grauman.
Optical Flow Donald Tanguay June 12, Outline Description of optical flow General techniques Specific methods –Horn and Schunck (regularization)
Structure from Motion, Feature Tracking, and Optical Flow Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 04/15/10 Many slides adapted.
The Measurement of Visual Motion P. Anandan Microsoft Research.
CSCE 643 Computer Vision: Structure from Motion
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Last lecture Passive Stereo Spacetime Stereo Multiple View Stereo.
Affine Structure from Motion
Feature Reconstruction Using Lucas-Kanade Feature Tracking and Tomasi-Kanade Factorization EE7740 Project I Dr. Gunturk.
Raquel A. Romano 1 Scientific Computing Seminar May 12, 2004 Projective Geometry for Computer Vision Projective Geometry for Computer Vision Raquel A.
Last lecture Passive Stereo Spacetime Stereo.
EECS 274 Computer Vision Affine Structure from Motion.
Motion Estimation Today’s Readings Trucco & Verri, 8.3 – 8.4 (skip 8.3.3, read only top half of p. 199) Newton's method Wikpedia page
Structure from motion Digital Visual Effects, Spring 2008 Yung-Yu Chuang 2008/4/22 with slides by Richard Szeliski, Steve Seitz, Zhengyou Zhang and Marc.
776 Computer Vision Jan-Michael Frahm & Enrique Dunn Spring 2013.
Tracking with dynamics
Lecture 9 Feature Extraction and Motion Estimation Slides by: Michael Black Clark F. Olson Jean Ponce.
Structure from Motion ECE 847: Digital Image Processing
Structure from Motion Paul Heckbert, Nov , Image-Based Modeling and Rendering.
Motion Estimation Today’s Readings Trucco & Verri, 8.3 – 8.4 (skip 8.3.3, read only top half of p. 199) Newton's method Wikpedia page
Structure from motion Multi-view geometry Affine structure from motion Projective structure from motion Planches : –
EECS 274 Computer Vision Projective Structure from Motion.
Optical flow and keypoint tracking Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Structure from motion Digital Visual Effects, Spring 2007 Yung-Yu Chuang 2007/4/24 with slides by Richard Szeliski, Steve Seitz, Zhengyou Zhang and Marc.
Motion estimation Digital Visual Effects, Spring 2005 Yung-Yu Chuang 2005/3/23 with slides by Michael Black and P. Anandan.
Reconstruction of a Scene with Multiple Linearly Moving Objects Mei Han and Takeo Kanade CISC 849.
Motion and Optical Flow
Structure from motion II
SFM under orthographic projection
Structure from motion Input: Output: (Tomasi and Kanade)
Announcements more panorama slots available now
Announcements Questions on the project? New turn-in info online
Announcements more panorama slots available now
Optical flow and keypoint tracking
Structure from motion Input: Output: (Tomasi and Kanade)
Tracking Many slides adapted from Kristen Grauman, Deva Ramanan.
Presentation transcript:

Today Feature Tracking Structure from Motion on Monday (1/29) Good features to track (Shi and Tomasi paper) Tracking Structure from Motion Tomasi and Kanade Singular value decomposition Extensions on Monday (1/29) Multi-view relations The fundamental matrix Robust estimation Assignment 2 out

Structure from Motion Reconstruct Scene geometry Camera motion Unknown viewpoints Reconstruct Scene geometry Camera motion

Structure from Motion The SFM Problem SFM Pipeline Reconstruct scene geometry and camera motion from two or more images Track 2D Features Estimate 3D Optimize (Bundle Adjust) Fit Surfaces SFM Pipeline

Structure from Motion Step 1: Track Features Detect good features corners, line segments Find correspondences between frames Lucas & Kanade-style motion estimation window-based correlation

Structure from Motion Step 2: Estimate Motion and Structure Structure Images Motion Structure Step 2: Estimate Motion and Structure Simplified projection model, e.g., [Tomasi 92] 2 or 3 views at a time [Hartley 00]

Structure from Motion Step 3: Refine Estimates “Bundle adjustment” in photogrammetry Discussed last lecture and in Triggs reading Other iterative methods

Structure from Motion Step 4: Recover Surfaces Poor mesh Good mesh Morris and Kanade, 2000 Step 4: Recover Surfaces Image-based triangulation [Morris 00, Baillard 99] Silhouettes [Fitzgibbon 98] Stereo [Pollefeys 99]

Feature Tracking Problem Issues Find correspondence between n features in f images Issues What’s a feature? What does it mean to “correspond”? How can correspondence be reliably computed?

Tracking Features Approach Compute motion of a small image patch Alternatively: line segment, curve, shape

Feature Correspondence Correspondence Problem Given feature patch F in frame J, find best match in frame I Find displacement (u,v) that minimizes SSD error over feature region Solution Small displacement: Lukas-Kanade Large displacement: discrete search over (u,v) Choose match that minimizes SSD (or normalized correlation) When will this fail?

Feature Distortion Feature may change shape over time Need a distortion model to really make this work Find displacement (u,v) that minimizes SSD error over feature region Minimize with respect to Wx and Wy Shi and Tomasi reading gives derivation for affine model

Selecting Good Features What’s a “good feature”? Satisfies brightness constancy Has sufficient texture variation Does not have too much texture variation Corresponds to a “real” surface patch Does not deform too much over time Shi-Tomasi Criterion Best match SSD error between I and J should be small

Good Features to Track Translation Case When is This Solvable? A u = b Optimal (u, v) satisfies Lucas-Kanade equation A u = b When is This Solvable? A should be invertible A should not be too small due to noise eigenvalues l1 and l2 of A should not be too small A should be well-conditioned l1/ l2 should not be too large (l1 = larger eigenvalue) Both conditions satisfied when min(l1, l2) > c

Selecting Good Features l1 and l2 are large

Selecting Good Features large l1, small l2

Selecting Good Features small l1, small l2

Tracking Over Many Frames So far we’ve only considered two frames Basic extension to m frames Select features in first frame Given feature in frame i, compute position/deformation in i+1 Select more features if needed i = i + 1 If i < f, go to step 2 Issues Discrete search vs. Lucas Kanade? depends on expected magnitude of motion discrete search is more flexible How often to update feature template? update often enough to compensate for distortion updating too often causes drift How big should search window be? too small: lost features. Too large: slow

Incorporating Dynamics Idea Can get better performance if we know something about the way points move Most approaches assume constant velocity or constant acceleration Use above to predict position in next frame, initialize search

Modeling Uncertainty Kalman Filtering (http://www.cs.unc.edu/~welch/kalman/) Updates feature state and Gaussian uncertainty model Get better prediction, confidence estimate CONDENSATION [Isard 98] Also known as “particle filtering” Updates probability distribution over all possible states Can cope with multiple hypotheses

Structure from Motion The SFM Problem Assume Reconstruct scene geometry and camera positions from two or more images Assume Pixel correspondence via tracking Projection model classic methods are orthographic newer methods use perspective practically any model is possible with bundle adjustment

Optimal Estimation Feature measurement equations Log likelihood of K,R,t given {(ui,vi)} Minimized via Bundle Adjustment Nonlinear least squares regression Discussed last time Today: Linear Structure from Motion Useful for orthographic camera models Can be used as initialization for bundle adjustment

SFM Under Orthographic Projection image point projection matrix scene point image offset More generally: weak perspective, para-perspective, affine Trick Choose scene origin to be centroid of 3D points Choose image origins to be centroid of 2D points Allows us to drop the camera translation:

Shape by Factorization [Tomasi & Kanade, 92] projection of n features in one image: projection of n features in f images W measurement M motion S shape Key Observation: rank(W) <= 3

Shape by Factorization [Tomasi & Kanade, 92] known solve for Factorization Technique W is at most rank 3 (assuming no noise) We can use singular value decomposition to factor W: S’ differs from S by a linear transformation A: Solve for A by enforcing metric constraints on M

Metric Constraints Orthographic Camera Weak Perspective Camera Rows of P are orthonormal: Weak Perspective Camera Rows of P are orthogonal: Enforcing “Metric” Constraints Compute A such that rows of M have these properties Trick (not in original Tomasi/Kanade paper, but in followup work) Constraints are linear in AAT : Solve for G first by writing equations for every Pi in M Then G = AAT by SVD (since U = V)

Factorization With Noisy Data SVD Gives this solution Provides optimal rank 3 approximation W’ of W Approach Estimate W’, then use noise-free factorization of W’ as before Result minimizes the SSD between positions of image features and projection of the reconstruction

Many Extensions Independently Moving Objects Perspective Projection Outlier Rejection Subspace Constraints SFM Without Correspondence

Extending Factorization to Perspective Several Recent Approaches [Christy 96]; [Triggs 96]; [Han 00] Initialize with ortho/weak perspective model then iterate Christy & Horaud Derive expression for weak perspective as a perspective projection plus a correction term: Basic procedure: Run Tomasi-Kanade with weak perspective Solve for i (different for each row of M) Add correction term to W, solve again (until convergence)

Closing the Loop Problem Can We Use SFM to Help Track Points? Requires good tracked features as input Can We Use SFM to Help Track Points? Basic idea: recall form of Lucas-Kanade equation: Matrix on RHS has rank <= 3 !! Use SVD to compute a rank 3 approximation Has effect of filtering optical flow values to be consistent [Irani 99]

From [Irani 99]

References C. Baillard & A. Zisserman, “Automatic Reconstruction of Planar Models from Multiple Views”, Proc. Computer Vision and Pattern Recognition Conf. (CVPR 99) 1999, pp. 559-565. S. Christy & R. Horaud, “Euclidean shape and motion from multiple perspective views by affine iterations”, IEEE Transactions on Pattern Analysis and Machine Intelligence, 18(10):1098-1104, November 1996 (ftp://ftp.inrialpes.fr/pub/movi/publications/rec-affiter-long.ps.gz) A.W. Fitzgibbon, G. Cross, & A. Zisserman, “Automatic 3D Model Construction for Turn-Table Sequences”, SMILE Workshop, 1998. M. Han & T. Kanade, “Creating 3D Models with Uncalibrated Cameras”, Proc. IEEE Computer Society Workshop on the Application of Computer Vision (WACV2000), 2000. R. Hartley & A. Zisserman, “Multiple View Geometry”, Cambridge Univ. Press, 2000. R. Hartley, “Euclidean Reconstruction from Uncalibrated Views”, In Applications of Invariance in Computer Vision, Springer-Verlag, 1994, pp. 237-256. M. Isard and A. Blake, “CONDENSATION -- conditional density propagation for visual tracking”, International Journal Computer Vision, 29, 1, 5--28, 1998. (ftp://ftp.robots.ox.ac.uk/pub/ox.papers/VisualDynamics/ijcv98.ps.gz) D. Morris & T. Kanade, “Image-Consistent Surface Triangulation”, Proc. Computer Vision and Pattern Recognition Conf. (CVPR 00), pp. 332-338. M. Pollefeys, R. Koch & L. Van Gool, “Self-Calibration and Metric Reconstruction in spite of Varying and Unknown Internal Camera Parameters”, Int. J. of Computer Vision, 32(1), 1999, pp. 7-25. J. Shi and C. Tomasi, “Good Features to Track”, IEEE Conf. on Computer Vision and Pattern Recognition (CVPR 94), 1994, pp. 593-600 (http://www.cs.washington.edu/education/courses/cse590ss/01wi/notes/good-features.pdf) C. Tomasi & T. Kanade, ”Shape and Motion from Image Streams Under Orthography: A Factorization Method", Int. Journal of Computer Vision, 9(2), 1992, pp. 137-154. B. Triggs, “Factorization methods for projective structure and motion”, Proc. Computer Vision and Pattern Recognition Conf. (CVPR 96), 1996, pages 845--51. M. Irani, “Multi-Frame Optical Flow Estimation Using Subspace Constraints”, IEEE International Conference on Computer Vision (ICCV), 1999 (http://www.wisdom.weizmann.ac.il/~irani/abstracts/flow_iccv99.html)