Image Warping CSE399b, Spring 07 Computer Vision

Similar documents
Image Warping. Some slides from Steve Seitz

Image Warping. Some slides from Steve Seitz

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

Image Warping (Szeliski Sec 2.1.2)

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

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

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

How is project #1 going?

Last Lecture. Edge Detection. Filtering Pyramid

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

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

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

Warping, Morphing and Mosaics

Warping. 12 May 2015

Prof. Feng Liu. Winter /05/2019

CS4670: Computer Vision

Image warping/morphing

Modeling Transformations

Modeling Transformations

Modeling Transformations

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

Scene Graphs & Modeling Transformations COS 426

Modeling Transformations

Affine and Projective Transformations

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

Modeling Transformations

CS4670: Computer Vision

CS 335 Graphics and Multimedia. Geometric Warping

Transformations II. Week 2, Wed Jan 17

Photo by Carl Warner

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

Image warping/morphing

Multi-stable Perception. Necker Cube

Image warping , , Computational Photography Fall 2017, Lecture 10

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

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

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

The 3-D Graphics Rendering Pipeline

Modeling Transformations Revisited

3D Geometry and Camera Calibration

Introduction to Computer Vision

3-Dimensional Viewing

Image Warping and Mosacing

N-Views (1) Homographies and Projection

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

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Transformations. Examples of transformations: shear. scaling

Geometric Model of Camera

Computer Graphics. Geometric Transformations

CS770/870 Spring 2017 Transformations

Image warping and stitching

Image Transformations

Editing and Transformation

Image warping and stitching

Geometric Image Transformations and Related Topics

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

Computer Graphics. Geometric Transformations

Image Metamorphosis By Affine Transformations

Two Dimensional Viewing

EE795: Computer Vision and Intelligent Systems

Limitations of Thresholding

Homogeneous Coordinates

Computer Vision Lecture 20

CS559: Computer Graphics

What and Why Transformations?

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

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

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

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

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

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

Transformations III. Week 2, Fri Jan 19

CS F-07 Objects in 2D 1

Prof. Kristen Grauman

Transforms. COMP 575/770 Spring 2013

Systems of Linear Equations

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

Perspective Projection Transformation

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

Announcements. Equation of Perspective Projection. Image Formation and Cameras

Image warping and stitching

Introduction to Computer Vision

EECS 556 Image Processing W 09

Image Warping and Morphing. Alexey Tikhonov : Computational Photography Alexei Efros, CMU, Fall 2007

Vector Algebra Transformations. Lecture 4

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

Announcements. Mosaics. How to do it? Image Mosaics

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

More on Transformations. COS 426, Spring 2019 Princeton University

CSCI-4530/6530 Advanced Computer Graphics

Image Warping and Morphing. Alexey Tikhonov

CSCI-4530/6530 Advanced Computer Graphics

Image Warping and Morphing. Alexey Tikhonov

4. Two Dimensional Transformations

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

Mosaics. Today s Readings

3D Coordinates & Transformations

Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem

1-1. Functions. Lesson 1-1. What You ll Learn. Active Vocabulary. Scan Lesson 1-1. Write two things that you already know about functions.

Lecture 4: Viewing. Topics:

Transcription:

Image Warping CSE399b, Spring 7 Computer Vision http://maps.a9.com http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html

http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html

Autostiching on A9.com images, Spruce street, Philadelphia

Image Warping Slides from 5-463: Computational Photograph Aleei Efros, CMU, Fall 25 Some slides from Steve Seitz

Image Warping 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 Warping 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: translatio n 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 T as a matri: p M*p 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 (, ) (, ) cos() - sin() sin() + cos()

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

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

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 e d b g f i h k j l

Linear Transformations as Change of Basis j (,) v (v,v ) p p i (,) p4i+3j (4,3) p 4u+3v u v 4 u v p p u v 3 u v An linear transformation is a basis What s the inverse transform? How can we change from an basis to an basis? What if the basis are orthogonal? u(u,u ) p 4u +3v p 4u +3v

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

Homogeneous Coordinates Homogeneous coordinates represent coordinates in 2 dimensions with a 3-vector homogeneou scoords (

Homogeneous Coordinates Q: 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

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

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

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

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

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

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

Image warping T(,) f(,) g(,) Given a coordinate transform (, ) h(,) and a source image f(,), how do we compute a transformed image g(, ) f(t(,))?

Forward warping T(,) f(,) g(,) Send each piel f(,) to its corresponding location (, ) T(,) in the second image Q: what if piel lands between two piels?

Forward warping T(,) f(,) g(,) Send each piel f(,) to its corresponding location (, ) T(,) in the second image Q: what if piel lands between two piels? A: distribute color among neighboring piels (, ) Known as splatting

Inverse warping T - (,) f(,) g(,) Get each piel g(, ) from its corresponding location (,) T - (, ) in the first image Q: what if piel comes from between two piels?

Inverse warping T - (,) f(,) g(,) Get each piel g(, ) from its corresponding location (,) T - (, ) in the first image Q: what if piel comes from between two piels? A: Interpolate color value from neighbors nearest neighbor, bilinear, Gaussian, bicubic

Bilinear interpolation Sampling at f(,):

Forward vs. inverse warping Q: which is better? A: usuall inverse eliminates holes however, it requires an invertible warp function not alwas possible...