Image Warping (Szeliski Sec 2.1.2)

Similar documents
Image Warping. Some slides from Steve Seitz

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

Image Warping. Some slides from Steve Seitz

Image Warping CSE399b, Spring 07 Computer Vision

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

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

Image warping. image filtering: change range of image. image warping: change domain of image g(x) = f(h(x)) h(y)=0.5y+0.5. h([x,y])=[x,y/2] f h

How is project #1 going?

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

Last Lecture. Edge Detection. Filtering Pyramid

Prof. Feng Liu. Winter /05/2019

Modeling Transformations

Warping, Morphing and Mosaics

Image Warping, mesh, and triangulation CSE399b, Spring 07 Computer Vision

Modeling Transformations

Modeling Transformations

Image warping/morphing

Scene Graphs & Modeling Transformations COS 426

CS4670: Computer Vision

Warping. 12 May 2015

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

Transformations II. Week 2, Wed Jan 17

Modeling Transformations

Affine and Projective Transformations

Computer Graphics. Geometric Transformations

Modeling Transformations

Computer Graphics. Geometric Transformations

Fitting a transformation: Feature-based alignment April 30 th, Yong Jae Lee UC Davis

Transformations. Examples of transformations: shear. scaling

Modeling Transformations Revisited

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

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

Photo by Carl Warner

Multi-stable Perception. Necker Cube

3D Geometry and Camera Calibration

More on Transformations. COS 426, Spring 2019 Princeton University

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing

3-Dimensional Viewing

CS770/870 Spring 2017 Transformations

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing)

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Editing and Transformation

What and Why Transformations?

Two Dimensional Viewing

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics

Uses of Transformations. 2D transformations Homogeneous coordinates. Transformations. Transformations. Transformations. Transformations and matrices

Geometric Transformations

M y. Image Warping. Targil 7 : Image Warping. Image Warping. 2D Geometric Transformations. image filtering: change range of image g(x) = T(f(x))

Geometric Model of Camera

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

Homogeneous Coordinates

Vector Algebra Transformations. Lecture 4

The 3-D Graphics Rendering Pipeline

Transformations III. Week 2, Fri Jan 19

1. We ll look at: Types of geometrical transformation. Vector and matrix representations

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline

CS559: Computer Graphics

MAN-522: COMPUTER VISION SET-2 Projections and Camera Calibration

Image warping/morphing

Image Metamorphosis By Affine Transformations

CS F-07 Objects in 2D 1

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

Image warping , , Computational Photography Fall 2017, Lecture 10

Today s class. Geometric objects and transformations. Informationsteknologi. Wednesday, November 7, 2007 Computer Graphics - Class 5 1

CS770/870 Spring 2017 Transformations

Computer Graphics. 2D transformations. Transforma3ons in computer graphics. Overview. Basic classes of geometric transforma3ons

4. Two Dimensional Transformations

Transformations II. Arbitrary 3D Rotation. What is its inverse? What is its transpose? Can we constructively elucidate this relationship?

Determining the 2d transformation that brings one image into alignment (registers it) with another. And

CS 335 Graphics and Multimedia. Geometric Warping

To Do. Course Outline. Course Outline. Goals. Motivation. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1

CS6670: Computer Vision

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

N-Views (1) Homographies and Projection

CS4670: Computer Vision

MEM380 Applied Autonomous Robots Winter Robot Kinematics

Systems of Linear Equations

Lecture 4: Viewing. Topics:

Camera Calibration. COS 429 Princeton University

Geometric Transformations

CS4670/5670: Computer Vision Kavita Bala. Lecture 14: Feature matching and Transforms

Image warping and stitching

Prof. Kristen Grauman

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

3D Coordinates & Transformations

Transforms. COMP 575/770 Spring 2013

Image warping and stitching

2D Transformations. 7 February 2017 Week 5-2D Transformations 1

CS Computer Graphics: Transformations & The Synthetic Camera

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

Computer Graphics. Coordinate Systems and Change of Frames. Based on slides by Dianna Xu, Bryn Mawr College

Models and The Viewing Pipeline. Jian Huang CS456

Computer Graphics. Si Lu. Fall er_graphics.htm 10/11/2017

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

GEOMETRIC TRANSFORMATIONS AND VIEWING

IMGD The Game Development Process: 3D Modeling and Transformations

Viewing and Projection

Transformations Review

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

Transcription:

Image Warping (Szeliski Sec 2..2) http://www.jeffre-martin.com CS94: Image Manipulation & Computational Photograph Aleei Efros, UC Berkele, Fall 7 Some slides from Steve Seitz

Image Transformations image filtering: change range of image g() T(f()) f T f image warping: change domain of image f g() f(t()) T f

Image Transformations image filtering: change range of image g() T(f()) f T g image warping: change domain of image f g() f(t()) T g

