The Camera CS194: Image Manipulation & Computational Photography Alexei Efros, UC Berkeley, Fall 2014.

Slides:



Advertisements
Similar presentations
The Camera : Computational Photography Alexei Efros, CMU, Fall 2006.
Advertisements

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.
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.
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.
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.
Lecture 5: Cameras and Projection CS6670: Computer Vision Noah Snavely.
Computer Vision - A Modern Approach
CSCE641: Computer Graphics Image Formation Jinxiang Chai.
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 10: Cameras CS4670: Computer Vision Noah Snavely Source: S. Lazebnik.
Lecture 13: Projection, Part 2
Lecture 4a: Cameras CS6670: Computer Vision Noah Snavely Source: S. Lazebnik.
Lecture 12: Projection CS4670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Lecture 6: Image Warping and Projection CS6670: Computer Vision Noah Snavely.
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
Image formation and cameras
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.
Design of photographic lens Shinsaku Hiura Osaka University.
1 CS6825: Image Formation How are images created. How are images created.
776 Computer Vision Jan-Michael Frahm Fall Camera.
776 Computer Vision Jan-Michael Frahm Spring 2012.
CPSC 641: Computer Graphics Image Formation Jinxiang Chai.
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.
Ray Tracing Sang Il Park SEjong University With lots of slides stolen from Jehee Lee, Doug James, Steve Seitz, Shree Nayar, Alexei Efros, Fredo Durand.
Single-view Metrology and Camera Calibration Computer Vision Derek Hoiem, University of Illinois 01/25/11 1.
Computational Photography
Peripheral drift illusion. Multiple views Hartley and Zisserman Lowe stereo vision structure from motion optical flow.
Computational Photography Derek Hoiem, University of Illinois
Projection Readings Nalwa 2.1 Szeliski, Ch , 2.1
More with Pinhole + Single-view Metrology
Image Formation and Cameras CSE 455 Linda Shapiro 1.
Image Formation III Chapter 1 (Forsyth&Ponce) Cameras “Lenses” Guido Gerig CS-GY 6643, Spring 2016 (slides modified from Marc Pollefeys, UNC Chapel Hill/
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.
CSE 185 Introduction to Computer Vision
CS5670: Computer Vision Lecture 9: Cameras Noah Snavely
Jan-Michael Frahm Fall 2016
The Camera : Computational Photography
Announcements Project 1 Project 2
Announcements Project 1 Project 2 Due Wednesday at 11:59pm
CS 790: Introduction to Computational Vision
CS4670 / 5670: Computer Vision Lecture 12: Cameras Noah Snavely
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.
The Camera.
Presentation transcript:

The Camera CS194: Image Manipulation & Computational Photography Alexei Efros, UC Berkeley, Fall 2014

Image Formation Digital Camera The Eye Film

How do we see the world? Let’s design a camera Idea 1: put a piece of film in front of an object Do we get a reasonable image? Slide by Steve Seitz

Pinhole camera Add a barrier to block off most of the rays This reduces blurring The opening known as the aperture How does this transform the image? Slide by Steve Seitz

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 Slide by Steve Seitz

Figures © Stephen E. Palmer, D world2D image Dimensionality Reduction Machine (3D to 2D) But there is a problem…

Emission Theory of Vision “For every complex problem there is an answer that is clear, simple, and wrong.” -- H. L. Mencken Supported by: Empedocles Plato Euclid (kinda) Ptolemy … 50% of US college students* * Eyes send out “feeling rays” into the world

Figures © Stephen E. Palmer, 2002 How we see the world 3D world2D image

How we see the world 3D world2D image Painted backdrop

Fooling the eye

Making of 3D sidewalk art:

3D world2D image Dimensionality Reduction Machine (3D to 2D) Why did evolution opt for such strange solution? Nice to have a passive, long-range sensor Can get 3D with stereo or by moving around, plus experience

Figures © Stephen E. Palmer, 2002 Dimensionality Reduction Machine (3D to 2D) 3D world2D image What have we lost? Angles Distances (lengths)

Funny things happen…

Parallel lines aren’t… Figure by David Forsyth

Exciting New Study!

Lengths can’t be trusted... Figure by David Forsyth B’ C’ A’

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

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 – Slide by Steve Seitz

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: Slide by Steve Seitz

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 Slide by Steve Seitz

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 Slide by Steve Seitz

Orthographic Projection Special case of perspective projection Distance from the COP to the PP is infinite Also called “parallel projection” x’ = x y’ = y Image World Slide by Steve Seitz

Scaled Orthographic or “Weak Perspective”

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

Building a real camera

Camera Obscura: the pre-camera First Idea: Mo-Ti, China ( BC) First build: Al Hacen, Iraq/Egypt ( AD) Drawing aid for artists: described by Leonardo da Vinci ( ) Gemma Frisius, 1558 Camera Obscura near Cliff House

8-hour exposure (Abelardo Morell)

Pinhole cameras everywhere Tree shadow during a solar eclipse photo credit: Nils van der Burg Slide by Steve Seitz

Accidental pinhole cameras A. Torralba and W. Freeman, Accidental Pinhole and Pinspeck Cameras, CVPR 2012Accidental Pinhole and Pinspeck Cameras

Torralba and Freeman, CVPR’12

Pinspeck Camera: the anti-pinhole

Project 2: a Shoe-box Camera Obscura

Another way to make pinhole camera Why so blurry?

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

Shrinking the aperture

The reason for lenses Slide by Steve Seitz

Focus

Focus and Defocus 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 “circle of confusion” Slide by Steve Seitz

Thin lenses Thin lens equation: Any object point satisfying this equation is in focus What is the shape of the focus region? Thin lens applet: (by Fu-Kwun Hwang ) Slide by Steve Seitz

Varying Focus Ren Ng

Depth Of Field

Depth of Field

Aperture controls Depth of Field Changing the aperture size affects depth of field A smaller aperture increases the range in which the object is approximately in focus But small aperture reduces amount of light – need to increase exposure

F-number: focal length / aperture diameter

Varying the aperture Large apeture = small DOFSmall apeture = large DOF

Nice Depth of Field effect

Field of View (Zoom)

Field of View (Zoom) = Cropping

f FOV depends of Focal Length Smaller FOV = larger Focal Length f

Expensive toys…

From Zisserman & Hartley

Field of View / Focal Length Large FOV, small f Camera close to car Small FOV, large f Camera far from the car

Fun with Focal Length (Jim Sherwood)

Dolly Zoom (“Vertigo Shot”) 47-years-of-the-dolly-zoom/#.VBNtn_ldVac

Shutter Speed

Exposure: shutter speed vs. aperture

Fun with slow shutter speeds Photos by Fredo Durand

More fun

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