Single-view Metrology and Camera Calibration Computer Vision Derek Hoiem, University of Illinois 02/26/15 1.

Slides:



Advertisements
Similar presentations
Single-view geometry Odilon Redon, Cyclops, 1914.
Advertisements

Single-view Metrology and Camera Calibration
Computer Vision, Robert Pless
The Camera : Computational Photography Alexei Efros, CMU, Fall 2006.
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.
Photo Stitching Panoramas from Multiple Images Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/3/15.
Single-view metrology
Announcements. Projection Today’s Readings Nalwa 2.1.
Lecture 19: Single-view modeling CS6670: Computer Vision Noah Snavely.
Announcements Project 2 questions Midterm out on Thursday
Announcements Mailing list (you should have received messages) Project 1 additional test sequences online Talk today on “Lightfield photography” by Ren.
Projective geometry Slides from Steve Seitz and Daniel DeMenthon
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 20: Light, color, and reflectance CS6670: Computer Vision Noah Snavely.
Lecture 15: Single-view modeling CS6670: Computer Vision Noah Snavely.
Lecture 4a: Cameras CS6670: Computer Vision Noah Snavely Source: S. Lazebnik.
Panorama signups Panorama project issues? Nalwa handout Announcements.
Lecture 12: Projection CS4670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Lecture 16: Single-view modeling, Part 2 CS6670: Computer Vision Noah Snavely.
Single-view geometry Odilon Redon, Cyclops, 1914.
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.
CSE 576, Spring 2008Projective Geometry1 Lecture slides by Steve Seitz (mostly) Lecture presented by Rick Szeliski.
The Camera : Computational Photography Alexei Efros, CMU, Fall 2008.
Scene Modeling for a Single View : Computational Photography Alexei Efros, CMU, Spring 2010 René MAGRITTE Portrait d'Edward James …with a lot of.
Cameras, lenses, and calibration
Perspective projection
EEM 561 Machine Vision Week 10 :Image Formation and Cameras
Single-view Metrology and Cameras Computational Photography Derek Hoiem, University of Illinois 10/8/13.
Single-view metrology
Projective Geometry and Single View Modeling CSE 455, Winter 2010 January 29, 2010 Ames Room.
Single-view modeling, Part 2 CS4670/5670: Computer Vision Noah Snavely.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
Single-view 3D Reconstruction Computational Photography Derek Hoiem, University of Illinois 10/18/12 Some slides from Alyosha Efros, Steve Seitz.
776 Computer Vision Jan-Michael Frahm Fall Camera.
Recap from Wednesday Two strategies for realistic rendering capture real world data synthesize from bottom up Both have existed for 500 years. Both are.
Single-view Metrology and Camera Calibration Computer Vision Derek Hoiem, University of Illinois 01/25/11 1.
Project 2 –contact your partner to coordinate ASAP –more work than the last project (> 1 week) –you should have signed up for panorama kitssigned up –sign.
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 Metrology and Cameras Computational Photography Derek Hoiem, University of Illinois 10/06/15.
Last Two Lectures Panoramic Image Stitching
More with Pinhole + Single-view Metrology
Single-view geometry Odilon Redon, Cyclops, 1914.
Project 1 Due NOW Project 2 out today –Help session at end of class Announcements.
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.
Project 2 went out on Tuesday You should have a partner You should have signed up for a panorama kit Announcements.
Lecture 18: Cameras CS4670 / 5670: Computer Vision KavitaBala Source: S. Lazebnik.
CSE 185 Introduction to Computer Vision
Calibrating a single camera
Single-view metrology
CS5670: Computer Vision Lecture 9: Cameras Noah Snavely
Jan-Michael Frahm Fall 2016
The Camera : Computational Photography
Depth from disparity (x´,y´)=(x+D(x,y), y)
CS 790: Introduction to Computational Vision
Lecture 13: Cameras and geometry
The Camera : Computational Photography
Announcements Midterm out today Project 1 demos.
Projective geometry Readings
Projection Readings Nalwa 2.1.
Credit: CS231a, Stanford, Silvio Savarese
Projection Readings Szeliski 2.1.
Announcements Midterm out today Project 1 demos.
Announcements Project 2 extension: Friday, Feb 8
Presentation transcript:

Single-view Metrology and Camera Calibration Computer Vision Derek Hoiem, University of Illinois 02/26/15 1

