Pinhole Camera Model 10/05/17. Computational Photography Derek Hoiem, University of Illinois

Similar documents
Projective Geometry and Camera Models

Projective Geometry and Camera Models

Capturing Light: Geometry of Image Formation

Lecture 8: Camera Models

Projective Geometry and Camera Models

Perspective projection. A. Mantegna, Martyrdom of St. Christopher, c. 1450

CHAPTER 3. Single-view Geometry. 1. Consequences of Projection

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

Image Formation I Chapter 1 (Forsyth&Ponce) Cameras

Image Formation I Chapter 1 (Forsyth&Ponce) Cameras

CS6670: Computer Vision

Image Formation I Chapter 2 (R. Szelisky)

Camera Geometry II. COS 429 Princeton University

Single-view 3D Reconstruction

CMPSCI 670: Computer Vision! Image formation. University of Massachusetts, Amherst September 8, 2014 Instructor: Subhransu Maji

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

ECE Digital Image Processing and Introduction to Computer Vision. Outline

Single-view metrology

Computer Vision CS 776 Fall 2018

CS4670: Computer Vision

Camera Model and Calibration

DD2423 Image Analysis and Computer Vision IMAGE FORMATION. Computational Vision and Active Perception School of Computer Science and Communication

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

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

Agenda. Perspective projection. Rotations. Camera models

Camera Model and Calibration. Lecture-12

Scene Modeling for a Single View

Scene Modeling for a Single View

Image formation. Thanks to Peter Corke and Chuck Dyer for the use of some slides

Instance-level recognition I. - Camera geometry and image alignment

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

3-D D Euclidean Space - Vectors

Modeling Light. On Simulating the Visual Experience

Agenda. Rotations. Camera models. Camera calibration. Homographies

Scene Modeling for a Single View

Geometric camera models and calibration

Lecture 11 MRF s (conbnued), cameras and lenses.

Introduction to Homogeneous coordinates

Computer Vision Projective Geometry and Calibration. Pinhole cameras

How to achieve this goal? (1) Cameras

Image warping and stitching

Cameras and Stereo CSE 455. Linda Shapiro

Image Based Rendering. D.A. Forsyth, with slides from John Hart

COS429: COMPUTER VISON CAMERAS AND PROJECTIONS (2 lectures)

Agenda. Rotations. Camera calibration. Homography. Ransac

Camera Projection Models We will introduce different camera projection models that relate the location of an image point to the coordinates of the

Structure from motion

Image warping and stitching

EXAM SOLUTIONS. Image Processing and Computer Vision Course 2D1421 Monday, 13 th of March 2006,

Scene Modeling for a Single View

1 Projective Geometry

Camera models and calibration

Computer Vision cmput 428/615

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

CSE 252B: Computer Vision II

Structure from motion

Pin Hole Cameras & Warp Functions

Stereo CSE 576. Ali Farhadi. Several slides from Larry Zitnick and Steve Seitz

Image Formation. Antonino Furnari. Image Processing Lab Dipartimento di Matematica e Informatica Università degli Studi di Catania

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

More Single View Geometry

521466S Machine Vision Exercise #1 Camera models

Geometry of image formation

Vision Review: Image Formation. Course web page:

Camera Calibration. COS 429 Princeton University

ECE-161C Cameras. Nuno Vasconcelos ECE Department, UCSD

Structure from Motion

Camera model and calibration

Single View Geometry. Camera model & Orientation + Position estimation. What am I?

But First: Multi-View Projective Geometry

More Single View Geometry

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

Structure from Motion

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

Computer Vision Project-1

Image formation - About the course. Grading & Project. Tentative Schedule. Course Content. Students introduction

Visual Recognition: Image Formation

Lecture 9: Epipolar Geometry

CS201 Computer Vision Camera Geometry

Introduction to Computer Vision

Camera model and multiple view geometry

Assignment 2 : Projection and Homography

BIL Computer Vision Apr 16, 2014

Jorge Salvador Marques, geometric camera model

3D Geometry and Camera Calibration

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

