Camera calibration. Outline. Pinhole camera. Camera projection models. Nonlinear least square methods A camera calibration tool

Similar documents
EPIPOLAR GEOMETRY WITH MANY DETAILS

3D from Photographs: Camera Calibration. Dr Francesco Banterle

Motion estimation. Digital Visual Effects Yung-Yu Chuang. with slides by Michael Black and P. Anandan

Numerical computation II. Reprojection error Bundle adjustment Family of Newtonʼs methods Statistical background Maximum likelihood estimation

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

Theory of Bouguet s MatLab Camera Calibration Toolbox

Linear and Nonlinear Optimization

Optical flow. Subhransu Maji. CMPSCI 670: Computer Vision. October 20, 2016

Visual Object Recognition

Camera calibration by Zhang

EE Camera & Image Formation

, b = 0. (2) 1 2 The eigenvectors of A corresponding to the eigenvalues λ 1 = 1, λ 2 = 3 are

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Instance-level l recognition. Cordelia Schmid INRIA

Mathematics 309 Conic sections and their applicationsn. Chapter 2. Quadric figures. ai,j x i x j + b i x i + c =0. 1. Coordinate changes

Basic Math for

CS 542G: Robustifying Newton, Constraints, Nonlinear Least Squares

Keypoint extraction: Corners Harris Corners Pkwy, Charlotte, NC

Visual SLAM Tutorial: Bundle Adjustment

Instance-level l recognition. Cordelia Schmid & Josef Sivic INRIA

Instance-level recognition: Local invariant features. Cordelia Schmid INRIA, Grenoble

Chapter 3 Numerical Methods

2 Nonlinear least squares algorithms

13. Nonlinear least squares

Instance-level recognition: Local invariant features. Cordelia Schmid INRIA, Grenoble

Methods that avoid calculating the Hessian. Nonlinear Optimization; Steepest Descent, Quasi-Newton. Steepest Descent

Instance-level recognition: Local invariant features. Cordelia Schmid INRIA, Grenoble

Augmented Reality VU Camera Registration. Prof. Vincent Lepetit

Pose Tracking II! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 12! stanford.edu/class/ee267/!

CS4495/6495 Introduction to Computer Vision. 3C-L3 Calibrating cameras

Nonlinear Optimization: What s important?

Lecture 16: Projection and Cameras. October 17, 2017

Motivation: We have already seen an example of a system of nonlinear equations when we studied Gaussian integration (p.8 of integration notes)

GRADIENT = STEEPEST DESCENT

Pose estimation from point and line correspondences

Introduction to Differential Equations. National Chiao Tung University Chun-Jen Tsai 9/14/2011

Shai Avidan Tel Aviv University

Optimization Methods. Lecture 18: Optimality Conditions and. Gradient Methods. for Unconstrained Optimization

Numerical Optimization

8 Numerical methods for unconstrained problems

Roberto s Notes on Integral Calculus Chapter 3: Basics of differential equations Section 3. Separable ODE s

Unconstrained minimization of smooth functions

Statistical Geometry Processing Winter Semester 2011/2012

Affine transformations. Brian Curless CSE 557 Fall 2014

Topic 8c Multi Variable Optimization

Cross-validation for detecting and preventing overfitting

Augmented Reality VU numerical optimization algorithms. Prof. Vincent Lepetit

Nonlinear Optimization for Optimal Control

Broken Extremals. Variational Methods & Optimal Control lecture 20. Broken extremals. Broken extremals

Determinants. We said in Section 3.3 that a 2 2 matrix a b. Determinant of an n n Matrix

Optimization: Nonlinear Optimization without Constraints. Nonlinear Optimization without Constraints 1 / 23

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

4 Newton Method. Unconstrained Convex Optimization 21. H(x)p = f(x). Newton direction. Why? Recall second-order staylor series expansion:

Unit 12 Study Notes 1 Systems of Equations

An Iterative Descent Method

Programming, numerics and optimization

Vision par ordinateur

Image Alignment Computer Vision (Kris Kitani) Carnegie Mellon University

1 HOMOGENEOUS TRANSFORMATIONS

Position & motion in 2D and 3D

ECE580 Fall 2015 Solution to Midterm Exam 1 October 23, Please leave fractions as fractions, but simplify them, etc.

Affine transformations

NonlinearOptimization

Unconstrained Multivariate Optimization

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 =

Interest Operators. All lectures are from posted research papers. Harris Corner Detector: the first and most basic interest operator

3.1 Exponential Functions and Their Graphs

Geometric Modeling Summer Semester 2010 Mathematical Tools (1)

Optimization Methods. Lecture 19: Line Searches and Newton s Method

Linear regression Class 25, Jeremy Orloff and Jonathan Bloom

Generalization. A cat that once sat on a hot stove will never again sit on a hot stove or on a cold one either. Mark Twain