Last Class: Pinhole Camera 2

Last Class: Projection Matrix OwOw iwiw kwkw jwjw t R 3

Last class: Vanishing Points Vanishing point Vanishing line Vanishing point Vertical vanishing point (at infinity) Slide from Efros, Photo from Criminisi 4

This class How can we calibrate the camera? How can we measure the size of objects in the world from an image? What about other camera properties: focal length, field of view, depth of field, aperture, f-number? 5

How to calibrate the camera? 6

Calibrating the Camera Method 1: Use an object (calibration grid) with known geometry – Correspond image points to 3d points – Get least squares solution (or non-linear solution) 7

Linear method Solve using linear least squares 8 Ax=0 form

Calibration with linear method Advantages – Easy to formulate and solve – Provides initialization for non-linear methods Disadvantages – Doesn’t directly give you camera parameters – Doesn’t model radial distortion – Can’t impose constraints, such as known focal length – Doesn’t minimize projection error Non-linear methods are preferred – Define error as difference between projected points and measured points – Minimize error using Newton’s method or other non-linear optimization 9 Can solve for explicit camera parameters:

Calibrating the Camera Method 2: Use vanishing points – Find vanishing points corresponding to orthogonal directions Vanishing point Vanishing line Vanishing point Vertical vanishing point (at infinity) 10

Calibration by orthogonal vanishing points Intrinsic camera matrix – Use orthogonality as a constraint – Model K with only f, u 0, v 0 What if you don’t have three finite vanishing points? – Two finite VP: solve f, get valid u 0, v 0 closest to image center – One finite VP: u 0, v 0 is at vanishing point; can’t solve for f For vanishing points 11

Calibration by vanishing points Intrinsic camera matrix Rotation matrix – Set directions of vanishing points e.g., X 1 = [1, 0, 0] – Each VP provides one column of R – Special properties of R inv(R)=R T Each row and column of R has unit length 12

How can we measure the size of 3D objects from an image? Slide by Steve Seitz 13

Perspective cues Slide by Steve Seitz 14

Perspective cues Slide by Steve Seitz 15

Perspective cues Slide by Steve Seitz 16

Ames Room 17

Comparing heights VanishingPoint Slide by Steve Seitz 18

Measuring height Camera height Slide by Steve Seitz 19

Which is higher – the camera or the man in the parachute? 20

C Measuring height without a ruler ground plane Compute Z from image measurements Z Slide by Steve Seitz 21

The cross ratio A Projective Invariant Something that does not change under projective transformations (including perspective projection) P1P1 P2P2 P3P3 P4P4 The cross-ratio of 4 collinear points Can permute the point ordering 4! = 24 different orders (but only 6 distinct values) This is the fundamental invariant of projective geometry Slide by Steve Seitz 22

vZvZ r t b image cross ratio Measuring height B (bottom of object) T (top of object) R (reference point) ground plane H C scene cross ratio  scene points represented as image points as R Slide by Steve Seitz 23

Measuring height RH vzvz r b t H b0b0 t0t0 v vxvx vyvy vanishing line (horizon) image cross ratio Slide by Steve Seitz 24

Measuring height vzvz r b t0t0 vxvx vyvy vanishing line (horizon) v t0t0 m0m0 What if the point on the ground plane b 0 is not known? Here the guy is standing on the box, height of box is known Use one side of the box to help find b 0 as shown above b0b0 t1t1 b1b1 Slide by Steve Seitz 25

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

Adding a lens 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”

Focal length, aperture, depth of field 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 focal point F optical center (Center Of Projection) Slide source: Seitz

The eye The human eye is a camera – Iris - colored annulus with radial muscles – Pupil (aperture) - the hole whose size is controlled by the iris – Retina (film): photoreceptor cells (rods and cones) Slide source: Seitz

Depth of field Changing the aperture size or focal length affects depth of field f / 5.6 f / 32 Flower images from Wikipedia Slide source: Seitz

Varying the aperture Large aperture = small DOFSmall aperture = large DOF 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) Film/Sensor Width Focal length

Dolly Zoom or “Vertigo Effect” Zoom in while moving away How is this done?

Review How tall is this woman? Which ball is closer? How high is the camera? What is the camera rotation? What is the focal length of the camera?

Next class Image stitching 37 Camera Center P Q