Projective Geometry and Camera Models

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

Projective Geometry and Camera Models

Capturing Light: Geometry of Image Formation

Lecture 8: Camera Models

Projective Geometry and Camera Models

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

Single-view 3D Reconstruction

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

Image Formation I Chapter 1 (Forsyth&Ponce) Cameras

Image Formation I Chapter 1 (Forsyth&Ponce) Cameras

CS6670: Computer Vision

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

Image Formation I Chapter 2 (R. Szelisky)

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

3-D D Euclidean Space - Vectors

Computer Vision CS 776 Fall 2018

ECE Digital Image Processing and Introduction to Computer Vision. Outline

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

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

Camera Geometry II. COS 429 Princeton University

Single-view metrology

Modeling Light. On Simulating the Visual Experience

CS4670: Computer Vision

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

Scene Modeling for a Single View

Structure from motion

Structure from Motion

Agenda. Perspective projection. Rotations. Camera models

Agenda. Rotations. Camera models. Camera calibration. Homographies

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

CIS 580, Machine Perception, Spring 2015 Homework 1 Due: :59AM

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

Scene Modeling for a Single View

How to achieve this goal? (1) Cameras

Camera Model and Calibration

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

Structure from Motion

Agenda. Rotations. Camera calibration. Homography. Ransac

Camera Model and Calibration. Lecture-12

Structure from motion

COS429: COMPUTER VISON CAMERAS AND PROJECTIONS (2 lectures)

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

Cameras and Stereo CSE 455. Linda Shapiro

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.

Vision Review: Image Formation. Course web page:

Scene Modeling for a Single View

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

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

calibrated coordinates Linear transformation pixel coordinates

Geometric camera models and calibration

Computer Vision cmput 428/615

Computer Vision Project-1

Image warping and stitching

Camera model and multiple view geometry

MAN-522: COMPUTER VISION SET-2 Projections and Camera Calibration

Assignment 2 : Projection and Homography

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

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

BIL Computer Vision Apr 16, 2014

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

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

Camera models and calibration

Image warping and stitching

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

Computer Vision Projective Geometry and Calibration. Pinhole cameras

521466S Machine Vision Exercise #1 Camera models

Perception II: Pinhole camera and Stereo Vision

N-Views (1) Homographies and Projection

Visual Recognition: Image Formation

Projections. Brian Curless CSE 457 Spring Reading. Shrinking the pinhole. The pinhole camera. Required:

Camera Calibration. COS 429 Princeton University

Computer Vision Lecture 17

11/28/17. Midterm Review. Magritte, Homesickness. Computational Photography Derek Hoiem, University of Illinois

3D Computer Vision II. Reminder Projective Geometry, Transformations

1 Projective Geometry

3D Rendering and Ray Casting

Pin Hole Cameras & Warp Functions

Jorge Salvador Marques, geometric camera model

Digital Image Processing COSC 6380/4393

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

Computer Vision Lecture 17

Scene Modeling for a Single View

Structure from Motion CSC 767

CS201 Computer Vision Camera Geometry

Introduction to Computer Vision

CS6670: Computer Vision

Geometry of image formation

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

Perspective Projection [2 pts]

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

Epipolar Geometry and Stereo Vision

Computer Vision Course Lecture 02. Image Formation Light and Color. Ceyhun Burak Akgül, PhD cba-research.com. Spring 2015 Last updated 04/03/2015

Lecture 9: Epipolar Geometry

2%34 #5 +,,% ! # %& ()% #% +,,%. & /%0%)( 1 ! # %&# (&)# +, %& ./01 /1&2% # /&

More Mosaic Madness. CS194: Image Manipulation & Computational Photography. Steve Seitz and Rick Szeliski. Jeffrey Martin (jeffrey-martin.

Robotics - Projective Geometry and Camera model. Marcello Restelli

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

3D Rendering and Ray Casting

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

Transcription:

/2/ Projective Geometry and Camera Models Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem

Note about HW Out before next Tues Prob: covered today, Tues Prob2: covered next Thurs Prob3: covered following week

Last class: intro Overview of vision, examples of state of art Logistics

Next two 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 homogeneous coordinates and vanishing lines Camera matrix Other camera parameters

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: Mo Ti, 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

First Photograph First photograph Took 8 hours on pewter plate Photograph of the first photograph Joseph Niepce, 826 Stored at UT Austin

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

Projection can be tricky Slide source: Seitz

Projection can be tricky Slide source: Seitz

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

Slide from Efros, Photo from 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

Note on estimating vanishing points Use multiple lines for better accuracy but lines will not intersect at exactly the same point in practice One solution: take mean of intersecting pairs bad idea! Instead, minimize angular differences

(more vanishing points on board)

Vanishing objects

Projection: world coordinates image coordinates (work on board)

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 Euclidean Coordinates Point in Euclidean 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 ij line p i ij i = = ui vi i line = p i a b c p q = line line i i i j j

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

Projection matrix Slide Credit: Saverese R,T j w 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 photographed objects into images (SIGGRAPH 27) Original Created

When have I used this stuff? Inserting synthetic objects into images (submitted)

[ ]X x = K I = z y x f f v u k K Slide Credit: Saverese Projection matrix Intrinsic Assumptions Unit aspect ratio Optical center 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 k 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 k β α 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 k β α 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 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 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 k z y x β α 5 6

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

Other things to be aware of

Radial Distortion Corrected Barrel Distortion Image from Martin Habbecke

Focal length, aperture, depth of field F optical center (Center Of Projection) focal point A lens focuses parallel rays onto a single focal point focal point at a distance f beyond the plane of the lens Aperture of diameter D restricts the range of rays Slide source: Seitz

Depth of field Slide source: Seitz f / 5.6 f / 32 Changing the aperture size or focal length affects depth of field Flower images from Wikipedia http://en.wikipedia.org/wiki/depth_of_field

Large apeture = small DOF Small apeture = large DOF Varying the aperture Slide from Efros

Shrinking the aperture Why not make the aperture as small as possible? Less light gets through Diffraction effects Slide by Steve Seitz

Shrinking the aperture Slide by Steve Seitz

Relation between field of view and focal length Field of view (angle width) fov = tan d 2 f Film/Sensor Width Focal length Dolly zoom (or Vertigo effect ) http://www.youtube.com/watch?v=y48r6 iiyhs

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 Homogeneous coordinates x = K[ R t] X

Next class Applications of camera model and projective geometry Recovering the camera intrinsic and extrinsic parameters from an image Recovering size in the world Projecting from one plane to another (if time allows)

Questions