1 Newton s Method. Suppose we want to solve: x R. At x = x, f (x) can be approximated by:

Mechanics Departmental Exam Last updated November 2013

Affine transformations

Super-Resolution. Dr. Yossi Rubner. Many slides from Miki Elad - Technion

Single view metrology

Numerical Optimization Professor Horst Cerjak, Horst Bischof, Thomas Pock Mat Vis-Gra SS09

Optimization and Root Finding. Kurt Hornik

Quasi-Newton Methods

Learning From Data Lecture 7 Approximation Versus Generalization

ECE580 Exam 1 October 4, Please do not write on the back of the exam pages. Extra paper is available from the instructor.

j=1 r 1 x 1 x n. r m r j (x) r j r j (x) r j (x). r j x k

Monte Carlo integration

Lab 5 Forces Part 1. Physics 225 Lab. You will be using Newton s 2 nd Law to help you examine the nature of these forces.

14.1 Systems of Linear Equations in Two Variables

Introduction to pinhole cameras

Optimization. Totally not complete this is...don't use it yet...

6.869 Advances in Computer Vision. Prof. Bill Freeman March 1, 2005

Multi-Frame Factorization Techniques

Least-Squares Fitting of Model Parameters to Experimental Data

Feature extraction: Corners and blobs

LESSON 35: EIGENVALUES AND EIGENVECTORS APRIL 21, (1) We might also write v as v. Both notations refer to a vector.

Matrix Derivatives and Descent Optimization Methods

Linear and Nonlinear Systems of Equations. The Method of Substitution. Equation 1 Equation 2. Check (2, 1) in Equation 1 and Equation 2: 2x y 5?

Data Fitting and Uncertainty

Biostatistics in Research Practice - Regression I

Optimization 2. CS5240 Theoretical Foundations in Multimedia. Leow Wee Kheng

What is Fuzzy Logic? Fuzzy logic is a tool for embedding human knowledge (experience, expertise, heuristics) Fuzzy Logic

Motion Estimation (I)

LECTURE 22: SWARM INTELLIGENCE 3 / CLASSICAL OPTIMIZATION

Transcription:

Outline Camera calibration Camera projection models Camera calibration i Nonlinear least square methods A camera calibration tool Applications Digital Visual Effects Yung-Yu Chuang with slides b Richard Szeliski, Steve Seitz,, Fred Pighin and Marc Pollefes Pinhole camera Camera projection models

