Homographies and Panoramas. Slides from Steve Seitz, Rick Szeliski, Alexei Efros, Fredo Durand, and Kristin Grauman

Similar documents
Geometric Camera Parameters

2-View Geometry. Mark Fiala Ryerson University

Lecture 2: Homogeneous Coordinates, Lines and Conics

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

Lecture 12: Cameras and Geometry. CAP 5415 Fall 2010

Feature Tracking and Optical Flow

521493S Computer Graphics. Exercise 2 & course schedule change

Build Panoramas on Android Phones

Latest Results on High-Resolution Reconstruction from Video Sequences

Essential Mathematics for Computer Graphics fast

Transformations in the pipeline

Bildverarbeitung und Mustererkennung Image Processing and Pattern Recognition

Summary: Transformations. Lecture 14 Parameter Estimation Readings T&V Sec Parameter Estimation: Fitting Geometric Models

Relating Vanishing Points to Catadioptric Camera Calibration

2D Geometric Transformations

Announcements. Active stereo with structured light. Project structured light patterns onto the object

Epipolar Geometry. Readings: See Sections 10.1 and 15.6 of Forsyth and Ponce. Right Image. Left Image. e(p ) Epipolar Lines. e(q ) q R.

2. SPATIAL TRANSFORMATIONS

Geometric Optics Converging Lenses and Mirrors Physics Lab IV

Solving Simultaneous Equations and Matrices

Wii Remote Calibration Using the Sensor Bar

Mathematical goals. Starting points. Materials required. Time needed

Geometric Transformation CS 211A

Chapter 19. General Matrices. An n m matrix is an array. a 11 a 12 a 1m a 21 a 22 a 2m A = a n1 a n2 a nm. The matrix A has n row vectors

INTRODUCTION TO RENDERING TECHNIQUES

Metric Measurements on a Plane from a Single Image

Section Continued

3D Scanner using Line Laser. 1. Introduction. 2. Theory

Lecture 2: Geometric Image Transformations

How To Fuse A Point Cloud With A Laser And Image Data From A Pointcloud

CS 4204 Computer Graphics

The Geometry of Perspective Projection

Geometry: Unit 1 Vocabulary TERM DEFINITION GEOMETRIC FIGURE. Cannot be defined by using other figures.

Projective Geometry. Projective Geometry

Simultaneous Gamma Correction and Registration in the Frequency Domain

1 Review of Least Squares Solutions to Overdetermined Systems

3D Model based Object Class Detection in An Arbitrary View

Projection Center Calibration for a Co-located Projector Camera System

Equations Involving Lines and Planes Standard equations for lines in space

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch.

CAMI Education linked to CAPS: Mathematics

A System for Capturing High Resolution Images

2.1. Inductive Reasoning EXAMPLE A

CS635 Spring Department of Computer Science Purdue University

Vector Notation: AB represents the vector from point A to point B on a graph. The vector can be computed by B A.

Ultra-High Resolution Digital Mosaics

Solution Guide III-C. 3D Vision. Building Vision for Business. MVTec Software GmbH

Perspective and Space

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

3D Tranformations. CS 4620 Lecture 6. Cornell CS4620 Fall 2013 Lecture Steve Marschner (with previous instructors James/Bala)

Systems of Linear Equations

BUILDING TELEPRESENCE SYSTEMS: Translating Science Fiction Ideas into Reality

Solving Systems of Linear Equations

is in plane V. However, it may be more convenient to introduce a plane coordinate system in V.

2D Geometrical Transformations. Foley & Van Dam, Chapter 5

Charlesworth School Year Group Maths Targets

Thin Lenses Drawing Ray Diagrams

Section 1: How will you be tested? This section will give you information about the different types of examination papers that are available.

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

LINES AND PLANES CHRIS JOHNSON

Grade 8 Mathematics Geometry: Lesson 2

Making Stereo Cards With StereoPhoto Maker

Lecture 7. Matthew T. Mason. Mechanics of Manipulation. Lecture 7. Representing Rotation. Kinematic representation: goals, overview

B4 Computational Geometry

MATH2210 Notebook 1 Fall Semester 2016/ MATH2210 Notebook Solving Systems of Linear Equations... 3

Lecture 14: Section 3.3

SUPER RESOLUTION FROM MULTIPLE LOW RESOLUTION IMAGES

Realtime 3D Computer Graphics Virtual Reality

Integer Computation of Image Orthorectification for High Speed Throughput

Vector Math Computer Graphics Scott D. Anderson

Making High Dynamic Range (HDR) Panoramas with Hugin

Projective Geometry: A Short Introduction. Lecture Notes Edmond Boyer

Solving Systems of Linear Equations

Solving Systems of Linear Equations Graphing

Tips on Photography What Kind of Images? Photos and more Uses - A good picture speaks 1,000 words

Introduction to the TI-Nspire CX

Reflection and Refraction

How To Analyze Ball Blur On A Ball Image

Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Geometry for Computer Graphics

Algebra Geometry Glossary. 90 angle

