Idea: projecting images onto a common plane

Slides:



Advertisements
Similar presentations
RANSAC and mosaic wrap-up cs129: Computational Photography James Hays, Brown, Fall 2012 © Jeffrey Martin (jeffrey-martin.com) most slides from Steve Seitz,
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.
Mosaics con’t CSE 455, Winter 2010 February 10, 2010.
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 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 22: Structure from motion CS6670: Computer Vision Noah Snavely.
Lecture 9: Image alignment CS4670: Computer Vision Noah Snavely
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 8: Image Alignment and RANSAC
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.
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.
Image Stitching II Ali Farhadi CSE 455
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.
Image Stitching Ali Farhadi CSE 455
CSC 589 Lecture 22 Image Alignment and least square methods Bei Xiao American University April 13.
High-Resolution Interactive Panoramas with MPEG-4 발표자 : 김영백 임베디드시스템연구실.
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.
Image Stitching Ali Farhadi CSE 576 Several slides from Rick Szeliski, Steve Seitz, Derek Hoiem, and Ira Kemelmacher.
CS4670 / 5670: Computer Vision KavitaBala Lecture 17: Panoramas.
Mosaics part 3 CSE 455, Winter 2010 February 12, 2010.
CS 534 Homework #4 References. Cylindrical Projection Alpha Blending.
Image Stitching II Linda Shapiro CSE 455. RANSAC for Homography Initial Matched Points.
Mosaics Today’s Readings Szeliski and Shum paper (sections 1 and 2, skim the rest) –
COS 429 PS3: Stitching a Panorama Due November 10 th.
Image Stitching Computer Vision CS 691E Some slides from Richard Szeliski.
Lecture 16: Image alignment
Image Stitching II Linda Shapiro EE/CSE 576.
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
Lecture 7: Image alignment
RANSAC and mosaic wrap-up
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
Announcements Project 2 out today (help session at end of class)
More Mosaic Madness : Computational Photography
Image Stitching II Linda Shapiro EE/CSE 576.
Image Stitching II Linda Shapiro CSE 455.
Image Stitching Computer Vision CS 678
Camera Calibration Coordinate change Translation P’ = P – O
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
Image Stitching II Linda Shapiro EE/CSE 576.
Calibration and homographies
CS 534 Homework #4 References
Image Stitching Linda Shapiro ECE/CSE 576.
CS Homework #4 References
Image Stitching II Linda Shapiro ECE P 596.
Image Stitching Linda Shapiro ECE P 596.
Presentation transcript:

Idea: projecting images onto a common plane mosaic PP each image is warped with a homography We’ll see what this homography means later. First -- Can’t create a 360 panorama this way…

Project 3 Take pictures on a tripod (or handheld) Warp to spherical coordinates (optional if using homographies to align images) Extract features Align neighboring pairs using RANSAC Write out list of neighboring translations Blend the images Correct for drift Now enjoy your masterpiece!

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

Modeling distortion To model lens distortion with panoramas Project to “normalized” image coordinates Apply radial distortion Apply focal length translate image center To model lens distortion with panoramas Use above projection operation after projecting onto a sphere

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

Solving for homographies 9 2n Defines a least squares problem: Since is only defined up to scale, solve for unit vector Solution: = eigenvector of with smallest eigenvalue Works with 4 or more matches (8 rows in A). How do you find these points?

Assembling the panorama Stitch pairs together, blend, then crop

Blending We’ve aligned the images – now what?

Image Blending

Feathering: Linear Interpolation 1 + =

Alpha Blending Encoding blend weights: I(x,y) = (R, G, B, ) Optional: see Blinn (CGA, 1994) for details: http://ieeexplore.ieee.org/iel1/38/7531/00310740.pdf?isNumber=7531&prod=JNL&arnumber=310740&arSt=83&ared=87&arAuthor=Blinn%2C+J.F. I2 Encoding blend weights: I(x,y) = (R, G, B, ) color at p = Implement this in two steps: 1. accumulate: add up the ( premultiplied) RGB values at each pixel 2. normalize: divide each pixel’s accumulated RGB by its  value Q: what if  = 0? A: render as black

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”

Demo