Image Stitching Tamara Berg CSE 590 Computational Photography Many slides from Alyosha Efros & Derek Hoiem.

Slides:



Advertisements
Similar presentations
The SIFT (Scale Invariant Feature Transform) Detector and Descriptor
Advertisements

Feature Matching and Robust Fitting Computer Vision CS 143, Brown James Hays Acknowledgment: Many slides from Derek Hoiem and Grauman&Leibe 2008 AAAI Tutorial.
Computer Vision CS 143, Brown James Hays
TP14 - Local features: detection and description Computer Vision, FCUP, 2014 Miguel Coimbra Slides by Prof. Kristen Grauman.
Photo Stitching Panoramas from Multiple Images Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/28/12.
Computational Photography
Locating and Describing Interest Points
1 Interest Operators Find “interesting” pieces of the image –e.g. corners, salient regions –Focus attention of algorithms –Speed up computation Many possible.
Object Recognition with Invariant Features n Definition: Identify objects or scenes and determine their pose and model parameters n Applications l Industrial.
Recognising Panoramas
1 Interest Operator Lectures lecture topics –Interest points 1 (Linda) interest points, descriptors, Harris corners, correlation matching –Interest points.
Automatic Panoramic Image Stitching using Local Features Matthew Brown and David Lowe, University of British Columbia.
Automatic Image Alignment (feature-based) : Computational Photography Alexei Efros, CMU, Fall 2005 with a lot of slides stolen from Steve Seitz and.
Distinctive Image Feature from Scale-Invariant KeyPoints
Interest Points and Corners Computer Vision CS 143, Brown James Hays Slides from Rick Szeliski, Svetlana Lazebnik, Derek Hoiem and Grauman&Leibe 2008 AAAI.
Automatic Image Alignment (feature-based) : Computational Photography Alexei Efros, CMU, Fall 2006 with a lot of slides stolen from Steve Seitz and.
CS4670: Computer Vision Kavita Bala Lecture 8: Scale invariance.
Computational Photography lecture 14 – Matching Keypoints CS 590 Spring 2014 Prof. Alex Berg (Credits to many other folks on individual slides)
Overview Introduction to local features
Image Stitching Ali Farhadi CSE 455
Interest Points Computational Photography Derek Hoiem, University of Illinois 10/14/10 Galatea of the Spheres Salvador Dali.
Locating and Describing Interest Points Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 03/02/10 Acknowledgment: Many keypoint slides.
Prof. Alex Berg (Credits to many other folks on individual slides)
Overview Harris interest points Comparing interest points (SSD, ZNCC, SIFT) Scale & affine invariant interest points Evaluation and comparison of different.
Photo by Carl Warner. Feature Matching and Robust Fitting Computer Vision James Hays Acknowledgment: Many slides from Derek Hoiem and Grauman&Leibe.
Interest Points Computational Photography Derek Hoiem, University of Illinois 10/24/13 Galatea of the Spheres Salvador Dali.
CSE 185 Introduction to Computer Vision Local Invariant Features.
CS 1699: Intro to Computer Vision Local Image Features: Extraction and Description Prof. Adriana Kovashka University of Pittsburgh September 17, 2015.
Computer Vision 776 Jan-Michael Frahm 12/05/2011 Many slides from Derek Hoiem, James Hays.
Lecture 7: Features Part 2 CS4670/5670: Computer Vision Noah Snavely.
10/19/10 Image Stitching Computational Photography Derek Hoiem, University of Illinois Photos by Russ Hewett.
10/29/13 Image Stitching Computational Photography Derek Hoiem, University of Illinois Photos by Russ Hewett.
Overview Introduction to local features Harris interest points + SSD, ZNCC, SIFT Scale & affine invariant interest point detectors Evaluation and comparison.
10/27/15 Image Stitching Computational Photography Derek Hoiem, University of Illinois Photos by Russ Hewett.
Image Stitching Computational Photography
CSE 185 Introduction to Computer Vision Feature Matching.
Project 3 questions? Interest Points and Instance Recognition Computer Vision CS 143, Brown James Hays 10/21/11 Many slides from Kristen Grauman and.
Local features: detection and description
CS654: Digital Image Analysis
10/28/14 Image Stitching Computational Photography Derek Hoiem, University of Illinois Photos by Russ Hewett.
Presented by David Lee 3/20/2006
Interest Points Computational Photography Derek Hoiem, University of Illinois 10/23/12 Galatea of the Spheres Salvador Dali.
776 Computer Vision Jan-Michael Frahm Spring 2012.
CS 2750: Machine Learning Bias-Variance Trade-off (cont’d) + Image Representations Prof. Adriana Kovashka University of Pittsburgh January 20, 2016.
CSE 185 Introduction to Computer Vision Local Invariant Features.
COS 429 PS3: Stitching a Panorama Due November 10 th.
CSCI 631 – Foundations of Computer Vision March 15, 2016 Ashwini Imran Image Stitching.
CSCI 631 – Foundations of Computer Vision March 15, 2016 Ashwini Imran Image Stitching Link: singhashwini.mesinghashwini.me.
776 Computer Vision Jan-Michael Frahm Spring 2012.
SIFT Scale-Invariant Feature Transform David Lowe
Interest Points EE/CSE 576 Linda Shapiro.
Presented by David Lee 3/20/2006
Lecture 07 13/12/2011 Shai Avidan הבהרה: החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
CS 4501: Introduction to Computer Vision Sparse Feature Detectors: Harris Corner, Difference of Gaussian Connelly Barnes Slides from Jason Lawrence, Fei.
Local features: main components
Project 1: hybrid images
Corners and interest points
TP12 - Local features: detection and description
Source: D. Lowe, L. Fei-Fei Recap: edge detection Source: D. Lowe, L. Fei-Fei.
Image Stitching Computational Photography
Local features: detection and description May 11th, 2017
Feature description and matching
Image Stitching Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi.
CSE 455 – Guest Lectures 3 lectures Contact Interest points 1
CSE 185 Introduction to Computer Vision
Computational Photography
Feature descriptors and matching
Presented by Xu Miao April 20, 2005
Presentation transcript:

