CS6670: Computer Vision

Similar documents
CS4670: Computer Vision

CS4670: Computer Vision

Image Warping and Mosacing

Mosaics. Today s Readings

N-Views (1) Homographies and Projection

Image warping and stitching

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

Announcements. Mosaics. How to do it? Image Mosaics

Image warping and stitching

Homographies and RANSAC

CS4670: Computer Vision

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

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

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

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

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

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

Geometric camera models and calibration

Image warping and stitching

Camera Calibration. COS 429 Princeton University

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

Image stitching. Announcements. Outline. Image stitching

CS6670: Computer Vision

Feature Matching and RANSAC

calibrated coordinates Linear transformation pixel coordinates

COSC579: Scene Geometry. Jeremy Bolton, PhD Assistant Teaching Professor

Camera Model and Calibration

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Affine and Projective Transformations

CS 2770: Intro to Computer Vision. Multiple Views. Prof. Adriana Kovashka University of Pittsburgh March 14, 2017

Camera model and multiple view geometry

3D Geometry and Camera Calibration

Camera Calibration. Schedule. Jesus J Caban. Note: You have until next Monday to let me know. ! Today:! Camera calibration

CSE 527: Introduction to Computer Vision

Image formation. Thanks to Peter Corke and Chuck Dyer for the use of some slides

2D Transforms. Lecture 4 CISC440/640 Spring Department of Computer and Information Science

Agenda. Rotations. Camera models. Camera calibration. Homographies

Midterm Examination CS 534: Computational Photography

Perspective Projection [2 pts]

Pin Hole Cameras & Warp Functions

Introduction to Computer Vision. Week 3, Fall 2010 Instructor: Prof. Ko Nishino

CS4670: Computer Vision

Computer Vision I Name : CSE 252A, Fall 2012 Student ID : David Kriegman Assignment #1. (Due date: 10/23/2012) x P. = z

Compositing a bird's eye view mosaic

Computer Vision. Coordinates. Prof. Flávio Cardeal DECOM / CEFET- MG.

1 Projective Geometry

Single-view 3D Reconstruction

Geometric Transformations and Image Warping

COMP 558 lecture 19 Nov. 17, 2010

Two-view geometry Computer Vision Spring 2018, Lecture 10

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

Camera Model and Calibration. Lecture-12

ECE 470: Homework 5. Due Tuesday, October 27 in Seth Hutchinson. Luke A. Wendt

EE795: Computer Vision and Intelligent Systems

CS201 Computer Vision Camera Geometry

CV: 3D to 2D mathematics. Perspective transformation; camera calibration; stereo computation; and more

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

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

Agenda. Rotations. Camera calibration. Homography. Ransac

Camera Models and Image Formation. Srikumar Ramalingam School of Computing University of Utah

Epipolar Geometry and Stereo Vision

Rectification and Disparity

Single View Geometry. Camera model & Orientation + Position estimation. What am I?

3D Viewing. CS 4620 Lecture 8

Pin Hole Cameras & Warp Functions

Dense 3D Reconstruction. Christiano Gava

Warping, Morphing and Mosaics

Introduction to Computer Vision

CS 664 Slides #9 Multi-Camera Geometry. Prof. Dan Huttenlocher Fall 2003

DD2429 Computational Photography :00-19:00

Local features and image matching May 8 th, 2018

Module 4F12: Computer Vision and Robotics Solutions to Examples Paper 2

Unit 3 Multiple View Geometry

CS223b Midterm Exam, Computer Vision. Monday February 25th, Winter 2008, Prof. Jana Kosecka

CS5670: Computer Vision

Targil 10 : Why Mosaic? Why is this a challenge? Exposure differences Scene illumination Miss-registration Moving objects

Reminder: Lecture 20: The Eight-Point Algorithm. Essential/Fundamental Matrix. E/F Matrix Summary. Computing F. Computing F from Point Matches

Image warping , , Computational Photography Fall 2017, Lecture 10

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

CIS 580, Machine Perception, Spring 2016 Homework 2 Due: :59AM

DD2423 Image Analysis and Computer Vision IMAGE FORMATION. Computational Vision and Active Perception School of Computer Science and Communication

Two-View Geometry (Course 23, Lecture D)

Camera Models and Image Formation. Srikumar Ramalingam School of Computing University of Utah

Introduction to Image Processing and Computer Vision. -- Panoramas and Blending --

3D Viewing. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 9

CSCI 5980: Assignment #3 Homography

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

Stereo and Epipolar geometry

CIS 580, Machine Perception, Spring 2015 Homework 1 Due: :59AM

Stereo Vision. MAN-522 Computer Vision

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5)

TD2 : Stereoscopy and Tracking: solutions

Image Rectification (Stereo) (New book: 7.2.1, old book: 11.1)

Visual Recognition: Image Formation

Lecture 3: Camera Calibration, DLT, SVD

Dense 3D Reconstruction. Christiano Gava

Exercise session using MATLAB: Quasiconvex Optimixation

