Image Stitching and Panoramas

Slides:



Advertisements
Similar presentations
Photo Stitching Panoramas from Multiple Images Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/28/12.
Advertisements

Computer Vision Optical Flow
Image alignment Image from
Mosaics con’t CSE 455, Winter 2010 February 10, 2010.
Stanford CS223B Computer Vision, Winter 2005 Lecture 11: Structure From Motion 2 Sebastian Thrun, Stanford Rick Szeliski, Microsoft Hendrik Dahlkamp and.
Announcements Project 2 Out today Sign up for a panorama kit ASAP! –best slots (weekend) go quickly...
Announcements Project 1 artifact voting ( announce later today) Project 2 out today (help session at end of class) IMPORTANT: choose Proj 2 partner.
Recognising Panoramas
Stanford CS223B Computer Vision, Winter 2007 Lecture 8 Structure From Motion Professors Sebastian Thrun and Jana Košecká CAs: Vaibhav Vaish and David Stavens.
Direct Methods for Visual Scene Reconstruction Paper by Richard Szeliski & Sing Bing Kang Presented by Kristin Branson November 7, 2002.
Homographies and Mosaics : Computational Photography Alexei Efros, CMU, Fall 2005 © Jeffrey Martin (jeffrey-martin.com) with a lot of slides stolen.
1Jana Kosecka, CS 223b Cylindrical panoramas Cylindrical panoramas.
Lecture 7: Image Alignment and Panoramas CS6670: Computer Vision Noah Snavely What’s inside your fridge?
Automatic Panoramic Image Stitching using Local Features Matthew Brown and David Lowe, University of British Columbia.
Uncalibrated Epipolar - Calibration
Lecture 11: Structure from motion CS6670: Computer Vision Noah Snavely.
Automatic Image Stitching using Invariant Features Matthew Brown and David Lowe, University of British Columbia.
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.
Sebastian Thrun and Jana Kosecha CS223B Computer Vision, Winter 2007 Stanford CS223B Computer Vision, Winter 2007 Lecture 4 Camera Calibration Professors.
1Jana Kosecka, CS 223b Cylindrical panoramas Cylindrical panoramas with some slides from R. Szeliski, S. Seitz, D. Lowe, A. Efros,
CSCE 641 Computer Graphics: Image Mosaicing Jinxiang Chai.
CS664 Lecture #19: Layers, RANSAC, panoramas, epipolar geometry Some material taken from:  David Lowe, UBC  Jiri Matas, CMP Prague
Panoramas and Calibration : 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.
Sebastian Thrun CS223B Computer Vision, Winter Stanford CS223B Computer Vision, Winter 2005 Lecture 3 Advanced Features Sebastian Thrun, Stanford.
Announcements Project 1 artifact voting Project 2 out today (help session at end of class)
55:148 Digital Image Processing Chapter 11 3D Vision, Geometry Topics: Basics of projective geometry Points and hyperplanes in projective space Homography.
Summary of Previous Lecture A homography transforms one 3d plane to another 3d plane, under perspective projections. Those planes can be camera imaging.
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.
Image Stitching Ali Farhadi CSE 455
Generating panorama using translational movement model.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
Image Stitching Shangliang Jiang Kate Harrison. What is image stitching?
Last Lecture (optical center) origin principal point P (X,Y,Z) p (x,y) x y.
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.
CS4670 / 5670: Computer Vision KavitaBala Lecture 17: Panoramas.
Reconnaissance d’objets et vision artificielle Jean Ponce Equipe-projet WILLOW ENS/INRIA/CNRS UMR 8548 Laboratoire.
Mosaics part 3 CSE 455, Winter 2010 February 12, 2010.
55:148 Digital Image Processing Chapter 11 3D Vision, Geometry Topics: Basics of projective geometry Points and hyperplanes in projective space Homography.
Last Two Lectures Panoramic Image Stitching
Image-Based Rendering Geometry and light interaction may be difficult and expensive to model –Think of how hard radiosity is –Imagine the complexity of.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
Lecture 22: Structure from motion CS6670: Computer Vision Noah Snavely.
Image Stitching Computer Vision CS 691E Some slides from Richard Szeliski.
Homographies and Mosaics : Computational Photography Alexei Efros, CMU, Fall 2006 © Jeffrey Martin (jeffrey-martin.com) with a lot of slides stolen.
776 Computer Vision Jan-Michael Frahm Spring 2012.
CS4670 / 5670: Computer Vision Kavita Bala Lecture 20: Panoramas.
CS 4501: Introduction to Computer Vision Sparse Feature Detectors: Harris Corner, Difference of Gaussian Connelly Barnes Slides from Jason Lawrence, Fei.
COSC579: Image Align, Mosaic, Stitch
RANSAC and mosaic wrap-up
© 2005 University of Wisconsin
More Mosaic Madness : Computational Photography
Image Stitching Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi.
Real-Time Image Mosaicing
Features Readings All is Vanity, by C. Allan Gilbert,
Overview Pin-hole model From 3D to 2D Camera projection
Idea: projecting images onto a common plane
Announcements Project 2 out today (help session at end of class)
More Mosaic Madness : Computational Photography
Image Stitching Computer Vision CS 678
Announcements Project 1 Project 2 Vote for your favorite artifacts!
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:

Image Stitching and Panoramas Vaibhav Vaish Stanford CS223B Computer Vision, Winter 2007 Professors Sebastian Thrun and Jana Kosecka

Why Panoramas ? Cartography: stitching aerial images to make maps Manhattan, 1949 Why Panoramas ? Cartography: stitching aerial images to make maps

Why Panoramas ? Virtual reality: a sense of being there Demo: Quicktime VR [Chen & Williams 95]

Why Panoramas ? Getting the whole picture [Brown 2003] Consumer camera: 50˚ x 35˚ [Brown 2003]

Why Panoramas ? Getting the whole picture [Brown 2003] Consumer camera: 50˚ x 35˚ Human Vision: 176˚ x 135˚ [Brown 2003]

Why Panoramas ? Getting the whole picture [Brown 2003] Consumer camera: 50˚ x 35˚ Human Vision: 176˚ x 135˚ Panoramic mosaics: up to 360˚ x 180˚ [Brown 2003]

The First Panoramas … Paris, c. 1845-50, photographer unknown San Francisco from Rincon Hill, 1851, by Martin Behrmanx

… and Panoramic Cameras Al-Vista, 1899 ($20) Chevallier, 1858

How they work Swing lens (1843 – 1980s)

How they work (using Computer Vision) Goal: Combine pixels from multiple images to compute a bigger image.

Today’s Agenda Single perspective panoramas Stitching software Acquiring the images Perspective warps (homographies) Stitching images Multi-band blending Stitching software Current research: computing photographs

Increasing the Field of View P Q Camera Center

Example Camera Center

Projection on to Common Image Plane What is required to project the image on to the desired plane ? Scaling ? Translation ? Rotation ? Affine transform ? Perspective projection ? Q Camera Center

Projection on to Common Image Plane The perspective projection depends on the camera intrinsics and rotation. P What is required to project the image on to the desired plane ? Scaling Translation Rotation Affine transform Perspective projection Q Camera Center

Why Rotation about Camera Center ? Perspective projection for stitching does not depend on depth of scene points (what does it depend on ?) There is no occlusion / disocclusion P Q Camera Center

Aligning Images How can we find the homographies required for stitching ? From calibration parameters Works, but these aren’t always known What’s the relation between corresponding points?

Perspective warps (Homographies) p1 ≈ K P P (X, Y, Z) (x, y) p1 Camera Center (0,0,0)

Perspective warps (Homographies) p1 ≈ K P p2 ≈ K R P P (X, Y, Z) p1 p2 (x’, y’) Camera Center (0,0,0)

Perspective warps (Homographies) Note that equality everywhere is defined up to a scale since we’re using homogeneous coordinates. p1 ≈ K P p2 ≈ K R P P K-1 p1 ≈ P p2 ≈ K R K-1 p1 3x3 Homography p1 p2 Camera Center (0,0,0)

Sebastian’s Counting Game How many unknowns are there in the perspective warp (homography matrix) ? 1 2 3 4 5 6 7 8 9 Place Your Bet!

Sebastian’s Counting Game How many unknowns are there in the perspective warp (homography matrix) ? Fixed intrinsics (square pixels): 6 Varying intrinsics (eg. autofocus): 8 1 2 3 4 5 6 7 8 9

Finding the homographies How can we find the homographies required for stitching ? From calibration parameters Works, but these aren’t always known By matching features across images

Finding the homographies How can we find the homographies required for stitching ? From calibration parameters Works, but these aren’t always known By matching features across images What features should we match ? How many ?

