More with Pinhole + Single-view Metrology

Slides:



Advertisements
Similar presentations
Single-view Metrology and Camera Calibration
Advertisements

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.
Image formation and cameras CSE P 576 Larry Zitnick Many slides courtesy of Steve Seitz.
Photo Stitching Panoramas from Multiple Images Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/3/15.
Single-view metrology
Modeling Light : Rendering and Image Processing Alexei Efros.
Announcements. Projection Today’s Readings Nalwa 2.1.
Lecture 19: Single-view modeling CS6670: Computer Vision Noah Snavely.
Scene Modeling for a Single View : Computational Photography Alexei Efros, CMU, Fall 2005 René MAGRITTE Portrait d'Edward James …with a lot of slides.
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.
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.
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
Building a Real Camera.
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.
1 CS6825: Image Formation How are images created. How are images created.
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.
Single-view 3D Reconstruction Computational Photography Derek Hoiem, University of Illinois 10/12/10 Some slides from Alyosha Efros, Steve Seitz.
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.
Single-view 3D Reconstruction
Last Two Lectures Panoramic Image Stitching
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
Single-view metrology
CS5670: Computer Vision Lecture 9: Cameras Noah Snavely
Jan-Michael Frahm Fall 2016
The Camera : Computational Photography
CSCE 441 Computer Graphics 3-D Viewing
Scene Modeling for a Single View
Overview Pin-hole model From 3D to 2D Camera projection
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:

More with Pinhole + Single-view Metrology 10/07/10 Computational Photography Derek Hoiem, University of Illinois

By next Tuesday… Label your face

Last Class: Pinhole Camera Camera Center (tx, ty, tz) . f Z Y Optical Center (u0, v0) v u

Last Class: Projection Matrix jw t kw Ow iw

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

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? How to do “focus stacking” to get a sharp picture of a nearby object How the “vertigo effect” works

How to calibrate the camera?

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)

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

Take-home question 10/7/2010 Suppose you have estimated three vanishing points corresponding to orthogonal directions. How can you recover the rotation matrix that is aligned with the 3D axes defined by these points? Assume that intrinsic matrix K has three parameters Remember, in homogeneous coordinates, we can write a 3d point at infinity as (X, Y, Z, 0) VPy . VPx VPz Photo from online Tate collection

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

Perspective cues Slide by Steve Seitz

Perspective cues Slide by Steve Seitz

Perspective cues Slide by Steve Seitz

Ames Room

Slide by Steve Seitz Comparing heights Vanishing Point

Measuring height 5.4 5 4 3.3 3 2.8 2 1 Camera height Slide by Steve Seitz Measuring height 5.4 1 2 3 4 5 3.3 Camera height 2.8

Which is higher – the camera or the parachute?

Computing vanishing points (from lines) Least squares version Better to use more than two lines and compute the “closest” point of intersection See notes by Bob Collins for one good way of doing this: http://www-2.cs.cmu.edu/~ph/869/www/notes/vanishing.txt q2 q1 p2 p1 Intersect p1q1 with p2q2

Measuring height without a ruler Slide by Steve Seitz Measuring height without a ruler Z C ground plane Compute Z from image measurements Need more than vanishing points to do this

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

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

vanishing line (horizon) Measuring height Slide by Steve Seitz vz r vanishing line (horizon) t0 t H vx v vy H R b0 b image cross ratio

vanishing line (horizon) Measuring height Slide by Steve Seitz vz r t0 vanishing line (horizon) t0 b0 vx v vy m0 t1 b1 b What if the point on the ground plane b0 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 b0 as shown above

Take-home question Assume that the camera height is 5 ft. What is the height of the man? What is the height of the building? How long is the left side of the building, compared to the right side?

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

Adding a lens A lens focuses light onto the film “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 focal point optical center (Center Of Projection) 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 Note that the retina is curved 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 f-number (f/#) =focal_length / aperture_diameter (e.g., f/16 means that the focal length is 16 times the diameter) Flower images from Wikipedia http://en.wikipedia.org/wiki/Depth_of_field

Varying the aperture Large aperture = small DOF Slide from Efros Large aperture = small DOF Small aperture = large DOF

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

Difficulty in macro (close-up) photography For close objects, we have a small relative DOF Can only shrink aperture so far How to get both bugs in focus?

Solution: Focus stacking Take pictures with varying focal length Example from http://www.wonderfulphotos.com/articles/macro/focus_stacking/

Solution: Focus stacking Take pictures with varying focal length Combine

Focus stacking http://www.wonderfulphotos.com/articles/macro/focus_stacking/

Focus stacking How to combine? Web answer: With software (Photoshop, CombineZM) How to do it automatically?

Focus stacking How to combine? Align images (e.g., using corresponding points) Two ideas Mask regions by hand and combine with pyramid blend Gradient domain fusion (mixed gradient) without masking http://www.zen20934.zen.co.uk/photography/Workflow.htm#Focus%20Stacking

Relation between field of view and focal length Film/Sensor Width Field of view (angle 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

Dolly zoom (or “Vertigo effect”) http://www.youtube.com/watch?v=Y48R6-iIYHs Film/Sensor Width Field of view (angle width) Focal length width of object Distance between object and camera

Things to remember Can calibrate using grid or VP Can measure relative sizes using VP Effects of focal length, aperture + tricks 1 2 3 4 5

Next class Go over take-home questions from today, Tuesday Single-view 3D Reconstruction