1 / 36

RANSAC and mosaic wrap-up

RANSAC and mosaic wrap-up. © Jeffrey Martin (jeffrey-martin.com). cs195g: Computational Photography James Hays, Brown, Spring 2010. most slides from Steve Seitz, Rick Szeliski , and Alexei A. Efros. Feature matching. ?. Feature matching. Exhaustive search

paulos
Download Presentation

RANSAC and mosaic wrap-up

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Feature matching ?

  3. Feature matching • Exhaustive search • 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

  4. What about outliers? ?

  5. 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?

  6. 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?

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

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

  9. RANdomSAmpleConsensus Select one match, count inliers

  10. RANdomSAmpleConsensus Select one match, count inliers

  11. Least squares fit Find “average” translation vector

  12. 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

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

  14. RANSAC

  15. Mosaic odds and ends

  16. mosaic PP Do we have to project onto a plane?

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

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

  19. Cylindrical Projection Y X

  20. (X,Y,Z) (sinq,h,cosq) Y Z X Inverse Cylindrical projection

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

  22. 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!

  23. Assembling the panorama • Stitch pairs together, blend, then crop

  24. Full-view (360°) panoramas

  25. top-down view Focal length – the dirty secret… f = 180 (pixels) Image 384x300 f = 380 f = 280 Cylindrical reprojection

  26. 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.

  27. Convert to spherical image coordinates spherical image Spherical projection • Map 3D point (X,Y,Z) onto sphere Y Z X • Convert to spherical coordinates f unwrapped sphere

  28. Spherical Projection Y X

  29. Inverse Spherical projection φ (x,y,z) cos φ sin φ (sinθcosφ,cosθcosφ,sinφ) Y Z cos θ cos φ X

  30. Rotate image before placing on unrolled sphere Y Z X 3D rotation φ (x,y,z) cos φ (sinθcosφ,cosθcosφ,sinφ) sin φ cos θ cos φ p = R p _ _ _ _

  31. Full-view Panorama + + + +

  32. Final Project

  33. Mainstream computational photography Photoshop CS5 was just released

  34. Mainstream computational photography Photoshop CS5 was just released Many new features directly related to this course image morphingimage mattingimage completionHDR – registration and tone mappingPainterly rendering

More Related