1 Determinants and the Solvability of Linear Systems

Camera geometry and image alignment

9/16 Optics 1 /11 GEOMETRIC OPTICS

Part-Based Recognition

Linear Equations ! $ & " % & " 11,750 12,750 13,750% MATHEMATICS LEARNING SERVICE Centre for Learning and Professional Development

Cabri Geometry Application User Guide

FREE FALL. Introduction. Reference Young and Freedman, University Physics, 12 th Edition: Chapter 2, section 2.5

2. If C is the midpoint of AB and B is the midpoint of AE, can you say that the measure of AC is 1/4 the measure of AE?

Otis Photo Lab Inkjet Printing Demo

Nonlinear Systems and the Conic Sections

Digital Photography Composition. Kent Messamore 9/8/2013

Content. Chapter 4 Functions Basic concepts on real functions 62. Credits 11

Lagrange Interpolation is a method of fitting an equation to a set of points that functions well when there are few points given.

Math 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers.

Numeracy Targets. I can count at least 20 objects

Lecture 4 DISCRETE SUBGROUPS OF THE ISOMETRY GROUP OF THE PLANE AND TILINGS

Three-Dimensional Figures or Space Figures. Rectangular Prism Cylinder Cone Sphere. Two-Dimensional Figures or Plane Figures

3 Image-Based Photo Hulls. 2 Image-Based Visual Hulls. 3.1 Approach. 3.2 Photo-Consistency. Figure 1. View-dependent geometry.

Transcription:

Homographies and Panoramas Slides from Steve Seitz, Rick Szeliski, Alexei Efros, Fredo Durand, and Kristin Grauman cs129: Computational Photography James Hays, Brown, Fall 2012

Why Mosaic? Are you getting the whole picture? Compact Camera FOV = 50 x 35 Slide from Brown & Lowe

Why Mosaic? Are you getting the whole picture? Compact Camera FOV = 50 x 35 Human FOV = 200 x 135 Slide from Brown & Lowe

Why Mosaic? Are you getting the whole picture? Compact Camera FOV = 50 x 35 Human FOV = 200 x 135 Panoramic Mosaic = 360 x 180 Slide from Brown & Lowe

Panoramic Photos are old Sydney,1875 Beirut, late 1800 s

Panorama Capture

Mosaics: stitching images together virtual wide-angle camera

Big idea As with high dynamic range imaging, we are compensating for the shortcomings of traditional cameras by capturing and fusing multiple images

Today s lecture Today we will assume that correspondence between photos is known and we focus on finding and applying homographies. Wednesday and Friday we will discuss automatic correspondence.

How to do it? Basic Procedure Take a sequence of images from the same position Rotate the camera about its optical center Compute transformation between second image and first Transform the second image to overlap with the first Blend the two together to create a mosaic If there are more images, repeat but wait, why should this work at all? What about the 3D geometry of the scene? Why aren t we using it?

Aligning images left on top right on top Translations are not enough to align the images

A pencil of rays contains all views real camera synthetic camera Can generate any synthetic camera view as long as it has the same center of projection!

Image reprojection mosaic PP The mosaic has a natural interpretation in 3D The images are reprojected onto a common plane The mosaic is formed on this plane Mosaic is a synthetic wide-angle camera

Image reprojection Basic question How to relate two images from the same camera center? how to map a pixel from PP1 to PP2 Answer Cast a ray through each pixel in PP1 Draw the pixel where that ray intersects PP2 PP2 But don t we need to know the geometry of the two planes with respect to the eye? PP1 Observation: Rather than thinking of this as a 3D reprojection, think of it as a 2D image warp from one image to another

Back to Image Warping Which t-form is the right one for warping PP1 into PP2? e.g. translation, Euclidean, affine, projective Translation Affine Perspective 2 unknowns 6 unknowns 8 unknowns

Homography A: Projective mapping between any two PPs with the same center of projection rectangle should map to arbitrary quadrilateral parallel lines aren t but must preserve straight lines same as: project, rotate, reproject called Homography PP2 wx' wy' w p * * * * * * H * * * To apply a homography H x y 1 p Compute p = Hp (regular matrix multiply) Convert p from homogeneous to image coordinates PP1

Image warping with homographies image plane in front black area where no pixel maps to image plane below

Mosaics: main steps Collect correspondences (manually) Solve for homography matrix H Least squares solution Warp content from one image frame to the other to combine: say im1 into im2 reference frame Determine bounds of the new combined image Where will the corners of im1 fall in im2 s coordinate frame? We will attempt to lookup colors for any of these positions we can get from im1. Compute coordinates in im1 s reference frame (via homography) for all points in that range Lookup all colors for all these positions from im1 Inverse warp : interp2 (watch for nans) Overlay im2 content onto the warped im1 content. Careful about new bounds of the output image: minx, miny

Homography x, y wx wy w, w x, y To apply a given homography H Compute p = Hp (regular matrix multiply) Convert p from homogeneous to image coordinates wx' wy' w p * * * * * * H * * * x y 1 p

