CS 664 Slides #9 Multi-Camera Geometry. Prof. Dan Huttenlocher Fall 2003

Similar documents
Epipolar Geometry Prof. D. Stricker. With slides from A. Zisserman, S. Lazebnik, Seitz

Rectification and Disparity

Unit 3 Multiple View Geometry

Lecture 14: Basic Multi-View Geometry

55:148 Digital Image Processing Chapter 11 3D Vision, Geometry

Image Rectification (Stereo) (New book: 7.2.1, old book: 11.1)

Multiple View Geometry

Machine vision. Summary # 11: Stereo vision and epipolar geometry. u l = λx. v l = λy

calibrated coordinates Linear transformation pixel coordinates

Camera Calibration. Schedule. Jesus J Caban. Note: You have until next Monday to let me know. ! Today:! Camera calibration

Epipolar geometry. x x

Epipolar Geometry class 11

Rectification and Distortion Correction

Epipolar Geometry and the Essential Matrix

CS664 Lecture #19: Layers, RANSAC, panoramas, epipolar geometry

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Two-view geometry Computer Vision Spring 2018, Lecture 10

Stereo Vision. MAN-522 Computer Vision

Computer Vision I. Announcement. Stereo Vision Outline. Stereo II. CSE252A Lecture 15

METRIC PLANE RECTIFICATION USING SYMMETRIC VANISHING POINTS

Computer Vision Lecture 17

Computer Vision Lecture 17

Epipolar Geometry and Stereo Vision

Today. Stereo (two view) reconstruction. Multiview geometry. Today. Multiview geometry. Computational Photography

Agenda. Rotations. Camera calibration. Homography. Ransac

3D Geometry and Camera Calibration

MAPI Computer Vision. Multiple View Geometry

N-Views (1) Homographies and Projection

CSE 252B: Computer Vision II

Reminder: Lecture 20: The Eight-Point Algorithm. Essential/Fundamental Matrix. E/F Matrix Summary. Computing F. Computing F from Point Matches

Computer Vision cmput 428/615

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

Homogeneous Coordinates. Lecture18: Camera Models. Representation of Line and Point in 2D. Cross Product. Overall scaling is NOT important.

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

CS201 Computer Vision Camera Geometry

1 Projective Geometry

CS-9645 Introduction to Computer Vision Techniques Winter 2019

Camera Model and Calibration

CS6670: Computer Vision

Geometric camera models and calibration

Stereo Vision Computer Vision (Kris Kitani) Carnegie Mellon University

Rectification. Dr. Gerhard Roth

Agenda. Rotations. Camera models. Camera calibration. Homographies

Multiple Views Geometry

Multi-View Geometry Part II (Ch7 New book. Ch 10/11 old book)

C / 35. C18 Computer Vision. David Murray. dwm/courses/4cv.

Epipolar Geometry and Stereo Vision

Epipolar Geometry and Stereo Vision

Lecture 9: Epipolar Geometry

Epipolar Geometry and Stereo Vision

Week 2: Two-View Geometry. Padua Summer 08 Frank Dellaert

Camera Geometry II. COS 429 Princeton University

Computer Vision. Coordinates. Prof. Flávio Cardeal DECOM / CEFET- MG.

Multi-view geometry problems

Announcements. Stereo

COMPARATIVE STUDY OF DIFFERENT APPROACHES FOR EFFICIENT RECTIFICATION UNDER GENERAL MOTION

CS 2770: Intro to Computer Vision. Multiple Views. Prof. Adriana Kovashka University of Pittsburgh March 14, 2017

Recovering structure from a single view Pinhole perspective projection

Elements of Computer Vision: Multiple View Geometry. 1 Introduction. 2 Elements of Geometry. Andrea Fusiello

Camera models and calibration

Compositing a bird's eye view mosaic

Augmented Reality II - Camera Calibration - Gudrun Klinker May 11, 2004

But First: Multi-View Projective Geometry

Vision Review: Image Formation. Course web page:

Projective Rectification from the Fundamental Matrix

Computer Vision I - Algorithms and Applications: Multi-View 3D reconstruction

Pin Hole Cameras & Warp Functions

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...

Stereo Image Rectification for Simple Panoramic Image Generation

55:148 Digital Image Processing Chapter 11 3D Vision, Geometry

3D reconstruction class 11

Structure from Motion. Prof. Marco Marcon

DD2423 Image Analysis and Computer Vision IMAGE FORMATION. Computational Vision and Active Perception School of Computer Science and Communication

BIL Computer Vision Apr 16, 2014

Fundamentals of Stereo Vision Michael Bleyer LVA Stereo Vision

Multiple View Geometry in Computer Vision

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

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

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Camera Model and Calibration. Lecture-12

Announcements. Stereo

Last lecture. Passive Stereo Spacetime Stereo

Lecture 6 Stereo Systems Multi-view geometry

