RANSAC and mosaic wrap-up

Slides:



Advertisements
Similar presentations
Summary of Friday A homography transforms one 3d plane to another 3d plane, under perspective projections. Those planes can be camera imaging planes or.
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.
Photo Stitching Panoramas from Multiple Images Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/28/12.
Image alignment Image from
CSCE 641 Computer Graphics: Image Mosaicing Jinxiang Chai.
Mosaics con’t CSE 455, Winter 2010 February 10, 2010.
Computational Photography: Image Mosaicing Jinxiang Chai.
Announcements Project 2 Out today Sign up for a panorama kit ASAP! –best slots (weekend) go quickly...
1Jana Kosecka, CS 223b Cylindrical panoramas Cylindrical panoramas.
Lecture 7: Image Alignment and Panoramas CS6670: Computer Vision Noah Snavely What’s inside your fridge?
Lecture 11: Structure from motion CS6670: Computer Vision Noah Snavely.
Image Stitching and Panoramas
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.
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.
More Mosaic Madness : Computational Photography Alexei Efros, CMU, Fall 2006 © Jeffrey Martin (jeffrey-martin.com) with a lot of slides stolen from.
Automatic Image Alignment (feature-based) : Computational Photography Alexei Efros, CMU, Fall 2006 with a lot of slides stolen from Steve Seitz and.
Lecture 10: Robust fitting CS4670: Computer Vision Noah Snavely.
Announcements Project 1 artifact voting Project 2 out today (help session at end of class)
Feature Matching and RANSAC : Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and Rick Szeliski.
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
Image Stitching Shangliang Jiang Kate Harrison. What is image stitching?
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.
Example: line fitting. n=2 Model fitting Measure distances.
CS4670 / 5670: Computer Vision KavitaBala Lecture 17: Panoramas.
Computer Vision : CISC 4/689 Going Back a little Cameras.ppt.
Mosaics part 3 CSE 455, Winter 2010 February 12, 2010.
Automatic Image Alignment : Computational Photography Alexei Efros, CMU, Fall 2011 with a lot of slides stolen from Steve Seitz and Rick Szeliski.
776 Computer Vision Jan-Michael Frahm Spring 2012.
Automatic Image Alignment with a lot of slides stolen from Steve Seitz and Rick Szeliski © Mike Nese CS194: Image Manipulation & Computational Photography.
Mosaics Today’s Readings Szeliski and Shum paper (sections 1 and 2, skim the rest) –
Summary of Monday A homography transforms one 3d plane to another 3d plane, under perspective projections. Those planes can be camera imaging planes or.
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.
Invariant Local Features Image content is transformed into local feature coordinates that are invariant to translation, rotation, scale, and other imaging.
776 Computer Vision Jan-Michael Frahm Spring 2012.
CS4670 / 5670: Computer Vision Kavita Bala Lecture 20: Panoramas.
More Mosaic Madness © Jeffrey Martin (jeffrey-martin.com)
CS 4501: Introduction to Computer Vision Sparse Feature Descriptors: SIFT, Model Fitting, Panorama Stitching. Connelly Barnes Slides from Jason Lawrence,
CS 4501: Introduction to Computer Vision Sparse Feature Detectors: Harris Corner, Difference of Gaussian Connelly Barnes Slides from Jason Lawrence, Fei.
Lecture 7: Image alignment
More Mosaic Madness : Computational Photography
A special case of calibration
Image Stitching Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi.
Features Readings All is Vanity, by C. Allan Gilbert,
Object recognition Prof. Graeme Bailey
More Mosaic Madness © Jeffrey Martin (jeffrey-martin.com)
Idea: projecting images onto a common plane
Announcements Project 2 out today (help session at end of class)
More Mosaic Madness : Computational Photography
Feature Matching and RANSAC
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
Computational Photography
Calibration and homographies
Back to equations of geometric transformations
CS5760: Computer Vision Lecture 9: RANSAC Noah Snavely
CS5760: Computer Vision Lecture 9: RANSAC Noah Snavely
Image Stitching Linda Shapiro ECE/CSE 576.
Image Stitching Linda Shapiro ECE P 596.
Presentation transcript:

RANSAC and mosaic wrap-up © Jeffrey Martin (jeffrey-martin.com) cs129: Computational Photography James Hays, Brown, Spring 2011 most slides from Steve Seitz, Rick Szeliski, and Alexei A. Efros

Feature matching ?

Feature matching Exhaustive search Hashing Nearest neighbor techniques for each feature in one image, look at all the other features in the other image(s) Hashing compute a short descriptor from each feature vector, or hash longer descriptors (randomly) Nearest neighbor techniques kd-trees and their variants

What about outliers? ?

Feature-space outlier rejection Let’s not match all features, but only these that have “similar enough” matches? How can we do it? SSD(patch1,patch2) < threshold How to set threshold?

Feature-space outlier rejection A better way [Lowe, 1999]: 1-NN: SSD of the closest match 2-NN: SSD of the second-closest match Look at how much better 1-NN is than 2-NN, e.g. 1-NN/2-NN That is, is our best match so much better than the rest?

Feature-space outliner rejection Can we now compute H from the blue points? No! Still too many outliers… What can we do?

What do we do about the “bad” matches? Matching features What do we do about the “bad” matches?

RANdom SAmple Consensus Select one match, count inliers

RANdom SAmple Consensus Select one match, count inliers

Find “average” translation vector Least squares fit Find “average” translation vector

RANSAC for estimating homography RANSAC loop: Select four feature pairs (at random) Compute homography H (exact) Compute inliers where SSD(pi’, H pi) < ε Keep largest set of inliers Re-compute least-squares H estimate on all of the inliers

RANSAC The key idea is not just that there are more inliers than outliers, but that the outliers are wrong in different ways.

RANSAC

Mosaic odds and ends

Do we have to project onto a plane? mosaic PP

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

Cylindrical projection Map 3D point (X,Y,Z) onto cylinder X Y Z unwrapped cylinder Convert to cylindrical coordinates cylindrical image Convert to cylindrical image coordinates unit cylinder

Cylindrical Projection X

Cylindrical panoramas Steps Reproject each image onto a cylinder Blend Output the resulting mosaic

Cylindrical image stitching What if you don’t know the camera rotation? Solve for the camera rotations Note that a rotation of the camera is a translation of the cylinder!

Assembling the panorama Stitch pairs together, blend, then crop

Problem: Drift Vertical Error accumulation small (vertical) errors accumulate over time apply correction so that sum = 0 (for 360° pan.) Horizontal Error accumulation can reuse first/last image to find the right panorama radius

Full-view (360°) panoramas

Cylindrical reprojection Focal length – the dirty secret… Image 384x300 top-down view f = 180 (pixels) f = 280 f = 380 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.

What’s your focal length, buddy? Focal length is (highly!) camera dependant Can get a rough estimate by measuring FOV: Can use the EXIF data tag (might not give the right thing) Can use several images together and try to find f that would make them match Can use a known 3D object and its projection to solve for f Etc. There are other camera parameters too: Optical center, non-square pixels, lens distortion, etc.