Parametric (global) warping Eamples of parametric warps: translation rotation aspect affine perspective clindrical

Parametric (global) warping T p (,) p (, ) Transformation T is a coordinate-changing machine: p T(p) What does it mean that T is global? Is the same for an point p can be described b just a few numbers (parameters) Let s represent a linear T as a matri: p Mp M

Scaling Scaling a coordinate means multipling each of its components b a scalar Uniform scaling means this scalar is the same for all components: 2

Scaling Non-uniform scaling: different scalars per component: X 2, Y.5

Scaling Scaling operation: Or, in matri form: b a b a scaling matri S What s inverse of S?

2-D Rotation (, ) (, ) q cos(q) - sin(q) sin(q) + cos(q)

2-D Rotation q f (, ) (, ) r cos (f) r sin (f) r cos (f + q) r sin (f + q) Trig Identit r cos(f) cos(q) r sin(f) sin(q) r sin(f) cos(q) + r cos(f) sin(q) Substitute cos(q) - sin(q) sin(q) + cos(q)

2-D Rotation This is eas to capture in matri form: Even though sin(q) and cos(q) are nonlinear functions of q, is a linear combination of and is a linear combination of and What is the inverse transformation? Rotation b q For rotation matrices ( q ) sin( q ) ( ) ( ) cos - sin q cos q R - T R R

22 Matrices What tpes of transformations can be represented with a 22 matri? 2D Identit? 2D Scale around (,)? s s * * s s

22 Matrices What tpes of transformations can be represented with a 22 matri? 2D Rotate around (,)? * cos * sin * sin * cos + - - cos sin sin cos 2D Shear? sh sh + + * * sh sh

22 Matrices What tpes of transformations can be represented with a 22 matri? 2D Mirror about Y ais? - - 2D Mirror over (,)? - - - -

22 Matrices What tpes of transformations can be represented with a 22 matri? 2D Translation? + t + t NO! Onl linear 2D transformations can be represented with a 22 matri

All 2D Linear Transformations Linear transformations are combinations of Scale, Rotation, Shear, and Mirror Properties of linear transformations: Origin maps to origin Lines map to lines Parallel lines remain parallel Ratios are preserved Closed under composition a c b d a c be d g f i h k j l

Consider a different Basis j (,) v (v,v ) q p u(u,u ) i (,) q4i+3j (4,3) p4u+3v

Linear Transformations as Change of Basis v (v,v ) j (,) p uv p ij p uv (4,3) p 4u +3v p 4u +3v u(u,u ) p ij 4u+3v An linear transformation is a basis!!! i (,) u p ij v 4 u v p uv u v 3 u v

What s the inverse transform? j (,) v (v,v ) p ij p uv u(u,u ) p ij (5,4) p uv i (,) p u + p v u u v v - 5 4 u u v v p uv (p,p )? - p ij How can we change from an basis to an basis? What if the basis are orthogonal?

Projection onto orthogonal basis j (,) v (v,v ) p ij p uv i (,) p ij (5,4) - u p uv v 5 u v 4 u v p uv (u p ij, v p ij ) u v p ij u(u,u )

Homogeneous Coordinates : How can we represent translation as a 33 matri? + + t t

Homogeneous Coordinates Homogeneous coordinates represent coordinates in 2 dimensions with a 3-vector ¾¾ homogeneous ¾¾¾¾ coords

Homogeneous Coordinates Add a 3rd coordinate to ever 2D point (,, w) represents a point at location (/w, /w) (,, ) represents a point at infinit (,, ) is not allowed 2 (2,,) or (4,2,2) or (6,3,3) Convenient coordinate sstem to represent man useful transformations 2

Homogeneous Coordinates : How can we represent translation as a 33 matri? A: Using the rightmost column: t t Translation t t + +

Translation Eample of translation + + t t t t t 2 t Homogeneous Coordinates

Basic 2D Transformations Basic 2D transformations as 33 matrices - cos sin sin cos t t sh sh Translate Rotate Shear s s Scale

Matri Composition Transformations can be combined b matri multiplication ø ö ç ç è æ - w s s t t w cos sin sin cos p T(t,t ) R() S(s,s ) p Does the order of multiplication matter?

Affine Transformations Affine transformations are combinations of Linear transformations, and Translations Properties of affine transformations: Origin does not necessaril map to origin Lines map to lines Parallel lines remain parallel Ratios are preserved Closed under composition Models change of basis w a d b e c f w Will the last coordinate w alwas be?

Projective Transformations Projective transformations Affine transformations, and Projective warps Properties of projective transformations: Origin does not necessaril map to origin Lines map to lines Parallel lines do not necessaril remain parallel Ratios are not preserved Closed under composition Models change of basis w a d g b e h c f i w

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