3D Geometry and Camera Calibration

Similar documents
3D Geometry and Camera Calibration

Geometry of a single camera. Odilon Redon, Cyclops, 1914

3D Sensing. Translation and Scaling in 3D. Rotation about Arbitrary Axis. Rotation in 3D is about an axis

Perspective Projection Transformation

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations

Transformations. Examples of transformations: shear. scaling

Camera Calibration. COS 429 Princeton University

Geometric Model of Camera

Geometry of image formation

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

Homogeneous Coordinates

Announcements. Equation of Perspective Projection. Image Formation and Cameras

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

Image Warping : Computational Photography Alexei Efros, CMU, Fall Some slides from Steve Seitz

Image Warping. Some slides from Steve Seitz

Image Warping. Some slides from Steve Seitz

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics

3-D D Euclidean Space - Vectors

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing

Rigid Body Motion and Image Formation. Jana Kosecka, CS 482

Computer Vision. Geometric Camera Calibration. Samer M Abdallah, PhD

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline

Uses of Transformations. 2D transformations Homogeneous coordinates. Transformations. Transformations. Transformations. Transformations and matrices

MAN-522: COMPUTER VISION SET-2 Projections and Camera Calibration

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

CS4670: Computer Vision

Interactive Computer Graphics. Warping and morphing. Warping and Morphing. Warping and Morphing. Lecture 14+15: Warping and Morphing. What is.

CS559: Computer Graphics

Modeling Transformations

MEM380 Applied Autonomous Robots Winter Robot Kinematics

1. We ll look at: Types of geometrical transformation. Vector and matrix representations

Image Warping CSE399b, Spring 07 Computer Vision

Two-view geometry Computer Vision Spring 2018, Lecture 10

Image warping. image filtering: change range of image. image warping: change domain of image g(x) = f(h(x)) h(y)=0.5y+0.5. h([x,y])=[x,y/2] f h

3-Dimensional Viewing

Two Dimensional Viewing

calibrated coordinates Linear transformation pixel coordinates

1 Projective Geometry

Image Warping. Many slides from Alyosha Efros + Steve Seitz. Photo by Sean Carroll

Visual Recognition: Image Formation

Image Warping (Szeliski Sec 2.1.2)

Pin Hole Cameras & Warp Functions

What and Why Transformations?

CSE328 Fundamentals of Computer Graphics: Theory, Algorithms, and Applications

3D Photography: Epipolar geometry

How is project #1 going?

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

Transforms. COMP 575/770 Spring 2013

To Do. Course Outline. Course Outline. Goals. Motivation. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1

3D Sensing. 3D Shape from X. Perspective Geometry. Camera Model. Camera Calibration. General Stereo Triangulation.

Rectification and Distortion Correction

Introduction to Homogeneous coordinates

Modeling Transformations

CS F-07 Objects in 2D 1

2D transformations and homogeneous coordinates

Today s class. Geometric objects and transformations. Informationsteknologi. Wednesday, November 7, 2007 Computer Graphics - Class 5 1

Epipolar geometry. x x

Vector Algebra Transformations. Lecture 4

Camera Model and Calibration

What does OpenGL do?

CV: 3D to 2D mathematics. Perspective transformation; camera calibration; stereo computation; and more

CS770/870 Spring 2017 Transformations

CS201 Computer Vision Camera Geometry

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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

Warping, Morphing and Mosaics

CS 335 Graphics and Multimedia. Geometric Warping

Image Metamorphosis By Affine Transformations

Pin Hole Cameras & Warp Functions

Robot Geometry and Kinematics

Agenda. Rotations. Camera calibration. Homography. Ransac

Geometric camera models and calibration

Announcements. The equation of projection. Image Formation and Cameras

Agenda. Rotations. Camera models. Camera calibration. Homographies

CS Computer Graphics: Transformations & The Synthetic Camera

N-Views (1) Homographies and Projection

Part I: Single and Two View Geometry Internal camera parameters

Last Lecture. Edge Detection. Filtering Pyramid

Determining the 2d transformation that brings one image into alignment (registers it) with another. And

Viewing and Projection

To Do. Outline. Translation. Homogeneous Coordinates. Foundations of Computer Graphics. Representation of Points (4-Vectors) Start doing HW 1

Two-View Geometry (Course 23, Lecture D)

CS 450: COMPUTER GRAPHICS 2D TRANSFORMATIONS SPRING 2016 DR. MICHAEL J. REALE

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

Affine and Projective Transformations

Camera Geometry II. COS 429 Princeton University

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

Lecture 3: Camera Calibration, DLT, SVD

CS6670: Computer Vision

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

Image Warping, mesh, and triangulation CSE399b, Spring 07 Computer Vision

DD2429 Computational Photography :00-19:00

The end of affine cameras

(x, y) (ρ, θ) ρ θ. Polar Coordinates. Cartesian Coordinates

Fundamental Matrix & Structure from Motion

Epipolar Constraint. Epipolar Lines. Epipolar Geometry. Another look (with math).

Image Warping. Computational Photography Derek Hoiem, University of Illinois 09/28/17. Photo by Sean Carroll

But First: Multi-View Projective Geometry

2D/3D Geometric Transformations and Scene Graphs

Transcription:

3D Geometr and Camera Calibration

3D Coordinate Sstems Right-handed vs. left-handed

2D Coordinate Sstems ais up vs. ais down Origin at center vs. corner Will often write (u, v) for image coordinates v u v u v u

3D Geometr Basics 3D points = column vectors Transformations = pre-multiplied matrices = p = i h g f e d c b a Tp

Rotation Rotation about the ais R cosθ = sin θ sin θ cosθ Rotation about, aes similar (cclicall permute,, )

