Automatic Panoramic Image Stitching. Dr. Matthew Brown, University of Bath

Similar documents
CSE 527: Introduction to Computer Vision

Image stitching. Digital Visual Effects Yung-Yu Chuang. with slides by Richard Szeliski, Steve Seitz, Matthew Brown and Vaclav Hlavac

Homographies and RANSAC

Instance-level recognition part 2

Today s lecture. Image Alignment and Stitching. Readings. Motion models

Image stitching. Announcements. Outline. Image stitching

Midterm Examination CS 534: Computational Photography

CS664 Lecture #19: Layers, RANSAC, panoramas, epipolar geometry

Mosaics. Today s Readings

Instance-level recognition

Image stitching. Digital Visual Effects Yung-Yu Chuang. with slides by Richard Szeliski, Steve Seitz, Matthew Brown and Vaclav Hlavac

Lecture 9: inverting the imaging process calibration, recovery of world position, mosaicing

Instance-level recognition

CS6670: Computer Vision

Image Stitching. Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi

Object Recognition with Invariant Features

Image-based Modeling and Rendering: 8. Image Transformation and Panorama

Image warping and stitching

Image correspondences and structure from motion

Image warping and stitching

Instance-level recognition II.

Feature Matching and RANSAC

EE795: Computer Vision and Intelligent Systems

Invariant Features from Interest Point Groups

Stereo and Epipolar geometry

Augmented Reality VU. Computer Vision 3D Registration (2) Prof. Vincent Lepetit

Epipolar Geometry CSE P576. Dr. Matthew Brown

55:148 Digital Image Processing Chapter 11 3D Vision, Geometry

arxiv: v1 [cs.cv] 28 Sep 2018

Panoramic Image Stitching

