Projective Geometry and Camera Models

Similar documents
Lecture 12: Cameras and Geometry. CAP 5415 Fall 2010

Geometric Camera Parameters

The Geometry of Perspective Projection

INTRODUCTION TO RENDERING TECHNIQUES

Revision problem. Chapter 18 problem 37 page 612. Suppose you point a pinhole camera at a 15m tall tree that is 75m away.

Image Formation. 7-year old s question. Reference. Lecture Overview. It receives light from all directions. Pinhole

Understanding astigmatism Spring 2003

Relating Vanishing Points to Catadioptric Camera Calibration

2) A convex lens is known as a diverging lens and a concave lens is known as a converging lens. Answer: FALSE Diff: 1 Var: 1 Page Ref: Sec.

CS 4204 Computer Graphics

LIST OF CONTENTS CHAPTER CONTENT PAGE DECLARATION DEDICATION ACKNOWLEDGEMENTS ABSTRACT ABSTRAK

Geometric Optics Converging Lenses and Mirrors Physics Lab IV

The Limits of Human Vision

Master Anamorphic T1.9/35 mm

Anamorphic Projection Photographic Techniques for setting up 3D Chalk Paintings

Reflection and Refraction

Chapter 8 Geometry We will discuss following concepts in this chapter.

How does my eye compare to the telescope?

Lecture 2: Homogeneous Coordinates, Lines and Conics

Projective Geometry: A Short Introduction. Lecture Notes Edmond Boyer

Realtime 3D Computer Graphics Virtual Reality

DICOM Correction Item

Digital Photography Composition. Kent Messamore 9/8/2013

JUST THE MATHS UNIT NUMBER 8.5. VECTORS 5 (Vector equations of straight lines) A.J.Hobson

Basic Problem: Map a 3D object to a 2D display surface. Analogy - Taking a snapshot with a camera

Science In Action 8 Unit C - Light and Optical Systems. 1.1 The Challenge of light

Grade 8 Mathematics Geometry: Lesson 2

Endoscope Optics. Chapter Introduction

3D Scanner using Line Laser. 1. Introduction. 2. Theory

Transformations in the pipeline

4BA6 - Topic 4 Dr. Steven Collins. Chap. 5 3D Viewing and Projections

Geometry Chapter Point (pt) 1.1 Coplanar (1.1) 1.1 Space (1.1) 1.2 Line Segment (seg) 1.2 Measure of a Segment

Study of the Human Eye Working Principle: An impressive high angular resolution system with simple array detectors

Spatial location in 360 of reference points over an object by using stereo vision

Space Perception and Binocular Vision

1 of 9 2/9/2010 3:38 PM

Solving Simultaneous Equations and Matrices

Chapter 27 Optical Instruments The Human Eye and the Camera 27.2 Lenses in Combination and Corrective Optics 27.3 The Magnifying Glass

How To Analyze Ball Blur On A Ball Image

Equations Involving Lines and Planes Standard equations for lines in space

3D Drawing. Single Point Perspective with Diminishing Spaces

How does my eye compare to the telescope?

From 3D to 2D: Orthographic and Perspective Projection Part 1

Determine whether the following lines intersect, are parallel, or skew. L 1 : x = 6t y = 1 + 9t z = 3t. x = 1 + 2s y = 4 3s z = s

WAVELENGTH OF LIGHT - DIFFRACTION GRATING

Geometric Transformation CS 211A

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Optics and Geometry. with Applications to Photography Tom Davis November 15, 2004

WHITE PAPER. Are More Pixels Better? Resolution Does it Really Matter?

Projective Geometry. Projective Geometry

3D Drawing. Single Point Perspective with Diminishing Spaces

4. CAMERA ADJUSTMENTS

Feature Tracking and Optical Flow

Number Sense and Operations

Three-Dimensional Figures or Space Figures. Rectangular Prism Cylinder Cone Sphere. Two-Dimensional Figures or Plane Figures

Algebra Geometry Glossary. 90 angle

EXPERIMENT 6 OPTICS: FOCAL LENGTH OF A LENS

Lesson 26: Reflection & Mirror Diagrams

New York State Student Learning Objective: Regents Geometry

waves rays Consider rays of light from an object being reflected by a plane mirror (the rays are diverging): mirror object

PHYS 39a Lab 3: Microscope Optics

Exam 1 Sample Question SOLUTIONS. y = 2x