Homography x1, y x 1 1, y1 x 2, y 2 x 2, y 2 x n, y n x, n y n To compute the homography given pairs of corresponding points in the images, we need to set up an equation where the parameters of H are the unknowns

Least Squares Example Say we have a set of data points (X1,X1 ), (X2,X2 ), (X3,X3 ), etc. (e.g. person s height vs. weight) We want a nice compact formula (a line) to predict X s from Xs: Xa + b = X We want to find a and b How many (X,X ) pairs do we need? ' X a b X X 1 1 ' X 2a b X 2 What if the data is noisy? X X X 1 2 3... 1 1 1... a b X X X 1 ' 1 ' 2 ' 3... overconstrained min X Ax 1 2 B 1 2 a b X X ' 1 ' 2 Ax=B

Solving for homographies wx' p = Hp a b c x wy' d e f y w g h i 1 Can set scale factor i=1. So, there are 8 unknowns. Set up a system of linear equations: Ah = b where vector of unknowns h = [a,b,c,d,e,f,g,h] T Need at least 8 eqs, but the more the better Solve for h. If overconstrained, solve using least-squares: >> help lmdivide min Ah b 2

Example system for finding homography Source: Paul Heckbert, Fundamentals of Texture Mapping and Image Warping

Mosaics: main steps Collect correspondences (manually) Solve for homography matrix H Least squares solution Warp content from one image frame to the other to combine: say im1 into im2 reference frame Determine bounds of the new combined image Where will the corners of im1 fall in im2 s coordinate frame? We will attempt to lookup colors for any of these positions we can get from im1. : meshgrid Compute coordinates in im1 s reference frame (via homography) for all points in that range: H -1 Lookup all colors for all these positions from im1 Inverse warp : interp2 (watch for nans : isnan) Overlay im2 content onto the warped im1 content. Careful about new bounds of the output image: minx, miny

im1 im2

Mosaics: main steps Collect correspondences (manually) Solve for homography matrix H Least squares solution Warp content from one image frame to the other to combine: say im1 into im2 reference frame Determine bounds of the new combined image Where will the corners of im1 fall in im2 s coordinate frame? We will attempt to lookup colors for any of these positions we can get from im1. : meshgrid Compute coordinates in im1 s reference frame (via homography) for all points in that range: H -1 Lookup all colors for all these positions from im1 Inverse warp : interp2 (watch for nans : isnan) Overlay im2 content onto the warped im1 content. Careful about new bounds of the output image: minx, miny

im1 im2

Mosaics: main steps Collect correspondences (manually) Solve for homography matrix H Least squares solution Warp content from one image frame to the other to combine: say im1 into im2 reference frame Determine bounds of the new combined image Where will the corners of im1 fall in im2 s coordinate frame? We will attempt to lookup colors for any of these positions we can get from im1. : meshgrid Compute coordinates in im1 s reference frame (via homography) for all points in that range: H -1 Lookup all colors for all these positions from im1 Inverse warp : interp2 (watch for nans : isnan) Overlay im2 content onto the warped im1 content. Careful about new bounds of the output image: minx, miny

im1 im2 im1 warped into reference frame of im2. Use interp2 to ask for the colors (possibly interpolated) from im1 at all the positions needed in im2 s reference frame.

Mosaics: main steps Collect correspondences (manually) Solve for homography matrix H Least squares solution Warp content from one image frame to the other to combine: say im1 into im2 reference frame Determine bounds of the new combined image Where will the corners of im1 fall in im2 s coordinate frame? We will attempt to lookup colors for any of these positions we can get from im1. : meshgrid Compute coordinates in im1 s reference frame (via homography) for all points in that range: H -1 Lookup all colors for all these positions from im1 Inverse warp : interp2 (watch for nans : isnan) Overlay im2 content onto the warped im1 content. Careful about new bounds of the output image: minx, miny

Fun with homographies Original image St.Petersburg photo by A. Tikhonov Virtual camera rotations

Analyzing patterns and shapes What is the shape of the b/w floor pattern? Slide from Criminisi The floor (enlarged) Automatically rectified floor

Automatic rectification Analyzing patterns and shapes From Martin Kemp The Science of Art (manual reconstruction) Slide from Criminisi 2 patterns have been discovered!

Analyzing patterns and shapes What is the (complicated) shape of the floor pattern? St. Lucy Altarpiece, D. Veneziano Slide from Criminisi Automatically rectified floor

Analyzing patterns and shapes Automatic rectification From Martin Kemp, The Science of Art (manual reconstruction) Slide from Criminisi

Analyzing patterns and shapes The Ambassadors by Hans Holbein the Younger, 1533

Julian Beever: Manual Homographies http://users.skynet.be/j.beever/pave.htm

changing camera center Does it still work? synthetic PP PP1 PP2

Planar scene (or far away) PP1 PP3 PP2 PP3 is a projection plane of both centers of projection, so we are OK! This is how big aerial photographs are made

Planar mosaic