Pin Hole Cameras & Warp Functions

All human beings desire to know. [...] sight, more than any other senses, gives us knowledge of things and clarifies many differences among them.

Epipolar Geometry and Stereo Vision

Simultaneous Vanishing Point Detection and Camera Calibration from Single Images

6.819 / 6.869: Advances in Computer Vision Antonio Torralba and Bill Freeman. Lecture 11 Geometry, Camera Calibration, and Stereo.

Unit 3 Multiple View Geometry

calibrated coordinates Linear transformation pixel coordinates

Cameras and Radiometry. Last lecture in a nutshell. Conversion Euclidean -> Homogenous -> Euclidean. Affine Camera Model. Simplified Camera Models

Recap: Features and filters. Recap: Grouping & fitting. Now: Multiple views 10/29/2008. Epipolar geometry & stereo vision. Why multiple views?

Perception II: Pinhole camera and Stereo Vision

CIS 580, Machine Perception, Spring 2016 Homework 2 Due: :59AM

Projective geometry, camera models and calibration

Projective geometry for Computer Vision

Epipolar Geometry and Stereo Vision

Transcription:

Pinhole Camera Model /5/7 Computational Photography Derek Hoiem, University of Illinois

Next classes: Single-view Geometry How tall is this woman? How high is the camera? What is the camera rotation? What is the focal length of the camera? Which ball is closer?

Today s class Mapping between image and world coordinates Pinhole camera model Projective geometry Vanishing points and lines Projection matrix

Image formation Slide source: Seitz Let s design a camera Idea : put a piece of film in front of an object Do we get a reasonable image?

Pinhole camera Idea 2: add a barrier to block off most of the rays This reduces blurring The opening known as the aperture Slide source: Seitz

Pinhole camera f c f = focal length c = center of the camera Figure from Forsyth

Camera obscura: the pre-camera First idea: Mozi, China (47BC to 39BC) First built: Alhacen, Iraq/Egypt (965 to 39AD) Illustration of Camera Obscura Freestanding camera obscura at UNC Chapel Hill Photo by Seth Ilys

Camera Obscura used for Tracing Lens Based Camera Obscura, 568

First Photograph Oldest surviving photograph Took 8 hours on pewter plate Photograph of the first photograph Joseph Niepce, 826 Stored at UT Austin Niepce later teamed up with Daguerre, who eventually created Daguerrotypes

Dimensionality Reduction Machine (3D to 2D) 3D world 2D image Point of observation Figures Stephen E. Palmer, 22

Projection can be tricky Leon Keer streetpainting3d.com

Julian Beever julianbeever.net

Projective Geometry What is lost? Length Who is taller? Which is closer?

Length is not preserved A C B Figure by David Forsyth

Projective Geometry What is lost? Length Angles Parallel? Perpendicular?

Projective Geometry What is preserved? Straight lines are still straight

Vanishing points and lines Parallel lines in the world intersect in the image at a vanishing point

Vanishing points and lines Vanishing Line Vanishing Point o Vanishing Point o The projections of parallel 3D lines intersect at a vanishing point The projection of parallel 3D planes intersect at a vanishing line If a set of parallel 3D lines are also parallel to a particular plane, their vanishing point will lie on the vanishing line of the plane Not all lines that intersect are parallel Vanishing point <-> 3D direction of a line Vanishing line <-> 3D orientation of a surface

Credit: Criminisi Vanishing points and lines Vertical vanishing point (at infinity) Vanishing line Vanishing point Vanishing point

Vanishing points and lines Photo from online Tate collection

Vanishing objects

Projection: world coordinatesimage coordinates Optical Center (u., v ) f Z Y.. P X Y Z. u v u p v Camera Center (t x, t y, t z )

Homogeneous coordinates Conversion Converting to homogeneous coordinates homogeneous image coordinates homogeneous scene coordinates Converting from homogeneous coordinates

Homogeneous coordinates Invariant to scaling x k y w kx ky kw Homogeneous Coordinates kx kw ky kw x w y w Cartesian Coordinates Point in Cartesian is ray in Homogeneous

