2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University

Similar documents
Image warping , , Computational Photography Fall 2017, Lecture 10

Image Warping. Many slides from Alyosha Efros + Steve Seitz. Photo by Sean Carroll

Image Warping. Some slides from Steve Seitz

Image Warping : Computational Photography Alexei Efros, CMU, Fall Some slides from Steve Seitz

Coordinate transformations. 5554: Packet 8 1

2D transformations: An introduction to the maths behind computer graphics

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

CS4670: Computer Vision

Interactive Computer Graphics. Warping and morphing. Warping and Morphing. Warping and Morphing. Lecture 14+15: Warping and Morphing. What is.

Warping. 12 May 2015

Graphics and Interaction Transformation geometry and homogeneous coordinates

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

2D and 3D Transformations AUI Course Denbigh Starkey

Computer Graphics Geometric Transformations

Interactive Computer Graphics. Hearn & Baker, chapter D transforms Hearn & Baker, chapter 5. Aliasing and Anti-Aliasing

Last week. Machiraju/Zhang/Möller/Fuhrmann

Image Warping. Some slides from Steve Seitz

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

Affine Transformation. Edith Law & Mike Terry

Overview. Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections

2D TRANSFORMATIONS AND MATRICES

GEOMETRIC TRANSFORMATIONS AND VIEWING

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

Overview. By end of the week:

Image Warping (Szeliski Sec 2.1.2)

Image Warping CSE399b, Spring 07 Computer Vision

CSE328 Fundamentals of Computer Graphics: Theory, Algorithms, and Applications

Image Warping. Computational Photography Derek Hoiem, University of Illinois 09/28/17. Photo by Sean Carroll

2D and 3D Coordinate Systems and Transformations

Transformations: 2D Transforms

Matrix Transformations. Affine Transformations

Chapter 2 - Basic Mathematics for 3D Computer Graphics

MATHEMATICS FOR ENGINEERING TUTORIAL 5 COORDINATE SYSTEMS

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

3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations

Computer Vision cmput 428/615

Visual Recognition: Image Formation

Transforms. COMP 575/770 Spring 2013

Modeling Transformations

Perspective projection and Transformations

CS4670: Computer Vision

Transformations. Examples of transformations: shear. scaling

Lecture 4: Transforms. Computer Graphics CMU /15-662, Fall 2016

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

Camera Projection Models We will introduce different camera projection models that relate the location of an image point to the coordinates of the

Coordinate Frames and Transforms

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

How is project #1 going?

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

Computer Graphics with OpenGL ES (J. Han) Chapter IV Spaces and Transforms

Game Engineering CS S-05 Linear Transforms

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

(x, y) (ρ, θ) ρ θ. Polar Coordinates. Cartesian Coordinates

Specifying Complex Scenes

Homework #1. Displays, Alpha Compositing, Image Processing, Affine Transformations, Hierarchical Modeling

Scene Graphs & Modeling Transformations COS 426

Computer Vision I - Appearance-based Matching and Projective Geometry

Polynomials. Math 4800/6080 Project Course

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6

Game Engineering: 2D

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM

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

Integration using Transformations in Polar, Cylindrical, and Spherical Coordinates

EECE 478. Learning Objectives. Learning Objectives. Linear Algebra and 3D Geometry. Linear algebra in 3D. Coordinate systems

3D Computer Vision II. Reminder Projective Geometry, Transformations. Nassir Navab. October 27, 2009

Computer Graphics: Geometric Transformations

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

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

Content. Coordinate systems Orthographic projection. (Engineering Drawings)

Transformations Computer Graphics I Lecture 4

CS4620/5620. Professor: Kavita Bala. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Figure 1. Lecture 1: Three Dimensional graphics: Projections and Transformations

Computer Vision I - Appearance-based Matching and Projective Geometry

Supplementary Material: The Rotation Matrix

N-Views (1) Homographies and Projection

Linear transformations Affine transformations Transformations in 3D. Graphics 2009/2010, period 1. Lecture 5: linear and affine transformations

Homogeneous Coordinates and Transformations of the Plane

Transformation Algebra

Section III: TRANSFORMATIONS

calibrated coordinates Linear transformation pixel coordinates

Augmented Reality II - Camera Calibration - Gudrun Klinker May 11, 2004

Early Fundamentals of Coordinate Changes and Rotation Matrices for 3D Computer Vision

Transformations Week 9, Lecture 18

Hello, welcome to the video lecture series on Digital Image Processing. So in today's lecture

1 Affine and Projective Coordinate Notation

CS6670: Computer Vision

Advanced Computer Graphics Transformations. Matthias Teschner

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:

Pin Hole Cameras & Warp Functions

Geometric Transformations

Representing 2D Transformations as Matrices

Vector Algebra Transformations. Lecture 4

Introduction to Homogeneous coordinates

3D Computer Graphics. Jared Kirschner. November 8, 2010