Sandia High School Geometry Second Semester FINAL EXAM. Mark the letter to the single, correct (or most accurate) answer to each problem.

Questions. Strategies August/September Number Theory. What is meant by a number being evenly divisible by another number?

9/16 Optics 1 /11 GEOMETRIC OPTICS

B4 Computational Geometry

Geometry of Vectors. 1 Cartesian Coordinates. Carlo Tomasi

LIGHT SECTION 6-REFRACTION-BENDING LIGHT From Hands on Science by Linda Poore, 2003.

Vector Notation: AB represents the vector from point A to point B on a graph. The vector can be computed by B A.

Why pinhole? Long exposure times. Timeless quality. Depth of field. Limitations lead to freedom

PDF Created with deskpdf PDF Writer - Trial ::

Geometry Course Summary Department: Math. Semester 1

alternate interior angles

Arrangements And Duality

L 2 : x = s + 1, y = s, z = 4s Suppose that C has coordinates (x, y, z). Then from the vector equality AC = BD, one has

Epipolar Geometry. Readings: See Sections 10.1 and 15.6 of Forsyth and Ponce. Right Image. Left Image. e(p ) Epipolar Lines. e(q ) q R.

Additional Topics in Math

Automatic 3D Reconstruction via Object Detection and 3D Transformable Model Matching CS 269 Class Project Report

Chapter 22: Mirrors and Lenses

How to Draw With Perspective. Created exclusively for Craftsy by Paul Heaston

Geometry Notes PERIMETER AND AREA

Deriving Camera and Point Location From a Series of Photos Using Numerical Optimization

Introduction to Autodesk Inventor for F1 in Schools

2.1 Three Dimensional Curves and Surfaces

Mathematical goals. Starting points. Materials required. Time needed

Light and its effects

Thin Lenses Drawing Ray Diagrams

Name Class. Date Section. Test Form A Chapter 11. Chapter 11 Test Bank 155

x 2 + y 2 = 1 y 1 = x 2 + 2x y = x 2 + 2x + 1

Interference. Physics 102 Workshop #3. General Instructions

ABERLINK 3D MKIII MEASUREMENT SOFTWARE

How an electronic shutter works in a CMOS camera. First, let s review how shutters work in film cameras.

Camera geometry and image alignment

Shape Measurement of a Sewer Pipe. Using a Mobile Robot with Computer Vision

OD1641 PRINCIPLES OF DRAFTING AND SHOP DRAWINGS

6 Space Perception and Binocular Vision

Using Photorealistic RenderMan for High-Quality Direct Volume Rendering

Angle - a figure formed by two rays or two line segments with a common endpoint called the vertex of the angle; angles are measured in degrees

CHAPTER 8, GEOMETRY. 4. A circular cylinder has a circumference of 33 in. Use 22 as the approximate value of π and find the radius of this cylinder.

Figure 1.1 Vector A and Vector F

Transcription:

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

Administrative Stuff Office hours Derek: Wed 4-5pm + drop by Ian: Mon 3-4pm, Thurs 3:3-4:3pm HW : out Monday Prob: Geometry, today and Tues Prob2: Lighting, next Thurs Prob3: Filters, following week Next Thurs: I m out, David Forsyth will cover

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 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: 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

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 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

Vanishing objects

Projection: world coordinates image 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 ij line p i ij i ai = bi c i ui = vi line = p i i p q = line line j j

Another problem solved by homogeneous coordinates Intersection of parallel lines Cartesian: (Inf, Inf) Homogeneous: (,, ) Cartesian: (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

[ ] X x = K I = z y x f f v u w 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 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 v u w

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? Image World Slide by Steve Seitz = z y x s f f v u w

Suppose we have two 3D cubes on the ground facing the viewer, one near, one far.. What would they look like in perspective? 2. What would they look like in weak perspective? Photo credit: GazetteLive.co.uk

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 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

Questions

What about focus, aperture, DOF, FOV, etc?

Adding a lens circle of confusion A lens focuses light onto the film There is a specific distance at which objects are in focus other points project to a circle of confusion in the image Changing the shape of the lens changes this distance

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

The eye The human eye is a camera Iris - colored annulus with radial muscles Pupil - the hole (aperture) whose size is controlled by the iris What s the film? photoreceptor cells (rods and cones) in the retina

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 aperture = small DOF Small aperture = 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 How is this done? Zoom in while moving away http://en.wikipedia.org/wiki/focal_length