Homographies and Mosaics 15-463: Computational Photography Alexei Efros, CMU, Fall 2005 © Jeffrey Martin (jeffrey-martin.com) with a lot of slides stolen.

Slides:



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

More Mosaic Madness : Computational Photography Alexei Efros, CMU, Fall 2011 © Jeffrey Martin (jeffrey-martin.com) with a lot of slides stolen from.
RANSAC and mosaic wrap-up cs195g: Computational Photography James Hays, Brown, Spring 2010 © Jeffrey Martin (jeffrey-martin.com) most slides from Steve.
CSCE 641 Computer Graphics: Image Mosaicing Jinxiang Chai.
Image alignment Image from
Mosaics con’t CSE 455, Winter 2010 February 10, 2010.
Single-view metrology
Computational Photography: Image Mosaicing Jinxiang Chai.
Announcements Project 2 Out today Sign up for a panorama kit ASAP! –best slots (weekend) go quickly...
Geometry of Images Pinhole camera, projection A taste of projective geometry Two view geometry:  Homography  Epipolar geometry, the essential matrix.
Announcements Project 1 artifact voting ( announce later today) Project 2 out today (help session at end of class) IMPORTANT: choose Proj 2 partner.
Scene Modeling for a Single View : Computational Photography Alexei Efros, CMU, Fall 2005 René MAGRITTE Portrait d'Edward James …with a lot of slides.
Lecture 7: Image Alignment and Panoramas CS6670: Computer Vision Noah Snavely What’s inside your fridge?
Projective geometry Slides from Steve Seitz and Daniel DeMenthon
Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely.
Lecture 9: Image alignment CS4670: Computer Vision Noah Snavely
Image Stitching and Panoramas
Lecture 13: Projection, Part 2
Announcements Project 2 out today panorama signup help session at end of class Today mosaic recap blending.
Announcements Project 1 artifact voting Project 2 out today panorama signup help session at end of class Guest lectures next week: Li Zhang, Jiwon Kim.
1Jana Kosecka, CS 223b Cylindrical panoramas Cylindrical panoramas with some slides from R. Szeliski, S. Seitz, D. Lowe, A. Efros,
Lecture 6: Image Warping and Projection CS6670: Computer Vision Noah Snavely.
CSCE 641 Computer Graphics: Image Mosaicing Jinxiang Chai.
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.
Image Warping and Mosacing : Rendering and Image Processing Alexei Efros …with a lot of slides stolen from Steve Seitz and Rick Szeliski.
Announcements Project 1 Grading session this afternoon Artifacts due Friday (voting TBA) Project 2 out (online) Signup for panorama kits ASAP (weekend.
More Mosaic Madness : Computational Photography Alexei Efros, CMU, Fall 2006 © Jeffrey Martin (jeffrey-martin.com) with a lot of slides stolen from.
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.
Announcements Project 1 artifact voting Project 2 out today (help session at end of class)
Cameras, lenses, and calibration
Announcements Midterm due Friday, beginning of lecture Guest lecture on Friday: Antonio Criminisi, Microsoft Research.
Mosaics CSE 455, Winter 2010 February 8, 2010 Neel Joshi, CSE 455, Winter Announcements  The Midterm went out Friday  See to the class.
Single-view metrology
Automatic Camera Calibration
Image Stitching Ali Farhadi CSE 455
CSC 589 Lecture 22 Image Alignment and least square methods Bei Xiao American University April 13.
Last Lecture (optical center) origin principal point P (X,Y,Z) p (x,y) x y.
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
Mosaics Today’s Readings Szeliski, Ch 5.1, 8.1 StreetView.
Image stitching Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz, Matthew Brown and Vaclav Hlavac.
Metrology 1.Perspective distortion. 2.Depth is lost.
Feature Matching. Feature Space Outlier Rejection.
Digital Image Processing Additional Material : Imaging Geometry 11 September 2006 Digital Image Processing Additional Material : Imaging Geometry 11 September.
Project 1 Due NOW Project 2 out today –Help session at end of class Announcements.
Lecture 15: Transforms and Alignment CS4670/5670: Computer Vision Kavita Bala.
Homographies and Mosaics : Computational Photography Alexei Efros, CMU, Fall 2006 © Jeffrey Martin (jeffrey-martin.com) with a lot of slides stolen.
Single-view metrology
Prof. Adriana Kovashka University of Pittsburgh October 3, 2016
CS4670 / 5670: Computer Vision Kavita Bala Lecture 20: Panoramas.
More Mosaic Madness © Jeffrey Martin (jeffrey-martin.com)
COSC579: Image Align, Mosaic, Stitch
Scene Modeling for a Single View
Homogeneous Coordinates (Projective Space)
RANSAC and mosaic wrap-up
More Mosaic Madness : Computational Photography
Image Stitching Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi.
Overview Pin-hole model From 3D to 2D Camera projection
More Mosaic Madness © Jeffrey Martin (jeffrey-martin.com)
Lecture 3: Camera Rotations and Homographies
Idea: projecting images onto a common plane
Announcements Project 2 out today (help session at end of class)
More Mosaic Madness : Computational Photography
More Mosaic Madness © Jeffrey Martin (jeffrey-martin.com)
Announcements Project 1 artifact voting Project 2 out today
Computational Photography
Image Stitching Linda Shapiro ECE/CSE 576.
Image Stitching Linda Shapiro ECE P 596.
Presentation transcript:

Homographies and Mosaics : Computational Photography Alexei Efros, CMU, Fall 2005 © Jeffrey Martin (jeffrey-martin.com) with a lot of slides stolen from Steve Seitz and Rick Szeliski

Why Mosaic? Are you getting the whole picture? Compact Camera FOV = 50 x 35° Slide from Brown & Lowe

Why Mosaic? Are you getting the whole picture? Compact Camera FOV = 50 x 35° Human FOV = 200 x 135° Slide from Brown & Lowe

Why Mosaic? Are you getting the whole picture? Compact Camera FOV = 50 x 35° Human FOV = 200 x 135° Panoramic Mosaic = 360 x 180° Slide from Brown & Lowe

Mosaics: stitching images together virtual wide-angle camera

How to do it? Basic Procedure Take a sequence of images from the same position –Rotate the camera about its optical center Compute transformation between second image and first Transform the second image to overlap with the first Blend the two together to create a mosaic If there are more images, repeat …but wait, why should this work at all? What about the 3D geometry of the scene? Why aren’t we using it?

A pencil of rays contains all views real camera synthetic camera Can generate any synthetic camera view as long as it has the same center of projection!

Aligning images Translations are not enough to align the images left on topright on top

mosaic PP Image reprojection The mosaic has a natural interpretation in 3D The images are reprojected onto a common plane The mosaic is formed on this plane Mosaic is a synthetic wide-angle camera

Image reprojection Basic question How to relate two images from the same camera center? –how to map a pixel from PP1 to PP2 PP2 PP1 Answer Cast a ray through each pixel in PP1 Draw the pixel where that ray intersects PP2 But don’t we need to know the geometry of the two planes in respect to the eye? Observation: Rather than thinking of this as a 3D reprojection, think of it as a 2D image warp from one image to another

Back to Image Warping Translation 2 unknowns Affine 6 unknowns Perspective 8 unknowns Which t-form is the right one for warping PP1 into PP2? e.g. translation, Euclidean, affine, projective

Homography A: Projective – mapping between any two PPs with the same center of projection rectangle should map to arbitrary quadrilateral parallel lines aren’t but must preserve straight lines same as: project, rotate, reproject called Homography PP2 PP1 Hpp’ To apply a homography H Compute p’ = Hp (regular matrix multiply) Convert p’ from homogeneous to image coordinates

Image warping with homographies image plane in frontimage plane below black area where no pixel maps to

Image rectification To unwarp (rectify) an image Find the homography H given a set of p and p’ pairs How many correspondences are needed? Tricky to write H analytically, but we can solve for it! Find such H that “best” transforms points p into p’ Use least-squares! p p’

Least Squares Example Say we have a set of data points (X1,X1’), (X2,X2’), (X3,X3’), etc. (e.g. person’s height vs. weight) We want a nice compact formula (a line) to predict X’s from Xs: Xa + b = X’ We want to find a and b How many (X,X’) pairs do we need? What if the data is noisy? Ax=B overconstrained

Solving for homographies Can set scale factor i=1. So, there are 8 unkowns. Set up a system of linear equations: Ah = b where vector of unknowns h = [a,b,c,d,e,f,g,h] T Need at least 8 eqs, but the more the better… Solve for h. If overconstrained, solve using least-squares: Can be done in Matlab using “\” command see “help lmdivide” p’ = Hp

Fun with homographies St.Petersburg photo by A. Tikhonov Virtual camera rotations Original image

Panoramas 1.Pick one image (red) 2.Warp the other images towards it (usually, one by one) 3.blend

changing camera center Does it still work? synthetic PP PP1 PP2

Planar scene (or far away) PP3 is a projection plane of both centers of projection, so we are OK! This is how big aerial photographs are made PP1 PP3 PP2

Planar mosaic

Programming Project #3 Homographies and Panoramic Mosaics Capture photographs (and possibly video) can check out cameras and/or tripods from me (1 day loan) Compute homographies (define correspondences) will need to figure out how to setup system of eqs. (un)warp an image (undo perspective distortion) Produce 3 panoramic mosaics (with blending) Do some of the Bells and Whistles

Bells and Whistles Blending and Compositing use homographies to combine images or video and images together in an interesting (fun) way. E.g. –put fake graffiti on buildings or chalk drawings on the ground –replace a road sign with your own poster –project a movie onto a building wall –etc.

Bells and Whistles Capture creative/cool/bizzare panoramas Example from UW (by Brett Allen): Ever wondered what is happening inside your fridge while you are not looking? Capture a 360 panorama (next class)

Bells and Whistles Video Panorama Capture two (or more) stationary videos (either from the same point, or of a planar/far-away scene). Compute homography and produce a video mosaic. Need to worry about synchronization (not too hard). e.g. capturing a football game from the sides of the stadium Other interesting ideas? talk to me

From Last Year’s class Eunjeong Ryu (E.J), 2004 Ben Hollis, 2004 Matt Pucevich, 2004

Go Explore! Ken Chu, 2004