Computer Vision: Lecture 3

Similar documents
Lecture 3: Camera Calibration, DLT, SVD

CS201 Computer Vision Camera Geometry

Pin Hole Cameras & Warp Functions

Geometric camera models and calibration

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

calibrated coordinates Linear transformation pixel coordinates

Pin Hole Cameras & Warp Functions

Camera calibration. Robotic vision. Ville Kyrki

Camera Model and Calibration

Camera model and calibration

Vision Review: Image Formation. Course web page:

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

Camera models and calibration

Structure from Motion. Introduction to Computer Vision CSE 152 Lecture 10

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

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

Structure from motion

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

DD2429 Computational Photography :00-19:00

Introduction to Homogeneous coordinates

COSC579: Scene Geometry. Jeremy Bolton, PhD Assistant Teaching Professor

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

Multiple Views Geometry

Two-view geometry Computer Vision Spring 2018, Lecture 10

Rectification and Distortion Correction

Camera Model and Calibration. Lecture-12

Epipolar Geometry and the Essential Matrix

Structure from Motion and Multi- view Geometry. Last lecture

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

3D Geometry and Camera Calibration

Geometry of image formation

CSE 252B: Computer Vision II

CS6670: Computer Vision

Camera Models and Image Formation. Srikumar Ramalingam School of Computing University of Utah

Lecture'9'&'10:'' Stereo'Vision'

Structure from Motion

Camera model and multiple view geometry

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

Geometric Computing. in Image Analysis and Visualization. Lecture Notes March 2007

3D reconstruction class 11

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

C18 Computer Vision. Lecture 1 Introduction: imaging geometry, camera calibration. Victor Adrian Prisacariu.

The real voyage of discovery consists not in seeking new landscapes, but in having new eyes.

Camera Geometry II. COS 429 Princeton University

Two-View Geometry (Course 23, Lecture D)

CS4670: Computer Vision

Camera Models and Image Formation. Srikumar Ramalingam School of Computing University of Utah

Structure from motion

CS231A Course Notes 4: Stereo Systems and Structure from Motion

