480 likes | 758 Views
Stanford CS223B Computer Vision, Winter 2006 Lecture 4 Camera Calibration. Professor Sebastian Thrun CAs: Dan Maynes-Aminzade and Mitul Saha [with slides by D Forsyth, D. Lowe, M. Polleyfeys, C. Rasmussen, G. Loy, D. Jacobs, J. Rehg, A, Hanson, G. Bradski,…] . Today’s Goals.
E N D
Stanford CS223B Computer Vision, Winter 2006Lecture 4 Camera Calibration Professor Sebastian Thrun CAs: Dan Maynes-Aminzade and Mitul Saha [with slides by D Forsyth, D. Lowe, M. Polleyfeys, C. Rasmussen, G. Loy, D. Jacobs, J. Rehg, A, Hanson, G. Bradski,…]
Today’s Goals • Calibration: Problem definition • Solution via Singular Value Decomposition • Solution by nonlinear Least Squares • Distortion
Intrinsic Camera Parameters • Determine the intrinsic parameters of a camera (with lens) • What are Intrinsic Parameters?
Perspective Projection, Remember? O X -x Z f
Intrinsic Camera Parameters • Determine the intrinsic parameters of a camera (with lens) • Intrinsic Parameters: • Focal Length f • Pixel size sx ,sy • Distortion coefficients k1 ,k2… • Image center ox ,oy
A Quiz • Can we determine all intrinsic parameters by … exposing the camera to many known objects?
Another Quiz (the last today) • How Many Flat Calibration Targets are Needed for Calibration? 1: 2: 3: 4: 5: 10 • How Many Corner Points do we need in Total? 1: 2: 3: 4: 10: 20
Projective Perspective of Parallel Board 10cm 20cm 30cm
Projective Perspective of Tilted Board 10cm 20cm 30cm 50cm 100cm 500cm
Perspective Camera Model Object Space
Calibration: 2 steps • Step 1: Transform into camera coordinates • Step 2: Transform into image coordinates
Calibration Model (extrinsic) Homogeneous Coordinates
Homogeneous Coordinates • Idea: Most Operations Become Linear! • Extract Image Coordinates by Z-normalization
Advantage of Homogeneous C’s i-th data point
Calibration Model (intrinsic) Focal length Pixel size Image center
Summary Parameters • Extrinsic • Rotation • Translation • Intrinsic • Focal length • Pixel size • Image center coordinates • (Distortion coefficients)
Summary Parameters, Revisited • Focal length, in pixel units • Aspect ratio • Extrinsic • Rotation • Translation • Intrinsic • Focal length • Pixel size • Image center coordinates • (Distortion coefficients)
Today’s Goals • Calibration: Problem definition • Solution via Singular Value Decomposition • Solution by nonlinear Least Squares • Distortion
Calibration via SVD N>=7 points, not coplanar
Calibration via SVD A has rank 7 (without proof)
Calibration via SVD • Remaining Problem: • See book
Summary, SVD Solution • Replace rotation matrix by arbitrary matrix • Transform into linear set of equations • Solve via SVD • Enforce rotation matrix (see book) • Solve for remaining parameters (see book) SVD solution: algebraic minimization, assume Gaussian noise in parameter space
Today’s Goals • Calibration: Problem definition • Solution via Singular Value Decomposition • Solution by nonlinear Least Squares • Distortion
Calibration by nonlinear Least Squares • Calibration Examples: …
Calibration by nonlinear Least Squares • Least Squares
Calibration by nonlinear Least Squares • Least Mean Square • Gradient descent:
Summary Non-Linear Least Squares • Solve nonlinear equations via gradient descent • Assume Gaussian noise in image space, not parameter space
SVD Versus LQ SVD Minimization of squared distance in parameter space Globally optimal Nonlin Least Squares Minimization of squared distance in Image space Locally optimal
Q: How Many Images Do We Need? • Assumption: K images with M corners each • 4+6K parameters • 2KM constraints • 2KM 4+6K M>3 and K 2/(M-3) • 2 images with 4 points, but will 1 images with 5 points work? • No, since points cannot be co-planar!
Today’s Goals • Calibration: Problem definition • Solution via Singular Value Decomposition • Solution by nonlinear Least Squares • Distortion
Advanced Calibration:Nonlinear Distortions • Barrel and Pincushion • Tangential
Barrel and Pincushion Distortion wideangle tele
Models of Radial Distortion distance from center
Tangential Distortion cheap CMOS chip cheap lense image cheap glue cheap camera
Summary • Calibration: Problem definition • Solution via Singular Value Decomposition • Solution by nonlinear Least Squares • Distortion