The SIFT (Scale Invariant Feature

Feature Based Registration - Image Alignment

CSE 252B: Computer Vision II

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

Agenda. Rotations. Camera calibration. Homography. Ransac

Stitching and Blending

Image Based Rendering. D.A. Forsyth, with slides from John Hart

Index. 3D reconstruction, point algorithm, point algorithm, point algorithm, point algorithm, 263

CSCI 5980/8980: Assignment #4. Fundamental Matrix

Chapter 3 Image Registration. Chapter 3 Image Registration

EE795: Computer Vision and Intelligent Systems

CS 231A Computer Vision (Winter 2014) Problem Set 3

Index. 3D reconstruction, point algorithm, point algorithm, point algorithm, point algorithm, 253

Instance-level recognition I. - Camera geometry and image alignment

E27 Computer Vision - Final Project: Creating Panoramas David Nahmias, Dan Spagnolo, Vincent Stigliani Professor Zucker Due 5/10/13

Local features: detection and description. Local invariant features

Pin Hole Cameras & Warp Functions

Announcements. Mosaics. Image Mosaics. How to do it? Basic Procedure Take a sequence of images from the same position =

CS4670: Computer Vision

Motion Estimation and Optical Flow Tracking

Computer Vision I - Appearance-based Matching and Projective Geometry

Local features and image matching. Prof. Xin Yang HUST

Local features: detection and description May 12 th, 2015

Local Feature Detectors

Image Features: Local Descriptors. Sanja Fidler CSC420: Intro to Image Understanding 1/ 58

Agenda. Rotations. Camera models. Camera calibration. Homographies

Improving Initial Estimations for Structure from Motion Methods

CHAPTER 3. Single-view Geometry. 1. Consequences of Projection

Feature-based methods for image matching

Pin Hole Cameras & Warp Functions

Step-by-Step Model Buidling

Image warping and stitching

Multi-modal Registration of Visual Data. Massimiliano Corsini Visual Computing Lab, ISTI - CNR - Italy

Camera Geometry II. COS 429 Princeton University

Computer Vision I - Appearance-based Matching and Projective Geometry

CS231A Midterm Review. Friday 5/6/2016

Compositing a bird's eye view mosaic

Map-Enhanced UAV Image Sequence Registration and Synchronization of Multiple Image Sequences

Introduction to Computer Vision

Midterm Wed. Local features: detection and description. Today. Last time. Local features: main components. Goal: interest operator repeatability

Application questions. Theoretical questions

Structure from Motion. Introduction to Computer Vision CSE 152 Lecture 10

A NEW FEATURE BASED IMAGE REGISTRATION ALGORITHM INTRODUCTION

N-Views (1) Homographies and Projection

CS 231A Computer Vision (Winter 2018) Problem Set 3

A New Representation for Video Inspection. Fabio Viola

CS 558: Computer Vision 4 th Set of Notes

Robust Geometry Estimation from two Images

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Selim Aksoy

Multiple-Choice Questionnaire Group C

More Mosaic Madness. CS194: Image Manipulation & Computational Photography. Steve Seitz and Rick Szeliski. Jeffrey Martin (jeffrey-martin.

Panoramas. Why Mosaic? Why Mosaic? Mosaics: stitching images together. Why Mosaic? Olivier Gondry. Bill Freeman Frédo Durand MIT - EECS

Motion Tracking and Event Understanding in Video Sequences

Computational Optical Imaging - Optique Numerique. -- Single and Multiple View Geometry, Stereo matching --

Local Features: Detection, Description & Matching

6.098 Digital and Computational Photography Advanced Computational Photography. Panoramas. Bill Freeman Frédo Durand MIT - EECS

Structure from motion

EECS 442 Computer vision. Fitting methods

An Image-Based System for Urban Navigation

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Local features and image matching May 8 th, 2018

Panoramic Image Mosaicing

3D Reconstruction of a Hopkins Landmark

Computational Optical Imaging - Optique Numerique. -- Multiple View Geometry and Stereo --

Automatic Image Alignment (feature-based)

arxiv: v1 [cs.cv] 28 Sep 2018

Methods for Representing and Recognizing 3D objects

Combining Appearance and Topology for Wide

Image Formation. Antonino Furnari. Image Processing Lab Dipartimento di Matematica e Informatica Università degli Studi di Catania

SURF applied in Panorama Image Stitching

Transcription:

Automatic Panoramic Image Stitching Dr. Matthew Brown, University of Bath

Automatic 2D Stitching The old days: panoramic stitchers were limited to a 1-D sweep 2005: 2-D stitchers use object recognition for discovery of overlaps 2

AutoStitch iphone Create gorgeous panoramic photos on your iphone - Cult of Mac Raises the bar on iphone panoramas - TUAW Magically combines the resulting shots - New York Times 3

4F12 class of 99 Projection 37 Case study Image mosaicing Any two images of a general scene with the same camera centre are related by a planar projective transformation given by: w = KRK 1 w where K represents the camera calibration matrix and R is the rotation between the views. This projective transformation is also known as the homography induced by the plane at infinity. A minimum of four image correspondences can be used to estimate the homography and to warp the images onto a common image plane. This is known as mosaicing. 4

Meanwhile in 1999... David Lowe publishes Scale Invariant Feature Transform 11,572 citations on Google scholar A breakthrough solution to the correspondence problem SIFT is capable of operating over much wider baselines than previous methods Figure 5: Examples of 3D object recognition with occlusion. Figure 4: Top row shows model images for 3D objects with outlines found by background segmentation. Bottom image shows recognition results for 3D objects with model outlines and image keys used for matching. 7. Experiments Figure 5: Examples o The affine solution provides a good approximation to perspective projection of planar objects, so planar models provide a good initial test of the approach. The top row of FigFigure 5: Examples of 3D object recognition with occlusion. ure 3 shows three model images of rectangular planar faces4: Top row shows model images for 3D objects with Figure of objects. The figure also shows a cluttered image outlines contain-found by background segmentation. Bottom image ing the planar objects, and the same image is shown overshows recognition results for 3D objects with model outlines 7. Experiments layed with the models following recognition. Theand model image keys used for matching. keys that are displayed are the ones used for recognition and 7. Experimen [ Lowe ICCV 1999 ] mined by solving the corresponding normal equations, The affine solution p spective projection of vide a good initial tes ure 3 shows three mo of objects. The figure 5

Local Feature Matching Given a point in the world... [ ]...compute a description of that point that can be easily found in other images 6

Scale Invariant Feature Transform 12 Lindeberg Start by detecting points of interest (blobs) original image scale-space maxima of ( 2norm L)2 (trace Hnorm L)2 (det Hnorm L)2 Find maxima of image Laplacian over scale and space 2I 2I L(I(x)) =. I = + x2 y 2 [ T. Lindeberg ] 7

Scale Invariant Feature Transform Describe local region by distribution (over angle) of gradients Each descriptor: 4 x 4 grid x 8 orientations = 128 dimensions 8

Scale Invariant Feature Transform Extract SIFT features from an image Each image might generate 100 s or 1000 s of SIFT descriptors [ A. Vedaldi ] 9

Feature Matching Goal: Find all correspondences between a pair of images? Extract and match all SIFT descriptors from both images [ A. Vedaldi ] 10

Feature Matching Each SIFT feature is represented by 128 numbers Feature matching becomes task of finding a nearby 128-d vector All nearest neighbours: j NN(j) = arg min i Solving this exactly is O(n 2 ), but good approximate algorithms exist e.g., [Beis, Lowe 97] Best-bin first k-d tree x i x j, i= j Construct a binary tree in 128-d, splitting on the coordinate dimensions Find approximate nearest neighbours by successively exploring nearby branches of the tree 11

2-view Rotational Geometry Feature matching returns a set of noisy correspondences To get further, we will have to understand something about the geometry of the setup 12

2-view Rotational Geometry Recall the projection equation for a pinhole camera ũ = K R t X ũ [u, v, 1] T X [X, Y, Z, 1] T K (3 3) R (3 3) t (3 1) : Homogeneous image position : Homogeneous world coordinates : Intrinsic (calibration) matrix : Rotation matrix : Translation vector 13

2-view Rotational Geometry Consider two cameras at the same position (translation) WLOG we can put the origin of coordinates there ũ 1 = K 1 [ R 1 t 1 ] X Set translation to 0 ũ 1 = K 1 [ R 1 0 ] X Remember X [X, Y, Z, 1] T so ũ 1 = K 1 R 1 X (where X =[X, Y, Z] T ) 14

2-view Rotational Geometry Add a second camera (same translation but different rotation and intrinsic matrix) Now eliminate X ũ 1 = K 1 R 1 X ũ 2 = K 2 R 2 X X = R T 1 K 1 1 ũ1 Substitute in equation 1 ũ 2 = K 2 R 2 R T 1 K 1 1 ũ1 This is a 3x3 matrix -- a (special form) of homography 15

Computing H: Quiz s u v = h 11 h 12 h 13 h 21 h 22 h 23 x y 1 h 31 h 32 h 33 1 Each correspondence between 2 images generates equations A homography has degrees of freedom point correspondences are needed to compute the homography Rearranging to make H the subject leads to an equation of the form This can be solved by Mh = 0 16

Finding Consistent Matches Raw SIFT correspondences (contains outliers) 17

Finding Consistent Matches SIFT matches consistent with a rotational homography 18

Finding Consistent Matches Warp images to common coordinate frame 19

RANSAC RAndom SAmple Consensus [Fischler-Bolles 81] Allows us to robustly estimate the best fitting homography despite noisy correspondences Basic principle: select the smallest random subset that can be used to compute H Calculate the support for this hypothesis, by counting the number of inliers to the transformation Repeat sampling, choosing H that maximises # inliers 20

RANSAC H = eye(3,3); nbest = 0; for (int i = 0; i < niterations; i++) { P4 = SelectRandomSubset(P); Hi = ComputeHomography(P4); ninliers = ComputeInliers(Hi); if (ninliers > nbest) { H = Hi; nbest = ninliers; } } 21

Recognising Panoramas [ Brown, Lowe ICCV 03 ] 22

Global Alignment The pairwise image relationships are given by homographies But over time multiple pairwise mappings will accumulate errors Notice: gap in panorama before it is closed... 23

Gap Closing 24

Bundle Adjustment 25

Bundle Adjustment Minimise sum of robustified residuals e(θ) = n p i=1 jv(i) f(u ij (Θ) m ij ) - u ij = projected position of point i in image j - m ij = measured position of point i in image j - V(i) = set of images where point i is visible - n p = # points/tracks (mutual feature matches across images) - = camera parameters Θ Robust error function (Huber) f(x) = x 2, 2σ x σ 2, x < σ x σ 26

Aerial Image Stitching [ Images: SenseFly, Zufferey, Beleyer EPFL] 27

Yellowstone Geysers [ B. Planar-Friedrich (U. Bayreuth) and Yellowstone National Park Service ] 28

Endoscope Imaging [ E. Seibel, J. Wong (U. Washington) ] 29

Other topics Blending/Gain compensation/hdr -- how to combine multiple images to give a consistent, seamless result Gravity direction estimate -- how do we know which way is up? Different projections -- rectilinear, spherical, cylindrical, fisheye... More details http://cs.bath.ac.uk/brown 30

iphone Computer Vision Apps Also good: Kooaba Déjà vu, Photosynth, Word Lens 31

Aardman, Disney, Double Negative, EA, Frontier, BBC, Buro Happold, Smoke and Mirrors... PhD and EngD positions starting September 2012 m.brown@bath.ac.uk 32