Pinhole camera model P (X,Y,Z origin P p (, principal point (optical center Pinhole camera model Z fx Z fy Z principal X Z principal point Y X f f fy fx ~ Z f Z fy Pinhole camera model principal X principal point Y X f f fy fx ~ Z f Z fy Principal point offset principal point intrinsic matri X X K I ~ onl related to camera projection Y X f f fy fx ~ Z f Z fy

Intrinsic matri Distortion Is this form of K good enough? f K f non-square piels (digital video skew fa s radial distortion K f Radial distortion of the image No distortion Pin cushion Barrel Caused b imperfect lenses Deviations are most noticeable for ras that pass through the edge of the lens Camera rotation and translation X ' X Y ' R3 3 Y t Z' Z X f ~ KR tx Y ~ f R t Z etrinsic matri wo kinds of parameters internal or intrinsic parameters such as focal length, optical center, aspect ratio: what kind of camera? eternal or etrinsic (pose parameters including rotation and translation: where is the camera?

Other projection models Orthographic projection Special case of perspective projection Distance from the COP to the PP is infinite it Image World Also called parallel projection : (,, z (, Other tpes of projections Illusion Scaled orthographic Also called weak k perspective Affine projection Also called paraperspective

Illusion Fun with perspective Perspective cues Perspective cues

Fun with perspective Forced perspective in LOR Ames room Ames video BBC stor Camera calibration Camera calibration Estimate both intrinsic and etrinsic parameters. wo main categories:. Photometric calibration: uses reference objects with known geometr 2. Self calibration: onl assumes static scene, e.g. structure from motion

Camera calibration approaches Chromaglphs (HP research. linear regression (least squares 2. nonlinear optimization i i Linear regression ~ K R t X MX Camera calibration

Linear regression Linear regression Directl estimate unknowns in the M matri using known 3D points (X i,yy i,zz i and measured feature positions (u i,v i Linear regression Linear regression Solve for Projection Matri M using least-square techniques

Normal equation Given an overdetermined sstem A b the normal equation is that which minimizes the sum of the square differences between left and right sides A A A b Linear regression Advantages: All specifics of the camera summarized in one matri Can predict where an world point will map to in the image Disadvantages: Doesn t tell us about particular parameters Mies up internal and eternal parameters pose specific: move the camera and everthing breaks More unknowns than true degrees of freedom Nonlinear optimization A probabilistic view of least square Feature measurement equations Probabilit of M given {(u i,v i } P Optimal estimation Likelihood of M given {(u i,v i } L P It is a least square problem (but not necessaril linear least square How do we minimize L?

Optimal estimation Non-linear regression (least squares, because the relations between û i and u i are non-linear functions of M unknown parameters We could have terms like f cos in this u uˆ ~ u K R t X Nonlinear least square methods known constant We can use Levenberg-Marquardt method to minimize it Least square fitting Linear least square fitting t number of data points number of parameters

Linear least square fitting Linear least square fitting model parameters model parameters ( t M ( t ; t ( t M ( t ; t t t Linear least square fitting Linear least square fitting model parameters model parameters ( t M ( t ; t t fi ( i M ( ti ; ( t M ( t ; t t fi ( i M ( ti ; residual prediction residual prediction M ( t ; t 3 t 2 i li t is linear, too.

Nonlinear least square fitting Function minimization Least square is related to function minimization. model parameters residuals t 2t M ( t; 3e 4e i [ 2 4 4,,, ] f ( M ( t ; i t 2t i 3 e 4 e i It is ver hard to solve in general. Here, we onl consider a simpler problem of finding local minimum. Function minimization Quadratic functions Approimate the function with a quadratic function within a small neighborhood

Quadratic functions A is positive definite. All eigenvalues are positive. For all, A>. negative definite Function minimization Wh? * B definition, if is a local minimizer, h is small enough * * F( h F( F( * * * h F( h F'( O( h 2 A is singular A is indefinite Function minimization Function minimization

Descent methods Descent direction Steepest descent method Line search Find so that ( F( αh is minimum the decrease of F( per unit along h direction h sd is a descent direction because h sd F ( = -F ( 2 < ( F( αh F h F' ( αh h F'(

Line search Steepest descent method h F' ( αh h F'( h h F'( h h αh ' '' F ( α F ( h h αh h h h Hh Hh isocontour gradient Steepest descent method Newton s method It has good performance in the initial stage of the iterative process. Converge ver slow with a linear rate.

Newton s method Another view E( h F( h F( h g Minimizer satisfies * E'( h E' ( h g Hh h 2 Hh Newton s method h H It requires solving a linear sstem and H is not alwas positive definite. It has good performance in the final stage of the iterative process, where is close to *. g h H g Gauss-Newton method Hbrid method Use the approimate Hessian H J J No need for second derivative H is positive semi-definite his needs to calculate second-order derivative which might not be available.

Levenberg-Marquardt method LM can be thought of as a combination of steepest descent and the Newton method. When the current solution is far from the correct one, the algorithm behaves like a steepest descent method: slow, but guaranteed to converge. When the current solution is close to the correct solution, it becomes a Newton s method. Nonlinear least square Given a set of measurements, tr to find the best parameter vector p so that the squared distance is minimal. Here, ˆ, with ˆ f ( p. Levenberg-Marquardt method Levenberg-Marquardt method (J J Ih g μ= Newton s method μ steepest descent method Strateg for choosing μ Start t with some small μ If F is not reduced, keep tring larger μ until it does If F is reduced, d accept it and reduce μ for the net iteration

Recap (the Rosenbrock function Steepest descent k k g h h h Hh z f 2 2 2 (, ( ( 2 Global l minimum i at (, k k F' ' k g g 2 min k min 2 k

In the plane of the steepest descent direction Steepest descent ( iterations h hh h Hh k k Regularized Least- Gauss-Newton method k k H g With the approimate Hessian J H J No need for second derivative H is positive semi-definite min 2 k - H g k

Newton s method (48 evaluations Levenberg-Marquardt Blends steepest descent and Gauss-Newton At each step, solve for the descent direction i h (J J Ih g h gg If μ large,, steepest descent h (J J If μ small,, Gauss-Newton g Regularized Least- Levenberg-Marquardt (9 evaluations A popular calibration tool Regularized Least-

Multi-plane calibration Step : data acquisition Images courtes Jean-Yves Bouguet, Intel Corp. Advantage Onl requires a plane Don t have to know positions/orientations Good code available online! Intel s OpenCV librar: http://www.intel.com/research/mrl/research/opencv/ Matlab version b Jean-Yves Bouget: http://www.vision.caltech.edu/bouguetj/calib_doc/inde.html Zhengou Zhang s web site: http://research.microsoft.com/~zhang/calib/ Step 2: specif corner order Step 3: corner etraction

Step 3: corner etraction Step 4: minimize projection error Step 4: camera calibration Step 4: camera calibration

Step 5: refinement Optimized parameters How is calibration used? Applications Good for recovering intrinsic parameters; It is thus useful for man vision applications Since it requires a calibration pattern, it is often necessar to remove or replace the pattern from the footage or utilize it in some was

Eample of calibration Eample of calibration Eample of calibration PhotoBook Videos from Gaech Dasatoo, MakeOf P!NG, MakeOf Work, MakeOf LifeInPaints, MakeOf PhotoBook MakeOf