CS4670 / 5670: Computer Vision Kavita Bala Lecture 20: Panoramas.

Slides:



Advertisements
Similar presentations
Computer Vision, Robert Pless
Advertisements

RANSAC and mosaic wrap-up cs129: Computational Photography James Hays, Brown, Fall 2012 © Jeffrey Martin (jeffrey-martin.com) most slides from Steve Seitz,
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.
Mosaics con’t CSE 455, Winter 2010 February 10, 2010.
Lecture 11: Transformations CS4670/5760: Computer Vision Kavita Bala.
Computational Photography: Image Mosaicing Jinxiang Chai.
Lecture 14: Panoramas CS4670: Computer Vision Noah Snavely What’s inside your fridge?
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.
Lecture 8: Geometric transformations CS4670: Computer Vision Noah Snavely.
Direct Methods for Visual Scene Reconstruction Paper by Richard Szeliski & Sing Bing Kang Presented by Kristin Branson November 7, 2002.
Epipolar geometry. (i)Correspondence geometry: Given an image point x in the first view, how does this constrain the position of the corresponding point.
Lecture 7: Image Alignment and Panoramas CS6670: Computer Vision Noah Snavely What’s inside your fridge?
Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely.
Lecture 11: Structure from motion CS6670: Computer Vision Noah Snavely.
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,
CSCE 641 Computer Graphics: Image Mosaicing Jinxiang Chai.
Lecture 20: Two-view geometry CS6670: Computer Vision Noah Snavely.
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.
CS4670 / 5670: Computer Vision KavitaBala Lecture 15: Projection “The School of Athens,” Raphael.
Global Alignment and Structure from Motion Computer Vision CSE455, Winter 2008 Noah Snavely.
Announcements Project 1 artifact voting Project 2 out today (help session at end of class)
Lecture 12: Structure from motion CS6670: Computer Vision Noah Snavely.
Image Stitching Ali Farhadi CSEP 576 Several slides from Rick Szeliski, Steve Seitz, Derek Hoiem, and Ira Kemelmacher.
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.
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.
Lecture 12: Image alignment CS4670/5760: Computer Vision Kavita Bala
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.
CS4670 / 5670: Computer Vision KavitaBala Lecture 17: Panoramas.
CS-498 Computer Vision Week 7, Day 2 Camera Parameters Intrinsic Calibration  Linear  Radial Distortion (Extrinsic Calibration?) 1.
Mosaics part 3 CSE 455, Winter 2010 February 12, 2010.
Announcements No midterm Project 3 will be done in pairs same partners as for project 2.
Mosaics Today’s Readings Szeliski and Shum paper (sections 1 and 2, skim the rest) –
CS-498 Computer Vision Week 7, Day 2 Camera Parameters Intrinsic Calibration  Linear  Forward and backward projection 1.
Image Stitching Computer Vision CS 691E Some slides from Richard Szeliski.
Lecture 16: Image alignment
55:148 Digital Image Processing Chapter 11 3D Vision, Geometry
Prof. Adriana Kovashka University of Pittsburgh October 3, 2016
More Mosaic Madness © Jeffrey Martin (jeffrey-martin.com)
COSC579: Image Align, Mosaic, Stitch
RANSAC and mosaic wrap-up
Epipolar geometry.
More Mosaic Madness : Computational Photography
Image Stitching Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi.
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
Image Stitching Computer Vision CS 678
More Mosaic Madness © Jeffrey Martin (jeffrey-martin.com)
Announcements Project 1 Project 2 Vote for your favorite artifacts!
Announcements Project 1 artifact voting Project 2 out today
Calibration and homographies
Image Stitching Linda Shapiro ECE/CSE 576.
Image Stitching Linda Shapiro ECE P 596.
Presentation transcript:

CS4670 / 5670: Computer Vision Kavita Bala Lecture 20: Panoramas