Comments on Consistent Depth Maps Recovery from a Video Sequence

Instance-level recognition I. - Camera geometry and image alignment

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

Robust Geometry Estimation from two Images

Structure from motion

Image Transfer Methods. Satya Prakash Mallick Jan 28 th, 2003

Single View Geometry. Camera model & Orientation + Position estimation. What am I?

Index. 3D reconstruction, point algorithm, point algorithm, point algorithm, point algorithm, 253

Computer Vision I Name : CSE 252A, Fall 2012 Student ID : David Kriegman Assignment #1. (Due date: 10/23/2012) x P. = z

Perspective Projection in Homogeneous Coordinates

Planar homographies. Can we reconstruct another view from one image? vgg/projects/singleview/

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

6.819 / 6.869: Advances in Computer Vision Antonio Torralba and Bill Freeman. Lecture 11 Geometry, Camera Calibration, and Stereo.

Pin Hole Cameras & Warp Functions

Stereo Epipolar Geometry for General Cameras. Sanja Fidler CSC420: Intro to Image Understanding 1 / 33

Depth from two cameras: stereopsis

Mathematics of a Multiple Omni-Directional System

Transcription:

CS 664 Slides #9 Multi-Camera Geometry Prof. Dan Huttenlocher Fall 2003

Pinhole Camera Geometric model of camera projection Image plane I, which rays intersect Camera center C, through which all rays pass Focal length f, distance from I to C 2

Pinhole Camera Projection Point (X,Y,Z) in space and image (x,y) in I Simplified case C at origin in space I perpendicular to Z axis x=fx/z (x/f=x/z) y=fy/z (y/f=y/z) 3

Homogeneous Coordinates Geometric intuition useful but not well suited to calculation Projection not linear in Euclidean plane but is in projective plane (homogeneous coords) For a point (x,y) in the plane Homogeneous coordinates are (αx, αy, α) for any nonzero α (generally use α=1) Overall scaling unimportant (X,Y,W) = (αx, αy, αw) Convert back to Euclidean plane (x,y) = (X/W,Y/W) 4

Lines in Homogeneous Coordinates Consider line in Euclidean plane ax+by+c = 0 Equation unaffected by scaling so ax+by+cw = 0 u T p=p T u = 0 (point on line test, dot product) Where u = (a,b,c) T is the line And p = (X,Y,W) T is a point on the line u So points and lines have same representation in projective plane (i.e., in h.c.) Parameters of line Slope a/b, x-intercept c/a, y-intercept c/b 5

Consider two lines Lines and Points a 1 x+b 1 y+c 1 = 0 and a 2 x+b 2 y+c 2 = 0 Can calculate their intersection as (b 1 c 2 -b 2 c 1 /a 1 b 2 -a 2 b 1, a 2 c 1 -a 1 c 2 /a 1 b 2 -a 2 b 1 ) In homogeneous coordinates u 1 =(a 1,b 1,c 1 ) and u 2 =(a 2,b 2,c 2 ) Simply cross product p = u 1 u 2 Parallel lines yield point not in Euclidean plane Similarly given two points p 1 =(X 1,Y 1,W 1 ) and p 2 =(X 2,Y 2,W 2 ) Line through the points is simply u = p 1 p 2 6

Collinearity and Coincidence Three points collinear (lie on same line) Line through first two is p 1 p 2 Third point lies on this line if p 3T (p 1 p 2 )=0 Equivalently if det[p 1 p 2 p 3 ]=0 Three lines coincident (intersect at one point) Similarly det[u 1 u 2 u 3 ]=0 Note relation of determinant to cross product u 1 u 2 = (b 1 c 2 -b 2 c 1, a 2 c 1 -a 1 c 2, a 1 b 2 -a 2 b 1 ) Compare to geometric calculations 7

8 Back to Simplified Pinhole Camera Geometrically saw x=fx/z, y=fy/z = 1 0 1 0 0 Z Y X f f Z fy fx 3x4 Projection Matrix

9 Principal Point Calibration Intersection of principal axis with image plane often not at image origin = 1 0 1 0 0 Z Y X f f Z fy+zp y fx+zp x p y p x 1 f f p y p x (Intrinsic) Calibration matrix K=

CCD Camera Calibration Spacing of grid points Effectively separate scale factors along each axis composing focal length and pixel spacing K= m x f m y f p x p y 1 = α β p x p y 1 10

Camera Rigid Motion Projection P=K[R t] Camera motion: alignment of 3D coordinate systems Full extrinsic parameters beyond scope of this course, see Multiple View Geometry by Hartley and Zisserman 11

Two View Geometry Point X in world and two camera centers C, C define the epipolar plane Images x,x of X in two image planes lie on this plane Intersection of line CC with image planes define special points called epipoles, e,e e e 12

Epipolar Lines Set of points that project to x in I define line l in I Called epipolar line Goes through epipole e A point x in I thus maps to a point on l in I Rather than to a point anywhere in I 13

