776 Computer Vision Jan-Michael Frahm Fall 2015. Camera.

Slides:



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

The Camera : Computational Photography Alexei Efros, CMU, Fall 2006.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
CSE 473/573 Computer Vision and Image Processing (CVIP) Ifeoma Nwogu Lecture 4 – Image formation(part I)
CS 691 Computational Photography Instructor: Gianfranco Doretto 3D to 2D Projections.
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 Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
Cameras. Overview The pinhole projection model Qualitative properties Perspective projection matrix Cameras with lenses Depth of focus Field of view Lens.
Cameras (Reading: Chapter 1) Goal: understand how images are formed Camera obscura dates from 15 th century Basic abstraction is the pinhole camera Perspective.
Image Formation and Optics
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
CAU Kiel DAGM 2001-Tutorial on Visual-Geometric 3-D Scene Reconstruction 1 The plan for today Leftovers and from last time Camera matrix Part A) Notation,
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.
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.
The Pinhole Camera Model
CS223b, Jana Kosecka Rigid Body Motion and Image Formation.
Today: The Camera. Overview The pinhole projection model Qualitative properties Perspective projection matrix Cameras with lenses Depth of focus Field.
Single-view Metrology and Camera Calibration Computer Vision Derek Hoiem, University of Illinois 02/26/15 1.
Image Formation III Chapter 1 (Forsyth&Ponce) Cameras “Lenses”
The Camera : Computational Photography Alexei Efros, CMU, Fall 2008.
Cameras, lenses, and calibration
Perspective projection
Cameras CSE 455, Winter 2010 January 25, 2010.
EEM 561 Machine Vision Week 10 :Image Formation and Cameras
Building a Real Camera.
Northeastern University, Fall 2005 CSG242: Computational Photography Ramesh Raskar Mitsubishi Electric Research Labs Northeastern University September.
Lecture 14: Projection CS4670 / 5670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Viewing and Projections
776 Computer Vision Jan-Michael Frahm Spring 2012.
Course 12 Calibration. 1.Introduction In theoretic discussions, we have assumed: Camera is located at the origin of coordinate system of scene.
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.
COMPUTER VISION D10K-7C02 CV02: Camera Dr. Setiawan Hadi, M.Sc.CS. Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran.
Single-view Metrology and Camera Calibration Computer Vision Derek Hoiem, University of Illinois 01/25/11 1.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
Geometric Camera Models
1 Chapter 2: Geometric Camera Models Objective: Formulate the geometrical relationships between image and scene measurements Scene: a 3-D function, g(x,y,z)
Instructor: Mircea Nicolescu Lecture 3 CS 485 / 685 Computer Vision.
More with Pinhole + Single-view Metrology
Image Formation III Chapter 1 (Forsyth&Ponce) Cameras “Lenses” Guido Gerig CS-GY 6643, Spring 2016 (slides modified from Marc Pollefeys, UNC Chapel Hill/
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
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.
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.
CS5670: Computer Vision Lecture 9: Cameras Noah Snavely
Jan-Michael Frahm Fall 2016
The Camera : Computational Photography
CSCE 441 Computer Graphics 3-D Viewing
Overview Pin-hole model From 3D to 2D Camera projection
Lecture 13: Cameras and geometry
Geometric Camera Models
Lecturer: Dr. A.H. Abdul Hafez
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.
The Camera.
Presentation transcript:

776 Computer Vision Jan-Michael Frahm Fall 2015

Camera

Camera object point emits light in all directions put a sensor to capture the image block most of the rays with a barrier called aperture sensor (CCD, CMOS, etc.)

Capture an Object Barrier is known as aperture o blocks of most of the rays o reduces blur image source: S. Seitz

Capture an Object Barrier is known as aperture o blocks of most of the rays o reduces blur Pinhole camera (camera obscura) Interior of camera obscura (Sunday Magazine, 1838) Camera obscura (France, 1830)

Capture an Object Barrier is known as aperture o blocks of most of the rays o reduces blur Pinhole camera (camera obscura) o infinitely small aperture (pinhole) o captures all rays going through the pinhole (pencil of rays) o image is captured on image plane image source: S. Seitz

Camera Projection Project 3D point [X,Y,Z] into image point [x,y] Z camera in origin [0,0,0] no rotation, translation of the camera

Properties of Pinhole Camera What is preserved o points project to points o lines, incidence (except for parallel lines, lines through focal point) o planes project to planes What is lost o depth (all points on a ray project to the same point) o angles, length

Pinhole Camera Projection z x y focal length sensor 0 Image point is the intersection of the ray from the object point through the origin 0 with the image plane Image point can be derived through similar triangles Projection eliminates last component M =(X,Y,Z) 0

Camera Projection Is this a linear transformation? Can we make it a linear transformation? M Vector relative to 0: a1a1 a3a3 a2a2 Point in affine coordinates: e2e2 e3e3 e1e1 0

Camera Projection Unified notation by including origin 0 into the representation homogenous representation of M M a1a1 a3a3 a2a2 e2e2 e3e3 e1e1 0

Special transformation: Rotation Rigid transformation: Angles and lengths preserved R is orthonormal matrix defined by three angles around three coordinate axes ezez eyey exex  Rotation with angle  around e z

Projective geometry in 2D Projective space is space of rays emerging from 0 o view point 0 forms projection center (focal point) for all rays o rays v emerge from viewpoint into scene o ray g is called projective point, defined as scaled v: g= v x y w 0

Projective and homogeneous points w=1  (R 2 ) w x y Projective space is space of rays emerging from 0 o view point 0 forms projection center for all rays o rays v emerge from viewpoint into scene o ray g is called projective point, defined as scaled v: g= v 0

Finite and infinite points All rays g that are not parallel to  intersect at an affine point v on . w=1 O  The ray g(w=0) does not intersect . Hence v  is not an affine point but a direction. Directions have the coordinates (x,y,0) T Projective space combines affine space with infinite points (directions). (R 2 )

Pinhole Camera Projection z x y focal length sensor 0 M=(X,Y,Z) X Y Z0Z0 0  Image plane Camera center Z (Optical axis) x y (R 2 )

Perspective projection Perspective projection models pinhole camera:  scene geometry is affine R 3 space with coordinates M=(X,Y,Z,1) T  camera focal point in 0=(0,0,0,1) T, camera viewing direction along Z  image plane (x,y) in  (R 2 ) aligned with plane (X,Y) at Z 0 = f (focal length)  scene point M projects onto point m on plane surface X Y f 0  Image plane Camera center Z (Optical axis) x y (R 2 )

Projective Transformation Projective Transformation maps P onto p X Y O Projective Transformation linearizes projection

Perspective Projection Dimension reduction from R 3 into R 2 by projection onto  (R 2 ) X Y 0  (R 2 )

Perspective Projection Dimension reduction from R 3 into R 2 by projection onto  (R 2 ) X Y 0  (R 2 )

Projection in General Pose Rotation [R] Projection center C M World coordinates Projection: m

X Y Image center c= (c x, c y ) T Projection center Z (Optical axis) Pixel scale f= (f x,f y ) T x y Pixel coordinates m = (y,x) T Image plane and image sensor A sensor with picture elements (Pixel) is added onto the image plane Image sensor Image-sensor mapping: Pixel coordinates are related to image coordinates by affine transformation K with five parameters:  Image center c=(c x,c y ) T defines optical axis  Pixel size and pixel aspect ratio defines scale f=(f x,f y ) T  image skew s to model angle between pixel rows and columns

Projection matrix P Camera projection matrix P combines:  inverse affine transformation T cam -1 from general pose to origin  Perspective projection P 0 to image plane at Z 0 =1  affine mapping K from image to sensor coordinates World to camera coord. trans. matrix (4x4) Perspective projection matrix (3x4) Camera to pixel coord. trans. matrix (3x3) = 2D point (3x1) 3D point (4x1)

Camera Projection Arbitrary Camera Camera rotated with R and translated with T

Orthographic Projection Special case of perspective projection o Distance from center of projection to image plane is infinite o Also called “parallel projection” o What’s the projection matrix? Image World Slide by Steve Seitz

Projection properties Many-to-one: any points along same visual ray map to same point in image Points → points o But projection of points on focal plane is undefined Lines → lines (collinearity is preserved) o But lines through focal point (visual rays) project to a point Planes → planes (or half-planes) o But planes through focal point project to lines slide: S. Lazebnik

Vanishing points Each direction in space has its own vanishing point o All lines going in that direction converge at that point o Exception: directions parallel to the image plane slide: S. Lazebnik

Vanishing points Each direction in space has its own vanishing point o All lines going in that direction converge at that point o Exception: directions parallel to the image plane How do we construct the vanishing point of a line? image plane camera center line on ground plane vanishing point slide: S. Lazebnik

Facing Real Cameras There are undesired effects in real situations o perspective distortion

Perspective distortion Problem for architectural photography: converging verticals Where do they converge to? image source: F. Durand

Perspective distortion Problem for architectural photography: converging verticals Solution: view camera (lens shifted w.r.t. film) Source: F. Durand Tilting the camera upwards results in converging verticals Keeping the camera level, with an ordinary lens, captures only the bottom portion of the building Shifting the lens upwards results in a picture of the entire subject

Perspective distortion Problem for architectural photography: converging verticals Result: Source: F. Durand shifted lens tilted camera with regular lens

Perspective distortion image: Wikipedia Which image is captured with a shifted lens?

Perspective distortion What does a sphere project to? Image source: F. Durand

Perspective distortion What does a sphere project to? slide: S. Lazebnik

Perspective distortion The exterior columns appear bigger The distortion is not due to lens flaws Problem pointed out by Da Vinci Slide by F. Durand

Perspective distortion: People slide: S. Lazebnik

Facing Real Cameras There are undesired effects in real situations o perspective distortion Camera artifacts

Home-made pinhole camera Why so blurry? Slide by A. Efros

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

Shrinking the aperture

Facing Real Cameras There are undesired effects in real situations o perspective distortion Camera artifacts o aperture is not infinitely small

Adding a lens A lens focuses light onto the film o Thin lens model: Rays passing through the center are not deviated (pinhole projection model still holds) Slide by Steve Seitz

Adding a lens A lens focuses light onto the film o Thin lens model: Rays passing through the center are not deviated (pinhole projection model still holds) All parallel rays converge to one point on a plane located at the focal length f Slide by Steve Seitz focal point f

Adding a lens A lens focuses light onto the film o There is a specific distance at which objects are “in focus” other points project to a “circle of confusion” in the image “circle of confusion” Slide by Steve Seitz

Thin lens formula What is the relation between the focal length (f), the distance of the object from the optical center (D), and the distance at which the object will be in focus (D’)? f D D’ Slide by Frédo Durand object image plane lens

Thin lens formula f D D’ Similar triangles everywhere! Slide by Frédo Durand object image plane lens

Thin lens formula f D D’ Similar triangles everywhere! y’ y y’/y = D’/D Slide by Frédo Durand object image plane lens

Thin lens formula f D D’ Similar triangles everywhere! y’ y y’/y = D’/D y’/y = (D’-f)/f Slide by Frédo Durand object image plane lens

Thin lens formula f D D’ 1 D 11 f += Any point satisfying the thin lens equation is in focus. Slide by Frédo Durand object image plane lens

Real Lenses Zoom lens image: Simal

slide: S. Lazebnik Lens Flaws: Chromatic Aberration Lens has different refractive indices for different wavelengths: causes color fringing Near Lens Center Near Lens Outer Edge

Lens flaws: Spherical aberration Spherical lenses don’t focus light perfectly Rays farther from the optical axis focus closer slide: S. Lazebnik

Lens flaws: Vignetting slide: S. Lazebnik

No distortionPin cushionBarrel Radial Distortion o Caused by imperfect lenses o Deviations are most noticeable near the edge of the lens slide: S. Lazebnik

Radial Distortion Brown’s distortion model o accounts for radial distortion o accounts for tangential distortion (distortion caused by lens placement errors) typically K 1 is used or K 1, K 2, P 1, P 2 (x u, y u ) undistorted image point as in ideal pinhole camera (x d,y d ) distorted image point of camera with radial distortion (x c,y c ) distortion center K n n-th radial distortion coefficient P n n-th tangential distortion coefficient

Facing Real Cameras There are undesired effects in real situations o perspective distortion Camera artifacts o aperture is not infinitely small o lens o vignetting, radial distortion

Depth of Field Slide by A. Efros

How can we control the depth of field? Changing the aperture size affects depth of field o A smaller aperture increases the range in which the object is approximately in focus o But small aperture reduces amount of light – need to increase exposure Slide by A. Efros

F Number of the Camera f number (f-stop) ratio of focal length to aperture

Varying the aperture Large aperture = small DOFSmall aperture = large DOF Slide by A. Efros

Facing Real Cameras There are undesired effects in real situations o perspective distortion Camera artifacts o aperture is not infinitely small o lens o vignetting, radial distortion o depth of field

Field of View Slide by A. Efros What does FOV depend on?

f Field of View Smaller FOV = larger Focal Length Slide by A. Efros f FOV depends on focal length and size of the aperture

Field of View / Focal Length Large FOV, small f Camera close to car Small FOV, large f Camera far from the car Sources: A. Efros, F. Durand

Field of View / Focal Length

Same effect for faces standard wide-angletelephoto Source: F. Durand

The dolly zoom Continuously adjusting the focal length while the camera moves away from (or towards) the subject slide: S. Lazebnik

The Dolly Zoom