Descriptive Geometry Meets Computer Vision The Geometry of Two Images (# 82)

Structure from Motion CSC 767

Interlude: Solving systems of Equations

The Geometry Behind the Numerical Reconstruction of Two Photos

Chapter 7: Computation of the Camera Matrix P

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

Stereo and Epipolar geometry

3D Reconstruction with two Calibrated Cameras

Field of View (Zoom)

CALIBRATION BETWEEN DEPTH AND COLOR SENSORS FOR COMMODITY DEPTH CAMERAS. Cha Zhang and Zhengyou Zhang

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

A Factorization Method for Structure from Planar Motion

Projective geometry for Computer Vision

Lecture 5.3 Camera calibration. Thomas Opsahl

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

On Plane-Based Camera Calibration: A General Algorithm, Singularities, Applications

A Method for Interactive 3D Reconstruction of Piecewise Planar Objects from Single Images

Mei Han Takeo Kanade. January Carnegie Mellon University. Pittsburgh, PA Abstract

Recovering structure from a single view Pinhole perspective projection

Module 4F12: Computer Vision and Robotics Solutions to Examples Paper 2

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Flexible Calibration of a Portable Structured Light System through Surface Plane

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

Dense 3D Reconstruction. Christiano Gava

1 Projective Geometry

Calculation of the fundamental matrix

3D Sensing and Reconstruction Readings: Ch 12: , Ch 13: ,

Take Home Exam # 2 Machine Vision

CSCI 5980/8980: Assignment #4. Fundamental Matrix

CS 6320 Computer Vision Homework 2 (Due Date February 15 th )

Lecture 9 & 10: Stereo Vision

Computer Vision Lecture 17

Agenda. Rotations. Camera models. Camera calibration. Homographies

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

Camera system: pinhole model, calibration and reconstruction

Visual Recognition: Image Formation

Epipolar geometry. x x

3D FACE RECONSTRUCTION BASED ON EPIPOLAR GEOMETRY

Computer Vision cmput 428/615

A Method for Interactive 3D Reconstruction of Piecewise Planar Objects from Single Images

Mosaics. Today s Readings

Multiple View Geometry in Computer Vision

BIL Computer Vision Apr 16, 2014

Euclidean Reconstruction Independent on Camera Intrinsic Parameters

Calibrating a Structured Light System Dr Alan M. McIvor Robert J. Valkenburg Machine Vision Team, Industrial Research Limited P.O. Box 2225, Auckland

Introduction to Computer Vision

COMP 558 lecture 19 Nov. 17, 2010

3D Photography: Epipolar geometry

A linear algorithm for Camera Self-Calibration, Motion and Structure Recovery for Multi-Planar Scenes from Two Perspective Images

Lecture 14: Basic Multi-View Geometry

N-Views (1) Homographies and Projection

Transcription:

Computer Vision: Lecture 3 Carl Olsson 2019-01-29 Carl Olsson Computer Vision: Lecture 3 2019-01-29 1 / 28

Todays Lecture Camera Calibration The inner parameters - K. Projective vs. Euclidean Reconstruction. Finding the camera matrix. DLT - Direct Linear Transformation. Normalization of uncalibrated cameras. Radial distortion Carl Olsson Computer Vision: Lecture 3 2019-01-29 2 / 28

The Inner Parameters -K The matrix K is the upper triangular matrix: γf sf x 0 K = 0 f y 0. 0 0 1 f - focal length γ - aspect ratio s - skew (x 0, y 0 ) - principal points Carl Olsson Computer Vision: Lecture 3 2019-01-29 3 / 28

The Inner Parameters -K The focal length f fx fy 1 = f 0 0 0 f 0 0 0 1 Re scales the images (e.g. meters pixels). x y 1 Carl Olsson Computer Vision: Lecture 3 2019-01-29 4 / 28

The Inner Parameters -K The principal point (x 0, y 0 ) fx + x 0 fy + y 0 = 1 f 0 x 0 0 f y 0 0 0 1 Re centers the image. Typically transforms the point (0, 0, 1) to the middle of the image. x y 1 480 0 0 640 Carl Olsson Computer Vision: Lecture 3 2019-01-29 5 / 28

The Inner Parameters -K Aspect ratio γfx + x 0 fy + y 0 1 = γf 0 x 0 0 f y 0 0 0 1 Pixels are not always squares but can be rectangular. In such cases the scaling in the x-direction should be different from the y-direction. x y 1 Skew γf sf x 0 0 f y 0 0 0 1 Corrects for tilted pixels. Typically zero. Carl Olsson Computer Vision: Lecture 3 2019-01-29 6 / 28

Projective vs. Euclidean Reconstruction Calibrated Cameras A camera P = K [R t], where the inner parameters K are known is called calibrated. If we change coordinates in the image using x = K 1 x, we get a so called normalized (calibrated) camera x = K 1 K [R t] X = [R t] X. Carl Olsson Computer Vision: Lecture 3 2019-01-29 7 / 28

Projective vs. Euclidean Reconstruction Projective The reconstruction is determined up to a projective transformation. If λx = PX, then for any projective transformation X = H 1 X we have λx = PHH 1 X = PH X. PH is also a valid camera. Carl Olsson Computer Vision: Lecture 3 2019-01-29 8 / 28

Projective vs. Euclidean Reconstruction Euclidean The reconstruction is determined up to a similarity transformation. If λx = [R t]x, then for any similarity transformation we have X = [ λ Q v x = [R t] 1 s 0 s [ sq v 0 1 ] 1 X ] X = [RQ Since RQ is a rotation this is a normalized camera. Rv + t s ] X. Carl Olsson Computer Vision: Lecture 3 2019-01-29 9 / 28

Projective vs. Euclidean Reconstruction Projective Euclidean Arch of triumph, Paris. The reconstructions have exactly the same reprojection error. But the projective coordinate system makes things look strange. Carl Olsson Computer Vision: Lecture 3 2019-01-29 10 / 28

Projective vs. Euclidean Reconstruction Demo. Carl Olsson Computer Vision: Lecture 3 2019-01-29 11 / 28

Finding K See lecture notes. Carl Olsson Computer Vision: Lecture 3 2019-01-29 12 / 28

RQ-factorization Theorem If A is an n n matrix then there is an orthogonal matrix Q and a right triangular matrix R such that A = RQ. (If A is invertible and the diagonal elements are chosen the be positive, then the factorization is unique.) Note: In our case we will use K for the triangular matrix and R for the rotation. Carl Olsson Computer Vision: Lecture 3 2019-01-29 13 / 28

Finding K See lecture notes. Carl Olsson Computer Vision: Lecture 3 2019-01-29 14 / 28

Direct Linear Transformation - DLT Finding the camera matrix Use images of a known object to eliminate the projective ambiguity. If X i are 3d-points of a known object, and x i corresponding projections we have λ 1 x 1 = PX 1 λ 2 x 2 = PX 2. λ N x N = PX N. There are 3N equations and 11 + N unknowns. We need 3N 11 + N N 6 points to solve the problem. Carl Olsson Computer Vision: Lecture 3 2019-01-29 15 / 28

Direct Linear Transformation - DLT Matrix Formulation P = p T 1 p T 2 p T 3 where p i are the rows of P The first equality is X T 1 p 1 λ 1 x 1 = 0 X T 1 p 2 λ 1 y 1 = 0 X T 1 p 3 λ 1 = 0, where x 1 = (x 1, y 1, 1). In matrix form X T 1 0 0 x 1 0 X T 1 0 y 1 0 0 X T 1 1 λ 1 Carl Olsson Computer Vision: Lecture 3 2019-01-29 16 / 28 p 1 p 2 p 3 = 0 0 0

Direct Linear Transformation - DLT Matrix Formulation More equations: X T 1 0 0 x 1 0 0... 0 X T 1 0 y 1 0 0... 0 0 X T 1 1 0 0... X T 2 0 0 0 x 2 0... 0 X T 2 0 0 y 2 0... 0 0 X T 2 0 1 0... X T 3 0 0 0 0 x 3... 0 X T 3 0 0 0 y 3... 0 0 X T 3 0 0 1............ } {{ } =M p 1 p 2 p 3 λ 1 λ 2 λ 3 }. {{ } =v = 0 Carl Olsson Computer Vision: Lecture 3 2019-01-29 17 / 28

Direct Linear Transformation - DLT Homogeneous Least Squares See lecture notes... Carl Olsson Computer Vision: Lecture 3 2019-01-29 18 / 28

Singular values decomposition Theorem Each m n matrix M (with real coefficients) can be factorized into M = USV T, where U and V are orthogonal (m m and n n respectively), S = [ diag(σ1, σ 2,..., σ r ) 0 0 0 σ 1 σ 2... σ r > 0 and r is the rank of the matrix. ], Carl Olsson Computer Vision: Lecture 3 2019-01-29 19 / 28

Direct Linear Transformation - DLT Homogeneous Least Squares See lecture notes... Carl Olsson Computer Vision: Lecture 3 2019-01-29 20 / 28

Direct Linear Transformation - DLT Improving the Numerics (Normalization of uncalibrated cameras) The matrix contains entries x i, y j and ones. Since x i and y i can be about a thousand, the numerics are often greatly improved by translating the coordinates such that their center of mass is zero and then rescaling the coordinates to be roughly 1. Change coordinates according to s 0 s x x = 0 s sȳ x. 0 0 1 Solve the homogeneous linear least squares system and transform back to the original coordinate system. Similar transformations for the 3D-points X i may also improve the results. Carl Olsson Computer Vision: Lecture 3 2019-01-29 21 / 28

Pose estimation using DLT 3D points measured using scanning arm. Carl Olsson Computer Vision: Lecture 3 2019-01-29 22 / 28

Pose estimation using DLT 14 points used for computing the camera matrix. Carl Olsson Computer Vision: Lecture 3 2019-01-29 23 / 28

Pose estimation using DLT 14 points used for computing the camera matrix. Carl Olsson Computer Vision: Lecture 3 2019-01-29 24 / 28

Texturing the chair Project the rest of the points into the image. Carl Olsson Computer Vision: Lecture 3 2019-01-29 25 / 28

Texturing the chair Form triangles. Use the texture from the image. Carl Olsson Computer Vision: Lecture 3 2019-01-29 26 / 28

Textured chair Carl Olsson Computer Vision: Lecture 3 2019-01-29 27 / 28

Radial Distortion Not modeled by the K -matrix. Cannot be removed by a projective mapping since lines are not mapped onto lines (see Szeliski). Carl Olsson Computer Vision: Lecture 3 2019-01-29 28 / 28