Announcements Prelim on Thu Review on Tuesday Everything till Lecture 17 Closed book Bring your calculator 7:30 pm, Location Kennedy Hall, 116 Review on Tuesday 5-7pm, Olin 255

Mosaics How do we align the images?

Creating a panorama 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

Can we use homography to create a 360 panorama?

Idea: projecting images onto a common plane mosaic PP each image is warped with a homography

Geometric Interpretation of Mosaics Image 2 Optical Center Image 1 If we capture all 360º of rays, we can create a 360º panorama The basic operation is projecting an image from one plane to another The projective transformation is scene-INDEPENDENT This depends on all the images having the same optical center

Image reprojection Basic question Answer PP2 PP1 How to relate two images from the same camera center? how to map a pixel from PP1 to PP2 PP2 Answer Cast a ray through each pixel in PP1 Draw the pixel where that ray intersects PP2 PP1

Projection matrix intrinsics projection rotation translation

What is the transformation? Image k Optical Center Image j

Panoramas What if you want a 360 field of view? mosaic Projection Sphere

Spherical projection Map 3D point (X,Y,Z) onto sphere Convert to spherical coordinates Convert to spherical image coordinates unit sphere s defines size of the final image often convenient to set s = camera focal length in pixels unwrapped sphere Spherical image

Spherical reprojection input f = 200 (pixels) f = 400 f = 800 Therefore, it is desirable if the global motion model we need to recover is translation, which has only two parameters. It turns out that for a pure panning motion, if we convert two images to their cylindrical maps with known focal length, the relationship between them can be represented by a translation. Here is an example of how cylindrical maps are constructed with differently with f’s. Note how straight lines are curved. Similarly, we can map an image to its longitude/latitude spherical coordinates as well if f is given. Map image to spherical coordinates need to know the focal length

Aligning spherical images Therefore, it is desirable if the global motion model we need to recover is translation, which has only two parameters. It turns out that for a pure panning motion, if we convert two images to their cylindrical maps with known focal length, the relationship between them can be represented by a translation. Here is an example of how cylindrical maps are constructed with differently with f’s. Note how straight lines are curved. Similarly, we can map an image to its longitude/latitude spherical coordinates as well if f is given. Suppose we rotate the camera by  about the vertical axis How does this change the spherical image?

Aligning spherical images Therefore, it is desirable if the global motion model we need to recover is translation, which has only two parameters. It turns out that for a pure panning motion, if we convert two images to their cylindrical maps with known focal length, the relationship between them can be represented by a translation. Here is an example of how cylindrical maps are constructed with differently with f’s. Note how straight lines are curved. Similarly, we can map an image to its longitude/latitude spherical coordinates as well if f is given. Suppose we rotate the camera by  about the vertical axis How does this change the spherical image? Translation by  This means that we can align spherical images by translation

Assembling the panorama Stitch pairs together, blend, then crop

Problem: Drift Error accumulation small errors accumulate over time

Problem: Drift Solution add another copy of first image at the end (x1,y1) copy of first image (xn,yn) Solution add another copy of first image at the end this gives a constraint: yn = y1 there are a bunch of ways to solve this problem add displacement of (y1 – yn)/(n -1) to each image after the first apply an affine warp: y’ = y + ax [you will implement this for P3] run a big optimization problem, incorporating this constraint best solution, but more complicated known as “bundle adjustment”

Blending We’ve aligned the images – now what?

Blending Want to seamlessly blend them together

Image Blending

Feathering 1 + =

Effect of window size 1 1 left right Explain interpolation: linear, bilinear, trilinear left 1 right

Effect of window size 1 1

Good window size “Optimal” window: smooth but not ghosted 1 “Optimal” window: smooth but not ghosted Doesn’t always work...

What is the optimal size? To avoid seams Window >= size of largest prominent feature To avoid ghosting Window <= 2 * size of smallest prominent feature In Fourier domain Largest frequency <= 2 * size of smallest frequency