CS 691 Computational Photography Instructor: Gianfranco Doretto 3D to 2D Projections.

Slides:



Advertisements
Similar presentations
C280, Computer Vision Prof. Trevor Darrell Lecture 2: Image Formation.
Advertisements

Last 4 lectures Camera Structure HDR Image Filtering Image Transform.
The Camera : Computational Photography Alexei Efros, CMU, Fall 2006.
More Mosaic Madness : Computational Photography Alexei Efros, CMU, Fall 2011 © Jeffrey Martin (jeffrey-martin.com) with a lot of slides stolen from.
Three-Dimensional Viewing Sang Il Park Sejong University Lots of slides are stolen from Jehee Lee’s.
Computer Vision CS 776 Spring 2014 Cameras & Photogrammetry 1 Prof. Alex Berg (Slide credits to many folks on individual slides)
Paris town hall.
The Camera CS194: Image Manipulation & Computational Photography Alexei Efros, UC Berkeley, Fall 2014.
Projection Readings Szeliski 2.1. Projection Readings Szeliski 2.1.
Image formation and cameras CSE P 576 Larry Zitnick Many slides courtesy of Steve Seitz.
Camera calibration and epipolar geometry
Camera Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
Single-view metrology
Modeling Light : Rendering and Image Processing Alexei Efros.
Announcements. Projection Today’s Readings Nalwa 2.1.
Lecture 5: Projection CS6670: Computer Vision Noah Snavely.
Announcements Mailing list (you should have received messages) Project 1 additional test sequences online Talk today on “Lightfield photography” by Ren.
CS485/685 Computer Vision Prof. George Bebis
Computer Vision - A Modern Approach
Announcements Mailing list Project 1 test the turnin procedure *this week* (make sure it works) vote on best artifacts in next week’s class Project 2 groups.
Computer Vision : CISC4/689
Lecture 13: Projection, Part 2
Lecture 12: Projection CS4670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Lecture 6: Image Warping and Projection CS6670: Computer Vision Noah Snavely.
Single-view geometry Odilon Redon, Cyclops, 1914.
The Pinhole Camera Model
More Mosaic Madness : Computational Photography Alexei Efros, CMU, Fall 2005 © Jeffrey Martin (jeffrey-martin.com) with a lot of slides stolen from.
Panoramas and Calibration : Rendering and Image Processing Alexei Efros …with a lot of slides stolen from Steve Seitz and Rick Szeliski.
CS223b, Jana Kosecka Rigid Body Motion and Image Formation.
Single-view Metrology and Camera Calibration Computer Vision Derek Hoiem, University of Illinois 02/26/15 1.
The Camera : Computational Photography Alexei Efros, CMU, Fall 2008.
Cameras, lenses, and calibration
Perspective projection
EEM 561 Machine Vision Week 10 :Image Formation and Cameras
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
Lecture 14: Projection CS4670 / 5670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
776 Computer Vision Jan-Michael Frahm Fall Camera.
Geometric Models & Camera Calibration
Recap from Wednesday Two strategies for realistic rendering capture real world data synthesize from bottom up Both have existed for 500 years. Both are.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
Sebastian Thrun CS223B Computer Vision, Winter Stanford CS223B Computer Vision, Winter 2005 Lecture 2 Lenses and Camera Calibration Sebastian Thrun,
Single-view Metrology and Camera Calibration Computer Vision Derek Hoiem, University of Illinois 01/25/11 1.
Peripheral drift illusion. Multiple views Hartley and Zisserman Lowe stereo vision structure from motion optical flow.
Computational Photography Derek Hoiem, University of Illinois
Single-view geometry Odilon Redon, Cyclops, 1914.
CS-498 Computer Vision Week 7, Day 2 Camera Parameters Intrinsic Calibration  Linear  Radial Distortion (Extrinsic Calibration?) 1.
Three-Dimensional Viewing
More with Pinhole + Single-view Metrology
Single-view geometry Odilon Redon, Cyclops, 1914.
Announcements Project 1 grading session this Thursday 2:30-5pm, Sieg 327 –signup ASAP:signup –10 minute slot to demo your project for a TA »have your program.
Example: warping triangles Given two triangles: ABC and A’B’C’ in 2D (12 numbers) Need to find transform T to transfer all pixels from one to the other.
Lecture 14: Projection CS4670 / 5670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Lecture 18: Cameras CS4670 / 5670: Computer Vision KavitaBala Source: S. Lazebnik.
CSE 185 Introduction to Computer Vision
CS5670: Computer Vision Lecture 9: Cameras Noah Snavely
Jan-Michael Frahm Fall 2016
The Camera : Computational Photography
Digital Visual Effects, Spring 2007 Yung-Yu Chuang 2007/4/17
CS 790: Introduction to Computational Vision
More Mosaic Madness : Computational Photography
Lecture 13: Cameras and geometry
The Camera : Computational Photography
Announcements Midterm out today Project 1 demos.
Projection Readings Nalwa 2.1.
Credit: CS231a, Stanford, Silvio Savarese
Projection Readings Szeliski 2.1.
Announcements Midterm out today Project 1 demos.
Camera model and calibration
Presentation transcript:

CS 691 Computational Photography Instructor: Gianfranco Doretto 3D to 2D Projections

Pinhole camera model Pinhole model: –Captures pencil of rays – all rays through a single point –The point is called Center of Projection (COP) –The image is formed on the Image Plane –Effective focal length f is distance from COP to Image Plane

Dimensionality Reduction Machine (3D to 2D) 3D world2D image What have we lost? Angles Distances (lengths)

Projection can be tricky… Slide source: Seitz

Projection can be tricky… Slide source: Seitz

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

Lengths can’t be trusted... B’ C’ A’

…but humans adopt! Müller-Lyer Illusion We don’t make measurements in the image plane

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

Parallel lines aren’t…

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 o Vanishing Point o Vanishing Line

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

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

Modeling projection The coordinate system –We will use the pin-hole model as an approximation –Put the optical center (Center Of Projection) at the origin –Put the image plane (Projection Plane) in front of the COP Why? –The camera looks down the negative z axis we need this if we want right-handed-coordinates –

Modeling projection Projection equations –Compute intersection with PP of ray from (x,y,z) to COP –Derived using similar triangles (on board) We get the projection by throwing out the last coordinate:

Homogeneous coordinates Is this a linear transformation? Trick: add one more coordinate: homogeneous image coordinates homogeneous scene coordinates Converting from homogeneous coordinates no—division by z is nonlinear

Homogeneous coordinates Invariant to scaling Point in Cartesian is ray in Homogeneous Homogeneous Coordinates Cartesian Coordinates

Perspective Projection Projection is a matrix multiply using homogeneous coordinates: divide by third coordinate This is known as perspective projection The matrix is the projection matrix Can also formulate as a 4x4 divide by fourth coordinate

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

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?

Spherical Projection What if PP is spherical with center at COP? In spherical coordinates, projection is trivial:  d  Note: doesn’t depend on focal length!

Projection matrix x: Image Coordinates: w(u,v,1) K: Intrinsic Matrix (3x3) R: Rotation (3x3) t: Translation (3x1) X: World Coordinates: (X,Y,Z,1) OwOw iwiw kwkw jwjw R,T

K Projection matrix Intrinsic Assumptions Unit aspect ratio Principal point at (0,0) No skew Extrinsic Assumptions No rotation Camera at (0,0,0)

Remove assumption: known optical center Intrinsic Assumptions Unit aspect ratio No skew Extrinsic Assumptions No rotation Camera at (0,0,0)

Remove assumption: square pixels Intrinsic Assumptions No skew Extrinsic Assumptions No rotation Camera at (0,0,0)

Remove assumption: non- skewed pixels Intrinsic AssumptionsExtrinsic Assumptions No rotation Camera at (0,0,0) Note: different books use different notation for parameters

Oriented and Translated Camera OwOw iwiw kwkw jwjw t R

Allow camera translation Intrinsic AssumptionsExtrinsic Assumptions No rotation

3D Rotation of Points, : Rotation around the coordinate axes, counter-clockwise: p p’p’p’p’  y z Slide Credit: Saverese

Allow camera rotation

Degrees of freedom 56

Vanishing Point = Projection from Infinity

Lens Flaws

Lens Flaws: Chromatic Aberration Dispersion: wavelength-dependent refractive index –(enables prism to spread white light beam into rainbow) Modifies ray-bending and lens focal length: f(λ) color fringes near edges of image Corrections: add ‘doublet’ lens of flint glass, etc.

Chromatic Aberration Near Lens Center Near Lens Outer Edge

Radial Distortion (e.g. ‘Barrel’ and ‘pin-cushion’) straight lines curve around the image center

Radial Distortion Radial distortion of the image –Caused by imperfect lenses –Deviations are most noticeable for rays that pass through the edge of the lens No distortionPin cushionBarrel

Radial Distortion

Slide Credits This set of sides also contains contributions kindly made available by the following authors – Alexei Efros – Stephen E. Palmer – Steve Seitz – Derek Hoiem – David Forsyth – George Bebis – Silvio Savarese