Camera calibration Triangulation

Similar documents
Augmented Reality VU Camera Registration. Prof. Vincent Lepetit

Camera Calibration The purpose of camera calibration is to determine the intrinsic camera parameters (c 0,r 0 ), f, s x, s y, skew parameter (s =

3D from Photographs: Camera Calibration. Dr Francesco Banterle

EE Camera & Image Formation

M3: Multiple View Geometry

CS 231A Computer Vision (Fall 2011) Problem Set 2

Outline. Linear Algebra for Computer Vision

Lecture 5. Epipolar Geometry. Professor Silvio Savarese Computational Vision and Geometry Lab. 21-Jan-15. Lecture 5 - Silvio Savarese

Compatible Systems and Charpit s Method

Linear Algebra Review. Fei-Fei Li

Camera Models and Affine Multiple Views Geometry

Structure from Motion. CS4670/CS Kevin Matzen - April 15, 2016

Final Exam Due on Sunday 05/06

A Practical Method for Decomposition of the Essential Matrix

Camera calibration by Zhang

Multiple View Geometry in Computer Vision

Multiview Geometry and Bundle Adjustment. CSE P576 David M. Rosen

Multi-Frame Factorization Techniques

Theory of Bouguet s MatLab Camera Calibration Toolbox

1. What is the determinant of the following matrix? a 1 a 2 4a 3 2a 2 b 1 b 2 4b 3 2b c 1. = 4, then det

Linear Least-Squares Data Fitting

Robert Collins CSE486, Penn State. Lecture 25: Structure from Motion

MAT Linear Algebra Collection of sample exams

The Jordan Normal Form and its Applications

Math Review: parameter estimation. Emma

Introduction to pinhole cameras

Chapter Practice Test Name: Period: Date:

Linear Algebra & Geometry why is linear algebra useful in computer vision?

and let s calculate the image of some vectors under the transformation T.

Linear Algebra Review. Fei-Fei Li

Vision 3D articielle Session 2: Essential and fundamental matrices, their computation, RANSAC algorithm

Econ Slides from Lecture 7

A Study of Kruppa s Equation for Camera Self-calibration

1 Invariant subspaces

Math 3191 Applied Linear Algebra

22.4. Numerical Determination of Eigenvalues and Eigenvectors. Introduction. Prerequisites. Learning Outcomes

COMP 558 lecture 18 Nov. 15, 2010

MATH 369 Linear Algebra

2. Griffith s 4.19 a. The commutator of the z-component of the angular momentum with the coordinates are: [L z. + xyp x. x xxp y.

1. Suppose that a, b, c and d are four different integers. Explain why. (a b)(a c)(a d)(b c)(b d)(c d) a 2 + ab b = 2018.

Homographies and Estimating Extrinsics

Two-View Segmentation of Dynamic Scenes from the Multibody Fundamental Matrix

Coding the Matrix Index - Version 0

Mathematical Properties of Stiffness Matrices

CS 246 Review of Linear Algebra 01/17/19

Spectral Algorithms I. Slides based on Spectral Mesh Processing Siggraph 2010 course

Linear Algebra Practice Problems

Mathematics for 3D Graphics

Recall : Eigenvalues and Eigenvectors

Linear Algebra & Geometry why is linear algebra useful in computer vision?

21 Symmetric and skew-symmetric matrices

MATH 167: APPLIED LINEAR ALGEBRA Least-Squares

arxiv: v2 [cs.cv] 22 Mar 2019

Linear Algebra: Matrix Eigenvalue Problems

Principal Components Analysis (PCA)

Progress, tbe Universal LaW of f'laiare; Tbodgbt. tbe 3olVer)t of fier Problems. C H IC A G O. J U N E

Ch 10.1: Two Point Boundary Value Problems

In this section again we shall assume that the matrix A is m m, real and symmetric.

Homework 1 Elena Davidson (B) (C) (D) (E) (F) (G) (H) (I)

Pose estimation from point and line correspondences

Nonlinear Diffusion. 1 Introduction: Motivation for non-standard diffusion

Mobile Robotics 1. A Compact Course on Linear Algebra. Giorgio Grisetti

EXAMPLES OF PROOFS BY INDUCTION

Numerical Methods I: Eigenvalues and eigenvectors

Extra Problems for Math 2050 Linear Algebra I

Intro Vectors 2D implicit curves 2D parametric curves. Graphics 2011/2012, 4th quarter. Lecture 2: vectors, curves, and surfaces

Bundle Adjustment for 3-D Reconstruction: Implementation and Evaluation

LINEAR ALGEBRA 1, 2012-I PARTIAL EXAM 3 SOLUTIONS TO PRACTICE PROBLEMS

[POLS 8500] Review of Linear Algebra, Probability and Information Theory

CS4495/6495 Introduction to Computer Vision. 3D-L3 Fundamental matrix

c c c c c c c c c c a 3x3 matrix C= has a determinant determined by

Repeated Eigenvalues and Symmetric Matrices

CS 4495 Computer Vision Principle Component Analysis

A Factorization Method for 3D Multi-body Motion Estimation and Segmentation

Chapter 5 Eigenvalues and Eigenvectors

Linear Algebra Math 221

Linear Algebra in Actuarial Science: Slides to the lecture

Linear Combination. v = a 1 v 1 + a 2 v a k v k

Routines for Relative Pose of Two Calibrated Cameras from 5 Points

1 Linear Regression and Correlation

Final Exam, Linear Algebra, Fall, 2003, W. Stephen Wilson

MATH 20F: LINEAR ALGEBRA LECTURE B00 (T. KEMP)

Problems. Looks for literal term matches. Problems:

Math Fall Final Exam

Solve the equation for c: 8 = 9c (c + 24). Solve the equation for x: 7x (6 2x) = 12.

Basic Math for

Math 2433 Notes Week The Dot Product. The angle between two vectors is found with this formula: cosθ = a b

TI89 Titanium Exercises - Part 10.

Chapter 4 & 5: Vector Spaces & Linear Transformations

Camera Projection Model

We will discuss matrix diagonalization algorithms in Numerical Recipes in the context of the eigenvalue problem in quantum mechanics, m A n = λ m

Camera Calibration. (Trucco, Chapter 6) -Toproduce an estimate of the extrinsic and intrinsic camera parameters.

Elementary Linear Algebra

Theorem A.1. If A is any nonzero m x n matrix, then A is equivalent to a partitioned matrix of the form. k k n-k. m-k k m-k n-k

Math 304 Answers to Selected Problems

ANALYTICAL IMAGE FEATURES

(a) II and III (b) I (c) I and III (d) I and II and III (e) None are true.

Intro Vectors 2D implicit curves 2D parametric curves. Graphics 2012/2013, 4th quarter. Lecture 2: vectors, curves, and surfaces

11.1 Three-Dimensional Coordinate System

LINEAR ALGEBRA KNOWLEDGE SURVEY

Transcription:

Triangulation

Perspective projection in homogenous coordinates ~x img I 0 apple R t 0 T 1 ~x w ~x img R t ~x w

Matrix transformations in 2D ~x img K R t ~x w K = 2 3 1 0 t u 40 1 t v 5 0 0 1 Translation K = K = 2 3 s x t u 4 0 s y t v 5 0 0 1 Added skew if image x and y axes are not perpendicular 2 3 s x 0 t u 4 0 s y t v 5 0 0 1 Scaling of Image x and y (conversion from meters to pixels )

Final perspective projection Camera extrinsics: where your camera is relative to the world. Changes if you move the camera ~x img K R t ~x w Camera intrinsics: how your camera handles pixel. Changes if you change your camera ~x img P~x w

Final perspective projection ~x img K R t ~x w Camera parameters ~x img P~x w

Goal: find the parameters of the camera ~x img K R t ~x w Why? Tells you where the camera is relative to the world/particular objects Equivalently, tells you where objects are relative to the camera Can allow you to render new objects into the scene

Y Y Z O O X X Z

~x img P~x w Suppose we know that (X,Y,Z) in the world projects to (x,y) in the image. How many equations does this provide? 2 3 x 4y5 P 1 2 3 X 6Y 7 4Z 5 1 Need to convert equivalence into equality.

~x img P~x w Suppose we know that (X,Y,Z) in the world projects to (x,y) in the image. How many equations does this provide? Note: λ is unknown 2 4 3 x y5 = P 2 3 X 6Y 7 4Z 5 1

~x img P~x w Suppose we know that (X,Y,Z) in the world projects to (x,y) in the image. How many equations does this provide? 2 4 3 x y5 = 2 2 3 P 11 P 12 P 13 P 14 4P 21 P 22 P 23 P 5 24 P 31 P 32 P 33 P 34 X 6Y 4Z 1 3 7 5

~x img P~x w Suppose we know that (X,Y,Z) in the world projects to (x,y) in the image. How many equations does this provide? x = P 11 X + P 12 Y + P 13 Z + P 14 y = P 21 X + P 22 Y + P 23 Z + P 24 = P 31 X + P 32 Y + P 33 Z + P 34

Suppose we know that (X,Y,Z) in the world projects to (x,y) in the image. How many equations does this provide? 2 equations! ~x img P~x w (P 31 X + P 32 Y + P 33 Z + P 34 )x = P 11 X + P 12 Y + P 13 Z + P 14 (P 31 X + P 32 Y + P 33 Z + P 34 )y = P 21 X + P 22 Y + P 23 Z + P 24 Are the equations linear in the parameters? How many equations do we need?

(P 31 X + P 32 Y + P 33 Z + P 34 )x = P 11 X + P 12 Y + P 13 Z + P 14 (P 31 X + P 32 Y + P 33 Z + P 34 )y = P 21 X + P 22 Y + P 23 Z + P 24 XxP 31 + YxP 32 + ZxP 33 + xp 34 XP 11 Y P 12 ZP 13 P 14 =0 In matrix vector form: Ap = 0 6 points give 12 equations, 12 variables to solve for But can only solve upto scale

In matrix vector form: Ap = 0 We want non-trivial solutions If p is a solution, αp is a solution too Let s just search for a solution with unit norm Ap =0 s.t kpk =1 How do you solve this?

In matrix vector form: Ap = 0 We want non-trivial solutions If p is a solution, αp is a solution too Let s just search for a solution with unit norm Ap =0 s.t kpk =1

What happens if there are more than 6 points? What if there is noise in the point locations? min kapk 2 p Ap =0 s.t kpk =1

What happens if there are more than 6 points? What if there is noise in the point locations? min p T A T Ap p Ap =0 s.t kpk =1 Look at eigenvector of A T A with the smallest eigenvalue!

>=6 points with known 3D coordinates + known image coordinates XxP 31 + YxP 32 + ZxP 33 + xp 34 XP 11 Y P 12 ZP 13 P 14 =0 In matrix vector form: want Ap = 0 Resilience to noise: min p p T A T Ap s.t kpk =1 Look at eigenvector of A T A with the smallest eigenvalue!

We need 6 world points for which we know image locations Would any 6 points work? What if all 6 points are the same? Need at least 6 non-coplanar points!

Y Y Z O O X X Z

~x img P~x w ~x img K R t ~x w How do we get K, R and t from P? Need to make some assumptions about K What if K is identity?

~x img P~x w ~x img K R t ~x w How do we get K, R and t from P? Need to make some assumptions about K What if K is upper triangular? 2 3 s x t u K = 4 0 s y t v 5 0 0 1 Added skew if image x and y axes are not perpendicular

How do we get K, R and t from P? Need to make some assumptions about K What if K is upper triangular? 2 3 s x t u K = 4 0 s y t v 5 P = K [ R t] 0 0 1 First 3 x 3 matrix of P is KR RQ decomposition: decomposes an n x n matrix into product of upper triangular and rotation matrix

How do we get K, R and t from P? Need to make some assumptions about K What if K is upper triangular? P = K [ R t] First 3 x 3 matrix of P is KR RQ decomposition: decomposes an n x n matrix into product of upper triangular and rotation matrix t = K -1 P[:,2] ß last column of P

Camera calibration and pose estimation

Triangulation Suppose we have two cameras Calibrated: parameters known And a pair of corresponding pixels Find 3D location of point!

Triangulation Suppose we have two cameras Calibrated: parameters known And a pair of corresponding pixels Find 3D location of point! P (1) P (2) (x 1,y 1 ) (x 2,y 2 )

Triangulation 2 3 x 1 4y 5 1 1 2 3 x 2 4y 5 2 1 ~x (1) img P (1) ~x w ~x (2) img P (2) ~x w 2 3 X 6Y 7 4Z 5 1

Triangulation ~x (1) img P (1) ~x w x 1 = P (1) 11 X + P (1) 12 Y + P (1) 13 Z + P (1) 14 y 1 = P (1) 21 X + P (1) 22 Y + P (1) 23 Z + P (1) 24 = P (1) 31 X + P (1) 32 Y + P (1) 33 Z + P (1) 34 (P (1) 31 X + P (1) 32 Y + P (1) 33 Z + P (1) 34 )x 1 = P (1) 11 X + P (1) 12 Y + P (1) 13 Z + P (1) 14 X(P (1) 31 x 1 P (1) (1) 11 ) + Y (P 32 x 1 P (1) (1) 12 ) + Z(P 33 x 1 P (1) 13 ) + (P (1) 34 x 1 P (1) 14 ) =0

X(P (1) X(P (1) Triangulation 1 image gives 2 equations Need 2 images! ~x (1) img P (1) ~x w 31 x 1 P (1) (1) 11 ) + Y (P 32 x 1 P (1) (1) 12 ) + Z(P 33 x 1 P (1) (1) 13 ) + (P 34 x 1 P (1) 14 ) =0 31 y 1 P (1) (1) 21 ) + Y (P 32 y 1 P (1) (1) 22 ) + Z(P 33 y 1 P (1) (1) 23 ) + (P 34 y 1 P (1) 24 ) =0 Solve linear equations to get 3D point location

Linear vs non-linear optimization x 1 = P (1) 11 X + P (1) 12 Y + P (1) 13 Z + P (1) 14 y 1 = P (1) 21 X + P (1) 22 Y + P (1) 23 Z + P (1) 24 = P (1) 31 X + P (1) 32 Y + P (1) 33 Z + P (1) 34 x 1 = P (1) 11 X + P (1) 12 Y + P (1) 13 Z + P (1) 14 P (1) 31 X + P (1) 32 Y + P (1) 33 Z + P (1) 34 y 1 = P (1) 21 X + P (1) 22 Y + P (1) 23 Z + P (1) 24 P (1) 31 X + P (1) 32 Y + P (1) 33 Z + P (1) 34

Linear vs non-linear optimization x 1 = P (1) 11 X + P (1) 12 Y + P (1) 13 Z + P (1) 14 P (1) 31 X + P (1) 32 Y + P (1) 33 Z + P (1) 34 y 1 = P (1) 21 X + P (1) 22 Y + P (1) 23 Z + P (1) 24 P (1) 31 X + P (1) 32 Y + P (1) 33 Z + P (1) 34 P (1) 11 (x X + P (1) 12 Y + P (1) 13 Z + P (1) 14 1 P (1) 31 X + P (1) 32 Y + P (1) 33 Z + P (1) 34 P (1) 21 +(y X + P (1) 22 Y + P (1) 23 Z + P (1) 24 1 P (1) 31 X + P (1) 32 Y + P (1) 33 Z + P (1) 34 Reprojection error ) 2 ) 2

Linear vs non-linear optimization P (1) 11 (x X + P (1) 12 Y + P (1) 13 Z + P (1) 14 1 P (1) 31 X + P (1) 32 Y + P (1) 33 Z + P (1) 34 P (1) 21 +(y X + P (1) 22 Y + P (1) 23 Z + P (1) 24 1 P (1) 31 X + P (1) 32 Y + P (1) 33 Z + P (1) 34 Reprojection error Reprojection error is the squared error between the true image coordinates of a point and the projected coordinates of hypothesized 3D point Actual error we care about Minimize total sum of reprojection error across all images Non-linear optimization ) 2 ) 2