Transformations Computer Graphics I Lecture 4

Today. Parity. General Polygons? Non-Zero Winding Rule. Winding Numbers. CS559 Lecture 11 Polygons, Transformations

+ i a y )( cosφ + isinφ) ( ) + i( a x. cosφ a y. = a x

Institutionen för systemteknik

Computer Science 336 Fall 2017 Homework 2

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Transcription:

2D Image Transforms 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University

Extract features from an image what do we do next?

Feature matching (object recognition, 3D reconstruction, augmented reality, image stitching) How do you compute the transformation?

Given a set of matched feature points {x i, x 0 i} set of point correspondences point in one image point in the other image and a transformation x 0 = f(x; p) transformation function parameters Find the best estimate of p

What kind of transformation functions are there? x 0 = f(x; p)

2D Transformations

translation rotation aspect affine perspective cylindrical

2D Planar Transformations

2D Planar Transformations Scale Each component multiplied by a scalar Uniform scaling - same scalar for each component

2D Planar Transformations Scale Scale x 0 = ax y 0 = by Each component multiplied by a scalar Uniform scaling - same scalar for each component

2D Planar Transformations Scale apple x 0 y 0 = Scale apple a 0 0 b apple x y scaling matrix S Each component multiplied by a scalar Uniform scaling - same scalar for each component

2D Planar Transformations Scaling Shear

2D Planar Transformations Shear Scaling Shear x 0 = x + a y y 0 = b x + y

2D Planar Transformations Scaling Shear Shear apple apple x 0 1 a y 0 = b 1 apple x y

2D Planar Transformations x = apple x y

2D Planar Transformations x 0 = apple x 0 y 0 x = apple x y

2D Planar Transformations x 0 = apple x 0 y 0 Rotation x 0 = x cos y sin y 0 = x sin + y cos x = apple x y

(x, y ) Polar coordinates x = r cos (φ) y = r sin (φ) x = r cos (φ + θ) y = r sin (φ + θ) θ φ (x, y) Trig Identity x = r cos(φ) cos(θ) r sin(φ) sin(θ) y = r sin(φ) cos(θ) + r cos(φ) sin(θ) Substitute x = x cos(θ) - y sin(θ) y = x sin(θ) + y cos(θ)

2D Planar Transformations apple x 0 x 0 = y 0 apple x 0 y 0 = Rotation apple cos sin sin cos apple x y x = apple x y

2D linear transformation (can be written in matrix form) x 0 = f(x; p) apple x 0 y 0 = M apple x y parameters p point x

Scale Flip across y M = apple sx 0 0 s y M = apple 1 0 0 1 Rotate M = apple cos sin sin cos Flip across origin apple 1 0 M = 0 1 Shear Identity M = apple 1 sx s y 1 M = apple 1 0 0 1

How do you represent translation with a 2 x 2 matrix? x 0 = x + t x y 0 = y + t x y apple?? M =??

How do you represent translation with a 2 x 2 matrix? x 0 = x + t x y 0 = y + t x not possible

Q: How can we represent translation in matrix form? x 0 = x + t x y 0 = y + t y 25

Homogeneous Coordinates

apple x y add a one here 2 3 x =) 4 y 5 inhomogenous coordinates 1 homogenous coordinates Represent 2D point with a 3D vector

Q: How can we represent translation in matrix form? x 0 = x + t x y 0 = y + t y A: append 3rd element and append 3rd column & row apple x y 2 3 2 3 x ) 4 y 1 5 M = 4 1 0 t x 0 1 t y 0 0 1 5

Homogeneous Coordinates t x =2 t y =1

A 2D point in an image can be represented as a 3D vector x = apple x y () X = 2 4 x 1 x 2 3 5 x 3 where x = x 1 x 3 y = x 2 x 3 Why?

Think of a point on the image plane in 3D y image plane X P z x z =1 X is a projection of a point P on the image plane You can think of a conversion to homogenous coordinates as a conversion of a point to a ray

Conversion: 2D point homogeneous point append 1 as 3rd coordinate apple x y ) 2 4 x y 1 3 5 homogeneous point 2D point divide by 3rd coordinate 2 4 x y w 3 5 ) apple x/w y/w Special Properties Scale invariant Point at infinity Undefined x y w > = x y w > x y 0 0 0 0

Basic 2D transformations as 3x3 matrices Translate Scale Rotate Shear

Matrix Composition Transformations can be combined by matrix multiplication p = T(t x,t y ) R(Θ) S(s x,s y ) p Does the order of multiplication matter?

2D transformations

Affine Transformation Affine transformations are combinations of Linear transformations, and Translations Properties of affine transformations: Origin does not necessarily map to origin Lines map to lines Parallel lines remain parallel Ratios are preserved Closed under composition (affine times affine is affine) Will the last coordinate w ever change?

Coming soon Projective Transform Projective transformations are combos of 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 Models change of basis Projective matrix is defined up to a scale (8 DOF)