Midterm Exam Solutions

Scene Modeling for a Single View

Image Formation I Chapter 2 (R. Szelisky)

Transcription:

CS6670: Computer Vision Noah Snavely Lecture 7: Image Alignment and Panoramas What s inside your fridge? http://www.cs.washington.edu/education/courses/cse590ss/01wi/

Projection matrix intrinsics projection rotation translation (t in book s notation)

Projection matrix = 0 (in homogeneous image coordinates)

Questions?

Image alignment Full screen panoramas (cubic): http://www.panoramas.dk/ Mars: http://www.panoramas.dk/fullscreen3/f2_mars97.html 2003 New Years Eve: http://www.panoramas.dk/fullscreen3/f1.html

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

Mosaics: stitching images together

Readings Szeliski: Chapter 6.1: Feature-based alignment Chapter 9: Panorama stitching

Image alignment Image taken from same viewpoint, just rotated. Can we line them up?

Image alignment Why don t these image line up exactly?

What is the geometric relationship between these two images??

What is the geometric relationship between these two images??

Is this an affine transformation?

Where do we go from here? affine transformation what happens when we change this row?

Projective Transformations aka Homographies aka Planar Perspective Maps Called a homography (or planar perspective map) projection of 3D plane can be explained by a (homogeneous) 2D transform

Homographies What happens when the denominator is 0?

Example on board Homographies

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

Homographies

Homographies Homographies Affine transformations, and Projective warps Properties of projective transformations: Origin does not necessarily map to origin Lines map to lines Parallel lines do not necessarily remain parallel Ratios are not preserved Closed under composition

2D image transformations These transformations are a nested set of groups Closed under composition and inverse is a member

Questions?

Creating a panorama 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

Geometric interpretation of mosaics 2 0 1

Geometric Interpretation of Mosaics Optical Center Image 2 Image 1 If we capture all 360º of rays, we can create a 360º panorama The basic operation is projecting an image from one plane to another The projective transformation is scene-independent This depends on all the images having the same optical center

Projecting images onto a common plane mosaic PP

Image reprojection Basic question How to relate two images from the same camera center? how to map a pixel from PP1 to PP2 PP2 Answer Cast a ray through each pixel in PP1 Draw the pixel where that ray intersects PP2 PP1

What is the transformation? Optical Center Image 2 3D ray coords (in camera 2) image coords (in image 2) Image 1 How do we transform image 2 onto image 1 s projection plane? image 1 image 2 3D ray coords (in camera 1) image coords (in image 2) image coords (in image 1) 3x3 homography image coords (in image 2)

Image alignment

Image alignment

Can we use homography to create a 360 panorama?

Panoramas What if you want a 360 field of view? mosaic Projection Sphere

Spherical projection Map 3D point (X,Y,Z) onto sphere Y Z X Convert to spherical coordinates unit sphere Convert to spherical image coordinates s defines size of the final image» often convenient to set s = camera focal length unwrapped sphere Spherical image

Spherical reprojection input f = 200 (pixels) f = 400 f = 800 Map image to spherical coordinates need to know the focal length

Aligning spherical images Suppose we rotate the camera by about the vertical axis How does this change the spherical image?

Aligning spherical images Suppose we rotate the camera by about the vertical axis How does this change the spherical image? Translation by This means that we can align spherical images by translation

Unwrapping a sphere Credit: JHT s Planetary Pixel Emporium

Spherical panoramas + + + + Microsoft Lobby: http://www.acm.org/pubs/citations/proceedings/graph/258734/p251-szeliski

Different projections are possible

3-minute break Questions?

Computing transformations Given a set of matches between images A and B How can we compute the transform T from A to B? Find transform T that best agrees with the matches

Computing transformations?

Simple case: translations How do we solve for?

Simple case: translations Displacement of match i = Mean displacement =

Another view System of linear equations What are the knowns? Unknowns? How many unknowns? How many equations (per match)?

Another view Problem: more equations than unknowns Overdetermined system of equations We will find the least squares solution

Least squares formulation For each point we define the residuals as

Least squares formulation Goal: minimize sum of squared residuals Least squares solution For translations, is equal to mean displacement

Least squares formulation Can also write as a matrix equation 2n x 2 2 x 1 2n x 1

Least squares Find t that minimizes To solve, form the normal equations

Affine transformations How many unknowns? How many equations per match? How many matches do we need?

Affine transformations Residuals: Cost function:

Affine transformations Matrix form 2n x 6 6 x 1 2n x 1

Homographies p p To unwarp (rectify) an image solve for homography H given p and p solve equations of the form: wp = Hp linear in unknowns: w and coefficients of H H is defined up to an arbitrary scale factor how many points are necessary to solve for H?

Solving for homographies

Solving for homographies

Solving for homographies Defines a least squares problem: 2n 9 9 2n Since is only defined up to scale, solve for unit vector Solution: = eigenvector of with smallest eigenvalue Works with 4 or more points

Questions?