EECS 274 Computer Vision Affine Structure from Motion.

Slides:



Advertisements
Similar presentations
Scene Reconstruction from Two Projections Eight Points Algorithm Speaker: Junwen WU Course:CSE291 Learning and Vision Seminar Date: 11/13/2001.
Advertisements

Epipolar Geometry.
3D reconstruction.
Two-View Geometry CS Sastry and Yang
Two-view geometry.
Camera Calibration. Issues: what are intrinsic parameters of the camera? what is the camera matrix? (intrinsic+extrinsic) General strategy: view calibration.
Camera calibration and epipolar geometry
Structure from motion.
Projective structure from motion
Stanford CS223B Computer Vision, Winter 2005 Lecture 11: Structure From Motion 2 Sebastian Thrun, Stanford Rick Szeliski, Microsoft Hendrik Dahlkamp and.
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Geometry of Images Pinhole camera, projection A taste of projective geometry Two view geometry:  Homography  Epipolar geometry, the essential matrix.
Epipolar geometry. (i)Correspondence geometry: Given an image point x in the first view, how does this constrain the position of the corresponding point.
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
Epipolar Geometry and the Fundamental Matrix F
CS485/685 Computer Vision Prof. George Bebis
Multiple-view Reconstruction from Points and Lines
3D reconstruction of cameras and structure x i = PX i x’ i = P’X i.
Many slides and illustrations from J. Ponce
Uncalibrated Epipolar - Calibration
Calibration Dorit Moshe.
© 2003 by Davi GeigerComputer Vision October 2003 L1.1 Structure-from-EgoMotion (based on notes from David Jacobs, CS-Maryland) Determining the 3-D structure.
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, …
The Pinhole Camera Model
Projected image of a cube. Classical Calibration.
Affine structure from motion
Advanced Computer Vision Structure from Motion. Geometric structure-from-motion problem: using image matches to estimate: The 3D positions of the corresponding.
CSCE 641 Computer Graphics: Image-based Modeling (Cont.) Jinxiang Chai.
3-D Scene u u’u’ Study the mathematical relations between corresponding image points. “Corresponding” means originated from the same 3D point. Objective.
Multi-view geometry. Multi-view geometry problems Structure: Given projections of the same 3D point in two or more images, compute the 3D coordinates.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
Computer vision: models, learning and inference
Euclidean cameras and strong (Euclidean) calibration Intrinsic and extrinsic parameters Linear least-squares methods Linear calibration Degenerate point.
Camera Geometry and Calibration Thanks to Martial Hebert.
Multi-view geometry.
1 Preview At least two views are required to access the depth of a scene point and in turn to reconstruct scene structure Multiple views can be obtained.
Projective cameras Motivation Elements of Projective Geometry Projective structure from motion Planches : –
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
Course 12 Calibration. 1.Introduction In theoretic discussions, we have assumed: Camera is located at the origin of coordinate system of scene.
Geometric Models & Camera Calibration
Multiview Geometry and Stereopsis. Inputs: two images of a scene (taken from 2 viewpoints). Output: Depth map. Inputs: multiple images of a scene. Output:
Geometric Camera Models
Geometry of Multiple Views
Multi-linear Systems and Invariant Theory in the Context of Computer Vision and Graphics CS329 Amnon Shashua.
Affine Structure from Motion
Single-view geometry Odilon Redon, Cyclops, 1914.
Two-view geometry. Epipolar Plane – plane containing baseline (1D family) Epipoles = intersections of baseline with image planes = projections of the.
1 Chapter 2: Geometric Camera Models Objective: Formulate the geometrical relationships between image and scene measurements Scene: a 3-D function, g(x,y,z)
Reconnaissance d’objets et vision artificielle Jean Ponce Equipe-projet WILLOW ENS/INRIA/CNRS UMR 8548 Laboratoire.
Computer vision: models, learning and inference M Ahad Multiple Cameras
776 Computer Vision Jan-Michael Frahm & Enrique Dunn Spring 2013.
Structure from Motion ECE 847: Digital Image Processing
MASKS © 2004 Invitation to 3D vision Uncalibrated Camera Chapter 6 Reconstruction from Two Uncalibrated Views Modified by L A Rønningen Oct 2008.
Determining 3D Structure and Motion of Man-made Objects from Corners.
Uncalibrated reconstruction Calibration with a rig Uncalibrated epipolar geometry Ambiguities in image formation Stratified reconstruction Autocalibration.
Structure from motion Multi-view geometry Affine structure from motion Projective structure from motion Planches : –
EECS 274 Computer Vision Projective Structure from Motion.
11/25/03 3D Model Acquisition by Tracking 2D Wireframes Presenter: Jing Han Shiau M. Brown, T. Drummond and R. Cipolla Department of Engineering University.
55:148 Digital Image Processing Chapter 11 3D Vision, Geometry
Epipolar geometry.
Structure from motion Input: Output: (Tomasi and Kanade)
Geometric Camera Models
3D reconstruction class 11
Advanced Computer Vision
Uncalibrated Geometry & Stratification
Single-view geometry Odilon Redon, Cyclops, 1914.
The Pinhole Camera Model
Structure from motion Input: Output: (Tomasi and Kanade)
Presentation transcript:

EECS 274 Computer Vision Affine Structure from Motion

Affine structure from motion Structure from motion (SFM) Elements of affine geometry Affine SFM from two views –Geometric approach –Affine epipolar geometry –Affine SFM from multiple views –From affine to Euclidean images Image-based rendering Reading: FP Chapter 8

Affine structure from motion Given a sequence of images Find out feature points in 2D images Find out corresponding features Find out their 3D positions Find out their affine motion

Affine Structure from Motion Reprinted with permission from “Affine Structure from Motion,” by J.J. (Koenderink and A.J.Van Doorn, Journal of the Optical Society of America A, 8: (1990).  1990 Optical Society of America. Given m pictures of n points, can we recover the three-dimensional configuration of these points? the camera configurations (projection matrices)? (structure) (motion)

Scene relief When the scene relief is small (compared with the overall distance separating it from the observing camera), affine projection models can be used to approximate the imaging process

Orthographic Projection Parallel Projection consider the points off optical axis viewing rays are parallel R is a scene reference point

Weak-Perspective Projection (generalizes orthographic projection) Paraperspective Projection (generalizes parallel projection) R is a scene reference point Affine projection models consider the distortions for points off the optical axis

Affine projection equations Consider weak perspective projection and let z r denote the depth of a reference point R, then P  P’  p R 2 is a 2 × 3 matrix of the first 2 rows of R and t 2 is a vector formed by first 2 elements of t p is the non-homogenous coordinate t 2, p 0 does not change with a translation K : calibration matrix M : projection matrix

Weak perspective projection k and s denote the aspect ratio and skew of the camera M is a 2 × 4 matrix defined by –2 intrinsic parameters –5 extrinsic parameters –1 scene-dependent structure parameter z r See Chapter 1.2 of FP

The Affine Structure-from-Motion Problem Given m images of n matched points P j we can write Problem: estimate the m 2 × 4 affine projection matrices M i and the n positions P j from the mn correspondences p ij 2mn equations in 8m+3n unknowns Overconstrained problem, that can be solved using (non-linear) least squares! Here p ij is 2 × 1 non-homogenous coordinate, and M i = (A i b i )

The Affine Ambiguity of Affine SFM If M and P are solutions, i j So are M’ and P’ where i j and Q is an affine transformation. When the intrinsic and extrinsic parameters are unknown C is a 3 × 3 non-singular matrix and d is in R 3

Affine Structure from Motion Any solution of the affine structure from motion (sfm) can only be defined up to an affine transformation ambiguity Consider the 12 parameters for affine transformations, for 2 views (m=2), we need at least 4 point correspondences to determine the projection matrices and 3D points 2mn ≥ 8m + 3n - 12

With known intrinsic parameters Exploit constraints of M i = (A i b i ) (See Chapter 1.2) to eliminate ambiguity First find affine shape Use additional views and constraints to determine Euclidean structure

2D planar transformations Preserve parallelism and ratio of distance between colinear points

Affine Spaces: (Semi-Formal) Definition Left identity Associativity Uniqueness P, Q: points u: vector

Example: R as an Affine Space 2 P, Q: points u: vector

In General The notation is justified by the fact that choosing some origin O in X allows us to identify the point P with the vector OP, i.e. u=OP, Φ u (O)=P Warning: P+u and Q-P are defined independently of O!! Namely, no distinguished point serves as an origin

Barycentric Combinations Can we add points? R=P+Q NO! But, when we can define Note by introducing an arbitrary origin O: Can “add” a vector to a point and “subtract” two points Define a point by adding a vector to a point (independent of any choice)

Affine Subspaces Can be defined purely in terms of points defined by a point O and a vector subspace U m+1 points define a m-dimensional subspace

Affine Coordinates Coordinate system for U: Coordinate system for Y=O+U: Coordinate system for Y: Affine coordinates: Barycentric coordinates: Affine coordinates of P in the basis formed by points A i vector subspace affine subspace Define A 0 P in (u 1, …u m )

Affine Transformations Bijections from X to Y that: map m-dimensional subspaces of X onto m-dimensional subspaces of Y; map parallel subspaces onto parallel subspaces; and preserve affine (or barycentric) coordinates. The affine coordinates of D in the basis of A,B,C are the same as those of D’ in the basis of A’,B’, and C’ – namely 2/3 and ½. In R 3 they are combinations of rigid transformations, non-uniform scaling and shear Bijections from X to Y that: map lines of X onto lines of Y; and preserve the ratios of signed lengths of line segments.

Affine Transformations II Given two affine spaces X and Y of dimension m, and two coordinate frames (A) and (B) for these spaces, there exists a unique affine transformation mapping (A) onto (B). Given an affine transformation from X to Y, one can always write: When coordinate frames have been chosen for X and Y, this translates into:

Affine projections induce affine transformations from planes onto their images. Preserve ratio of distance between colinear points, parallelism, and affine coordinates Weak- and paraperspective projections are affine transformations

Affine Shape Two point sets S and S’ in some affine space X are affinely equivalent when there exists an affine transformation  : X X such that X’ =  ( X ). Affine structure from motion = affine shape recovery. = recovery of the corresponding motion equivalence classes.

Geometric affine scene reconstruction from two images (Koenderink and Van Doorn, 1991).  affine coordinates of P in the basis (A,B,C,D), i.e., 4 points are sufficient 4 points define 2 affine views Affine projection of a plane onto another plane is an affine transformation Affine coordinates in π can be measured by other two images

Affine Structure from Motion (Koenderink and Van Doorn, 1991) Reprinted with permission from “Affine Structure from Motion,” by J.J. (Koenderink and A.J.Van Doorn, Journal of the Optical Society of America A, 8: (1990).  1990 Optical Society of America. Given 2 affine views of 4 non-coplanar ponits, the affine shape of the scene is uniquely determined

Algebraic motion estimation using affine epipolar constraint α,β, α’,β’ are constants depending on A, A’, b, b’ affine epipolar constraint

Affine Epipolar Geometry Given point p=(u,v) T, the matching point p’=(u’,v’) T lies on α’u’+β’v’+γ’ = 0 where γ’=αu+βv+δ Note: the epipolar lines are parallel. Moving p change γ’, or equivalent, the distance from the origin to the epipolar line l’, but does not change the direction.

The Affine Fundamental Matrix where affine fundamental matrix

Algebraic Scene Reconstruction Method Q is an arbitrary affine transformation Given enough point correspondences, a, b, c, d can be estimated by linear least squares

An Affine Trick..Algebraic Scene Reconstruction Method

The Affine Structure and Motion from Multiple Images Suppose we observe a scene with m fixed cameras. The set of all images of a fixed scene is a 3D affine space!

has rank (at most) 4!

From Affine to Vectorial Structure (Vector Space) Idea: pick one of the points (or their center of mass) as the origin.

What if we could factorize D? (Tomasi and Kanade, 1992) Affine SFM is solved! Singular Value Decomposition We can take

From uncalibrated to calibrated cameras Weak-perspective camera: Calibrated camera: take k=1, s=0 using normalized coordinate and z r =1 Problem: what is affine transformation Q ? Note: Absolute scale cannot be recovered. The Euclidean shape (defined up to an arbitrary similitude) is recovered.

Reconstruction Results (Tomasi and Kanade, 1992) Reprinted from “Factoring Image Sequences into Shape and Motion,” by C. Tomasi and T. Kanade, Proc. IEEE Workshop on Visual Motion (1991).  1991 IEEE.

Photo tourism/photosynth