Image Stitching Tamara Berg CSE 590 Computational Photography Many slides from Alyosha Efros & Derek Hoiem

How can we align two pictures? What about global matching?

How can we align two pictures? Global matching? – But what if Not just translation change, but rotation and scale? Only small pieces of the pictures match?

Keypoint Matching K. Grauman, B. Leibe B1B1 B2B2 B3B3 A1A1 A2A2 A3A3 1. Find a set of distinctive key- points 3. Extract and normalize the region content 2. Define a region around each keypoint 4. Compute a local descriptor from the normalized region 5. Match local descriptors

Main challenges Change in position, scale, and rotation Change in viewpoint Occlusion Articulation, change in appearance

Question Why not just take every patch in the original image and find best match in second image?

Goals for Keypoints Detect points that are repeatable and distinctive

Key trade-offs More Points More Repeatable B1B1 B2B2 B3B3 A1A1 A2A2 A3A3 Localization More Robust More Selective Description Robust to occlusion Works with less texture Robust detection Precise localization Deal with expected variations Maximize correct matches Minimize wrong matches

Keypoint Localization Goals: –Repeatable detection –Precise localization K. Grauman, B. Leibe

Which patches are easier to match? ?

Choosing interest points If you wanted to meet a friend would you say a)“Let’s meet on campus.” b)“Let’s meet on Green street.” c)“Let’s meet at Green and Wright.” Or if you were in a secluded area: a)“Let’s meet in the Plains of Akbar.” b)“Let’s meet on the side of Mt. Doom.” c)“Let’s meet on top of Mt. Doom.”

Choosing interest points Corners – “Let’s meet at Green and Wright.” Peaks/Valleys – “Let’s meet on top of Mt. Doom.”

Many Existing Detectors Available K. Grauman, B. Leibe Hessian & Harris [Beaudet ‘78], [Harris ‘88] Laplacian, DoG [Lindeberg ‘98], [Lowe 1999] Harris-/Hessian-Laplace [Mikolajczyk & Schmid ‘01] Harris-/Hessian-Affine [Mikolajczyk & Schmid ‘04] EBR and IBR [Tuytelaars & Van Gool ‘04] MSER [Matas ‘02] Salient Regions [Kadir & Brady ‘01] Others…

Harris Detector [ Harris88 ] K. Grauman, B. Leibe Intuition: Search for local neighborhoods where the image content has two main directions.

Harris Detector – Responses [ Harris88 ] Effect: A very precise corner detector.

Harris Detector – Responses [ Harris88 ]

So far: can localize in x-y, but not scale

Automatic Scale Selection K. Grauman, B. Leibe How to find corresponding patch sizes?

Automatic Scale Selection Function responses for increasing scale (scale signature) K. Grauman, B. Leibe

Automatic Scale Selection K. Grauman, B. Leibe Function responses for increasing scale (scale signature)

Automatic Scale Selection K. Grauman, B. Leibe Function responses for increasing scale (scale signature)

Automatic Scale Selection K. Grauman, B. Leibe Function responses for increasing scale (scale signature)

Automatic Scale Selection K. Grauman, B. Leibe Function responses for increasing scale (scale signature)

Automatic Scale Selection K. Grauman, B. Leibe Function responses for increasing scale (scale signature)

What Is A Useful Signature Function? Difference of Gaussian = “blob” detector K. Grauman, B. Leibe

DoG – Efficient Computation Computation in Gaussian scale pyramid K. Grauman, B. Leibe  Original image Sampling with step    =2   

Results: Lowe’s DoG K. Grauman, B. Leibe

T. Tuytelaars, B. Leibe Orientation Normalization Compute orientation histogram Select dominant orientation Normalize: rotate to fixed orientation 0 2  [Lowe, SIFT, 1999]