Finding the homographies What features do we match across images ? Pixel values ? Canny edges ? Harris Corners ? cvGoodFeaturesToTrack() ? SIFT features ? Hough lines ?

Finding the homographies What features do we match across images ? Pixel values Canny edges Harris Corners cvGoodFeaturesToTrack() SIFT features Hough lines

Homographies by Feature Matching p2 ≈ K R K-1 p1

Homographies by Feature Matching p2 ≈ K R K-1 p1 Two linear equations per matching feature

Sebastian’s Counting Game How many corresponding features do we need to compute the homography ? 1 2 3 4 5 6 7 8 n Place Your Bet!

Sebastian’s Counting Game How many corresponding features do we need to compute the homography ? Fixed intrinsics (square pixels): 3 Varying intrinsics (eg. autofocus): 4 1 2 3 4 5 6 7 8 n

Matching SIFT Features [Brown 2003]

Reject Outliers using RANSAC [Brown 2003]

Stitching Images via Homographies [Brown 2003]

Why do we get seams ? Differences in exposure Vignetting How can we remove seams ? Pixels on opposite sides of a seam come from different images that overlap. The seam is the result of an abrupt transition from one image to another. To reduce seams, we can use weighted averages of pixels from different images in the region of overlap. Differences in exposure Vignetting Small misalignments [Brown 2003]

Multi-band Blending [Burt and Adelson 1983] Multi-resolution technique using image pyramid Hides seams but preserves sharp detail [Brown 2003]

Panoramic Stitching Algorithm Here are the steps of the stitching algorithm we have discussed. You can implement this! What’s the time complexity ? Input: N images from camera rotating about center Find SIFT features in all images For adjacent images: Match features to get correspondences Eliminate outliers using RANSAC Solve for homography Project images on common “image plane” Blend overlapping images to obtain panorama Time complexity = O(N * RANSAC cost)

Do we have to project on to a plane ? Camera Center

Cylindrical Projection 360˚ Panorama [Szeliski & Shum 97] Camera Center

General Camera Motion P Can we still stitch using homographies ? B When the scene is flat (planar) When Z >> B B

Today’s Agenda Single perspective panoramas Stitching software Acquiring the images Perspective warps (homographies) Stitching images Multi-band blending Stitching software Current research: computing photographs

Autostitch Recognizing Panoramas. M. Brown, D. Lowe, in ICCV 2003. Searches collection of photos for sets which can be stitched together

Autostitch: Example Input: Output: [Brown 2003]

Autostitch Huge number of SIFT features to match Uses efficient approx. nearest-neighbour search O(n log n) where n = number of features Uses priors to accelerate RANSAC Handle full space of rotations Estimate camera intrinsics for each photo Bundle adjustment http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html

More Software Microsoft Digital Image Suite autopano-sift Co-developed by Matt Brown autopano-sift http://user.cs.tu-berlin.de/~nowozin/autopano-sift/ C# source for Linux and windows

Summary Rotate camera about center of projection Align images using homographies Determined by feature correspondence Stitch images and blend Project on to desired surface (cylinder, sphere, cube)

Limitations Lens distortion and vignetting Off-centered camera motion Moving objects Single perspective may not be enough! Let’s see how some of these could be tackled …

Today’s Agenda Single perspective panoramas Stitching software Acquiring the images Perspective warps (homographies) Stitching images Multi-band blending Stitching software Current research: computing photographs

Video Panoramas [Wilburn 2005] 12 × 8 array of VGA cameras 1:00 12 × 8 array of VGA cameras total field of view = 29° wide seamless stitching cameras individually metered [Wilburn 2005] Video Panorama: 7 Megapixels

Panoramic Video Textures Input Video: [Agarwala et al, 2005]

Panoramic Video Textures Output Video http://grail.cs.washington.edu/projects/panovidtex/ [Agarwala et al, 2005]

Multi-perspective Panoramas Input Video Space-time Scene Manifolds. Y. Wexler, D. Simakov In ICCV 2005

Multi-perspective Panoramas Space-time Scene Manifolds. Y. Wexler, D. Simakov In ICCV 2005

Multi-perspective Panoramas Input Video [Roman 2006]

Driving directions of the future ?

Loftier Goal: computing photographs Combine pixels from multiple images to compute a bigger image. Combine pixels from multiple images to compute a better image. Multiple viewpoints Multiple exposures …

Multi-perspective Panoramas Input Video [Roman 2006]