Arbitrar Rotation An rotation is a composition of rotations about,, and Composition of transformations = matri multiplication (watch the order!) Result: orthonormal matri Each row, column has unit length Dot product of rows or columns = Inverse of matri = transpose

Arbitrar Rotation Rotate around,, then : sin θ cosθ R = sin θ sin θ cosθ cosθ sin θ + sin θ cosθ cosθ cosθ cosθ + sin θ cosθ sin θ sin θ sin θ sin θ sin θ + cosθ cosθ cosθ sin θ cosθ + cosθ cosθ sin θ cosθ sin θ Don t do this! It s probabl bugg! Compute simple matrices and multipl them

Scale Scale in,, : S = s s s

Shear Shear parallel to plane: σ = σ σ

Translation Can translation be represented b multipling b a 3 3 matri? No. Proof: A : A =

Homogeneous Coordinates Add a fourth dimension to each point: To get real (3D) coordinates, divide b w: w w w w w

Translation in Homogeneous Coordinates After divide b w, this is just a translation b (t, t, t ) + + + = w w t w t w t w t t t

Perspective Projection What does 4 th row of matri do? After divide, = w

Perspective Projection This is projection onto the = plane (,,) (/,/,) (,,) = Add scaling, etc. pinhole camera model

Putting It All Together: A Camera Model Translate to image center Then perform homogeneous divide, and get (u,v) coords Scale to piel sie T img S pi Perspective projection P cam R cam Camera orientation T cam Camera location 3D point (homogeneous coords)

Putting It All Together: A Camera Model Intrinsics Etrinsics T img S pi P cam R cam T cam

Putting It All Together: A Camera Model Camera coordinates Normalied device coordinates Ee coordinates Image coordinates Piel coordinates T img S pi P cam R cam T cam World coordinates

More General Camera Model Multipl all these matrices together Don t care about after transformation Scale ambiguit free parameters + + + + + + + + + + + + l k j i h g f e l k j i d c b a l k j i h g f e d c b a homogeneous divide

Radial Distortion Radial distortion can not be represented b matri u img c u + u * img ( ) * 2 * 2 + κ ( u + v ) img img v img c v + v * img ( ) * 2 * 2 + κ ( u + v ) img img (c u, c v ) is image center, u * img= u img c u, v * img= v img c v, κ is first-order radial distortion coefficient

Camera Calibration Determining values for camera parameters Necessar for an algorithm that requires 3D 2D mapping Method used depends on: What data is available Intrinsics onl vs. etrinsics onl vs. both Form of camera model

Camera Calibration Eample Given: 3D 2D correspondences General perspective camera model (-parameter, no radial distortion) Write equations: a i e i + b + j + + f j + c + k + g + k + d + l + h + l = = u v

Camera Calibration Eample Linear equation Overconstrained (more equations than unknowns) Underconstrained (rank deficient matri an multiple of a solution, including, is also a solution) = l c b a v v v v u u u u v v v v u u u u 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

Camera Calibration Eample Standard linear least squares methods for A= will give the solution = Instead, look for a solution with = That is, minimie A 2 subject to 2 =

Camera Calibration Eample Minimie A 2 subject to 2 = A 2 = (A) T (A) = ( T A T )(A) = T (A T A) Epand in terms of eigenvectors of A T A: = µ e + µ 2 e 2 + T (A T A) = λ µ 2 +λ 2 µ 22 + 2 = µ 2 +µ 22 +

Camera Calibration Eample To minimie λ µ 2 +λ 2 µ 22 + subject to µ 2 +µ 22 + = set µ min = and all other µ i = Thus, least squares solution is eigenvector of A T A corresponding to minimum (nonero) eigenvalue

Camera Calibration Eample 2 Incorporating additional constraints into camera model No shear, no scale (rigid-bod motion) Square piels etc. These impose nonlinear constraints on camera parameters

Camera Calibration Eample 2 Option : solve for general perspective model, then find closest solution that satisfies constraints Option 2: constrained nonlinear least squares Usuall gradient descent techniques Common implementations available (e.g. Matlab optimiation toolbo)

Camera Calibration Eample 3 Incorporating radial distortion Option : Find distortion first (straight lines in calibration target) Warp image to eliminate distortion Run (simpler) perspective calibration Option 2: nonlinear least squares

Camera Calibration Eample 4 What if 3D points are not known? Structure from motion problem! As we saw, can often be solved since # of knowns > # of unknowns After Thanksgiving

Multi-Camera Geometr Epipolar geometr relationship between observed positions of points in multiple cameras Assume: 2 cameras Known intrinsics and etrinsics

Epipolar Geometr P p p 2 C C 2

Epipolar Geometr P l 2 p p 2 C C 2

Epipolar Geometr P Epipolar line l 2 p p 2 C C 2 Epipoles

Epipolar Geometr Goal: derive equation for l 2 Observation: P, C, C 2 determine a plane P l 2 p p 2 C C 2

Epipolar Geometr Work in coordinate frame of C Normal of plane is T Rp 2, where T is relative translation, R is relative rotation P l 2 p p 2 C C 2

Epipolar Geometr p is perpendicular to this normal: p (T Rp 2 ) = P l 2 p p 2 C C 2

Epipolar Geometr Write cross product as matri multiplication P C C 2 p 2 p l 2 = =, * * T T T T T T T T T

Epipolar Geometr p T * R p 2 = p T E p 2 = E is the essential matri P l 2 p p 2 C C 2

Essential Matri E depends onl on camera geometr Given E, can derive equation for line l 2 P l 2 p p 2 C C 2

Fundamental Matri Can define fundamental matri F analogousl, operating on piel coordinates instead of camera coordinates u T F u 2 = Advantage: can sometimes estimate F without knowing camera calibration