Basic geometry in homogeneous coordinates Line equation: ax + by + c = Append to pixel coordinate to get homogeneous coordinate Line given by cross product of two points Intersection of two lines given by cross product of the lines q ij line p line i ij i line i a b c ui vi p i i i i p line j j

Another problem solved by homogeneous coordinates Intersection of parallel lines Cartesian: (Inf, Inf) Homogeneous: (,, ) Cartesian: (Inf, Inf) Homogeneous: (, 2, )

Pinhole Camera Model R j w t k w O w i w x K R t X x: Image Coordinates: (u,v,) K: Intrinsic Matrix (3x3) R: Rotation (3x3) t: Translation (3x) X: World Coordinates: (X,Y,Z,)

Interlude: when have I used this stuff?

When have I used this stuff? Object Recognition (CVPR 26)

When have I used this stuff? Single-view reconstruction (SIGGRAPH 25)

When have I used this stuff? Getting spatial layout in indoor scenes (ICCV 29)

When have I used this stuff? Inserting synthetic objects into images: http://vimeo.com/2896254

When have I used this stuff? Creating detailed and complete 3D scene models from a single view (ongoing)

When have I used this stuff? Multiview 3D reconstruction at Reconstruct

X x K I z y x f f v u w K Slide Credit: Saverese Projection matrix Intrinsic Assumptions Unit aspect ratio Principal point at (,) No skew Extrinsic Assumptions No rotation Camera at (,,)

Remove assumption: known optical center X x K I z y x v f u f v u w Intrinsic Assumptions Unit aspect ratio No skew Extrinsic Assumptions No rotation Camera at (,,)

Remove assumption: square pixels X x K I z y x v u v u w Intrinsic Assumptions No skew Extrinsic Assumptions No rotation Camera at (,,)

Remove assumption: non-skewed pixels X x K I z y x v u s v u w Intrinsic Assumptions Extrinsic Assumptions No rotation Camera at (,,) Note: different books use different notation for parameters

Oriented and Translated Camera R j w t k w O w i w

Allow camera translation X t x K I z y x t t t v u v u w z y x Intrinsic Assumptions Extrinsic Assumptions No rotation

3D Rotation of Points Rotation around the coordinate axes, counter-clockwise: cos sin sin cos ) ( cos sin sin cos ) ( cos sin sin cos ) ( z y x R R R p p y z Slide Credit: Saverese

Allow camera rotation X t x K R 33 32 3 23 22 2 3 2 z y x t r r r t r r r t r r r v u s v u w z y x

Degrees of freedom X t x K R 33 32 3 23 22 2 3 2 z y x t r r r t r r r t r r r v u s v u w z y x 5 6

Vanishing Point = Projection from Infinity R R R z y x z y x z y x K p KR p t K R p R R R z y x v f u f v u w u z fx u R R v z fy v R R

Orthographic Projection Special case of perspective projection Distance from the COP to the image plane is infinite Also called parallel projection What s the projection matrix? Image World Slide by Steve Seitz z y x w v u

Scaled Orthographic Projection Special case of perspective projection Object dimensions are small compared to distance to camera Also called weak perspective What s the projection matrix? Slide by Steve Seitz z y x s f f w v u Illustration from George Bebis

Take-home questions Suppose the camera axis is in the direction of (x=, y=, z=) in its own coordinate system. What is the camera axis in world coordinates given the extrinsic parameters R, t Suppose a camera at height y=h (x=,z=) observes a point at (u,v) known to be on the ground (y=). Assume R is identity. What is the 3D position of the point in terms of f, u, v?

Beyond Pinholes: Radial Distortion Corrected Barrel Distortion Image from Martin Habbecke

Things to remember Vanishing points and vanishing lines Vanishing line Vanishing point Vertical vanishing point (at infinity) Vanishing point Pinhole camera model and camera projection matrix x K R t X

Next classes Tues: single-view metrology Measuring 3D distances from the image Thurs: single-view 3D reconstruction