Epipolar Geometry Two-camera system defines one parameter family (pencil) of planes through baseline CC Each such plane defines matching epipolar lines in two image planes One parameter family of lines through each epipole Correspondence between images 14

Converging Stereo Cameras Corresponding points lie on corresponding epipolar lines Known camera geometry so 1D not 2D search! 15

Motion Examples Epipoles in direction of motion Parallel to Image Plane Forward 16

Final Project Feel free to pick any vision related topic but discuss with me first Email choice to me by Tuesday, 11/18 Projects due Tuesday 12/16 Suggested topics Video insertion using affine motion estimation Panoramic mosaics Synthesis of novel views from stereo Hausdorff based learning and matching Flexible template matching Stereo or motion using belief propagation 17

Fundamental and Essential Matrix Linear algebra formulation of the epipolar geometry Fundamental matrix, F, maps point x in I to corresponding epipolar line l in I l =Fx Determined for particular camera geometry For stereo cameras only changes if cameras move with respect to one another Essential matrix, E, when camera calibration (intrinsic parameters) known 18

Fundamental Matrix Epipolar constraint x T Fx=x T l =0 Thus from enough corresponding pairs of points in the two images can solve for F However not as simple as least squares minimization because F not fully general matrix Consider form of F in more detail L A x l l A F=AL l 19

Form of Fundamental Matrix L: x l Epipolar line l goes through x and epipole e Epipole determines L l = x e If e=(u,v,w) l = Lx (rewriting cross product) L = 0 w -v -w 0 u v -u 0 L is rank 2 and has 2 d.o.f. l 20

Form of Fundamental Matrix A: l l Constrained by 3 pairs of epipolar lines l i =A l i Note only 5 d.o.f. First two line correspondences each provide two constraints Third provides only one constraint as lines must go through intersection of first two F=AL rank 2 matrix with 7 d.o.f. As opposed to 8 d.o.f. in 3x3 homogeneous system 21

Properties of F Unique 3x3 rank 2 matrix satisfying x T Fx=0 for all pairs x,x Constrained minimization techniques can be used to solve for F given point pairs F has 7 d.o.f. 3x3 homogeneous (9-1=8), rank 2 (8-1=7) Epipolar lines l =Fx and reverse map l=f T x Because also (Fx) T x =0 but then x T (F T x )=0 Epipoles e T F=0 and Fe=0 Because e T l =0 for any l ; Le=0 by construction 22

Stereo (Epipolar) Rectification Given F, simplify stereo matching problem by warping images Common image plane for two cameras Epipolar lines parallel to x-axis Epipole at (1,0,0) Corresponding scan lines of two images e e Intel vision library: calibration and rectification 23

Planar Rectification Move epipoles to infinity Poor when epipoles near image 24

Stereo Matching Seek corresponding pixels in I, I Only along epipolar lines Rectified imaging geometry so just horizontal disparity D at each pixel I (x,y )=I(x+D(x,y),y) Best methods minimize energy based on matching (data) and discontinuity costs Stereo 25

Plane Homography Projective transformation mapping points in one plane to points in another In homogeneous coordinates ax+by+cw a = dx+ey+fw d gx+hy+iw g Maps four (coplanar) points to any four b e h Quadrilateral to quadrilateral Does not preserve parallelism c f i X Y W 26

Contrast with Affine Can represent in Euclidean plane x =Lx+t Arbitrary 2x2 matrix L and 2-vector t In homogeneous coordinates ax+by+cw a b c X dx+ey+fw = d e f Y W 0 0 i W Maps three points to any three Maps triangles to triangles Preserves parallelism 27

Homography Example Changing viewpoint of single view Correspondences in observed and desired views E.g., from 45 degree to frontal view Quadrilaterals to rectangles Variable resolution and non-planar artifacts 28

Homography and Epipolar Geometry Plane in space π induces homography H between image planes x =H π x for point X on π, x on I, x on I π 29

Obeys Epipolar Geometry Given F,H π no search for x (points on π) x T Fx=0, x T H πt Fx=0 Maps epipoles, e = H π e π 30

Computing Homography Correspondences of four points that are coplanar in world (no need for F) Substantial error if not coplanar Fundamental matrix F and 3 point correspondences Can think of pair e,e as providing fourth correspondence Fundamental matrix plus point and line correspondences Improvements More correspondences and least squares Correspondences farther apart 31

Plane Induced Parallax Determine homography of a plane Remaining differences reflect depth from plane 32

Plane + Parallax Correspondences l = x Hx 33

Projective Depth Distance between H π x and x (along l ) proportional to distance of X from plane π Sign governs which side of plane 34

Multiple Cameras Similarly extensive geometry for three cameras Known as tri-focal tensor Beyond scope of this course Three lines Three points Line and 2 points Point and 2 lines 35