Available at a web site near you… For most local feature detectors, executables are available online: – – – K. Grauman, B. Leibe

How do we describe the keypoint?

Local Descriptors The ideal descriptor should be – Robust – Distinctive – Compact – Efficient Most available descriptors focus on edge/gradient information – Capture texture information – Color rarely used K. Grauman, B. Leibe

Local Descriptors: SIFT Descriptor [Lowe, ICCV 1999] Histogram of oriented gradients Captures important texture information Robust to small translations / affine deformations K. Grauman, B. Leibe

What to use when? Detectors Harris gives very precise localization but doesn’t predict scale – Good for some tracking applications DOG (difference of Gaussian) provides ok localization and scale – Good for multi-scale or long-range matching Descriptors SIFT: good general purpose descriptor

Things to remember Keypoint detection: repeatable and distinctive – Corners, blobs – Harris, DoG Descriptors: robust and selective – SIFT: spatial histograms of gradient orientation

Image Stitching Combine two or more overlapping images to make one larger image Add example Slide credit: Vaibhav VaishVaibhav Vaish

Panoramic Imaging Higher resolution photographs, stitched from multiple images Capture scenes that cannot be captured in one frame Cheaply and easily achieve effects that used to cost a lot of money

Photo: Russell J. Hewett Pike’s Peak Highway, CO Nikon D70s, Tokina 16mm, f/22, 1/40s

Photo: Russell J. Hewett Pike’s Peak Highway, CO (See Photo On Web)See Photo On Web

Photo: Russell J. Hewett 360 Degrees, Tripod Leveled Nikon D70, Tokina 12mm, f/8, 1/125s

Photo: Russell J. Hewett Howth, Ireland (See Photo On Web)See Photo On Web

Capturing Panoramic Images Tripod vs Handheld Help from modern cameras Leveling tripod Or wing it Exposure Consistent exposure between frames Gives smooth transitions Manual exposure Caution Distortion in lens (Pin Cushion, Barrel, and Fisheye) Motion in scene Image Sequence Requires a reasonable amount of overlap (at least 15-30%) Enough to overcome lens distortion

Photo: Russell J. Hewett Handheld Camera Nikon D70s, Nikon 70mm, f/6.3, 1/200s

Photo: Russell J. Hewett Handheld Camera

Photo: Russell J. Hewett Les Diablerets, Switzerland (See Photo On Web)See Photo On Web

Photo: Russell J. Hewett & Bowen Lee Macro Nikon D70s, Tamron 90mm 90mm, f/10, 15s

Photo: Russell J. Hewett & Bowen Lee Side of Laptop

Photo: Russell J. Hewett Ghosting and Variable Intensity Nikon D70s, Tokina 12mm, f/8, 1/400s

Photo: Russell J. Hewett

Photo: Bowen Lee Ghosting From Motion Nikon e4100 P&S

Photo: Russell J. Hewett Nikon D70, Nikon 135mm, f/11, 1/320s Motion Between Frames

Photo: Russell J. Hewett

Gibson City, IL (See Photo On Web)See Photo On Web

Photo: Russell J. Hewett Mount Blanca, CO Nikon D70s, Tokina 12mm, f/22, 1/50s

Photo: Russell J. Hewett Mount Blanca, CO (See Photo On Web)See Photo On Web

Image Stitching Algorithm Overview 1.Detect keypoints 2.Match keypoints 3.Estimate homography with matched keypoints (using RANSAC) 4.Project onto a surface and blend

Image Stitching Algorithm Overview 1.Detect keypoints (e.g., SIFT) 2.Match keypoints

Computing homography If we have 4 matched points we can compute homography H

Computing homography Assume we have matched points with outliers: How do we compute homography H? Automatic Homography Estimation with RANSAC

RANSAC: RANdom SAmple Consensus Scenario: We’ve got way more matched points than needed to fit the parameters, but we’re not sure which are correct RANSAC Algorithm Repeat N times 1.Randomly select a sample – Select just enough points to recover the parameters (4) 2.Fit the model with random sample 3.See how many other points agree Best estimate is one with most agreement – can use agreeing points to refine estimate

Automatic Image Stitching 1.Compute interest points on each image 2.Find candidate matches 3.Estimate homography H using matched points and RANSAC 4.Project each image onto the same surface and blend

RANSAC for Homography Initial Detected Points

RANSAC for Homography Final Matched Points

RANSAC for Homography

Blending to remove artifacts Burt & Adelson 1983

Further reading Harley and Zisserman: Multi-view Geometry book DLT algorithm: HZ p. 91 (alg 4.2), p. 585 Normalization: HZ p (alg 4.2) RANSAC: HZ Sec 4.7, p. 123, alg 4.6 Tutorial: -tutorial/tut_4up.pdf -tutorial/tut_4up.pdf Recognising Panoramas: Brown and Lowe, IJCV 2007 Recognising Panoramas