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

Similar documents
Prof. Feng Liu. Winter /05/2019

Image warping/morphing

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

Image Warping. Some slides from Steve Seitz

Image Warping CSE399b, Spring 07 Computer Vision

Last Lecture. Edge Detection. Filtering Pyramid

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/morphing

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

CS4670: Computer Vision

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

How is project #1 going?

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

Warping, Morphing and Mosaics

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

Modeling Transformations

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

Warping. 12 May 2015

Modeling Transformations

Editing and Transformation

Image Transformations

CS 335 Graphics and Multimedia. Geometric Warping

Scene Graphs & Modeling Transformations COS 426

Modeling Transformations

Modeling Transformations

Transformations II. Week 2, Wed Jan 17

Modeling Transformations

Affine and Projective Transformations

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations

Photo by Carl Warner

3D Geometry and Camera Calibration

The aim is to find an average between two objects Not an average of two images of objects but an image of the average object!

Limitations of Thresholding

Multi-stable Perception. Necker Cube

Image Morphing. CSC320: Introduction to Visual Computing Michael Guerzhoy. Many slides borrowed from Derek Hoeim, Alexei Efros

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

Image Morphing. Michael Kazhdan ( /657) HB Ch Feature Based Image Metamorphosis, Beier and Neely 1992

Image warping/morphing

Image Metamorphosis By Affine Transformations

What and Why Transformations?

Transformations. Examples of transformations: shear. scaling

Image Morphing. Application: Movie Special Effects. Application: Registration /Alignment. Image Cross-Dissolve

3-Dimensional Viewing

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

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

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

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

CS559: Computer Graphics

Must first specify the type of projection desired. When use parallel projections? For technical drawings, etc. Specify the viewing parameters

Geometric Image Transformations and Related Topics

CSCI-4530/6530 Advanced Computer Graphics

Image Warping and Morphing

Image warping Li Zhang CS559

4. Two Dimensional Transformations

The 3-D Graphics Rendering Pipeline

But First: Multi-View Projective Geometry

Two Dimensional Viewing

CSCI-4530/6530 Advanced Computer Graphics

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

CS770/870 Spring 2017 Transformations

Geometric Model of Camera

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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

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

Specification and Computation of Warping and Morphing Transformations. Bruno Costa da Silva Microsoft Corp.

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

Homogeneous Coordinates

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

Transformations III. Week 2, Fri Jan 19

Lecture 7: Image Morphing. Idea #2: Align, then cross-disolve. Dog Averaging. Averaging vectors. Idea #1: Cross-Dissolving / Cross-fading

Interactive Deformation with Triangles

Perspective Projection Transformation

Image Morphing. The user is responsible for defining correspondences between features Very popular technique. since Michael Jackson s clips

CS Computer Graphics: Transformations & The Synthetic Camera

Matrix Transformations. Affine Transformations

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

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

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

Chapter 3 : Computer Animation

Introduction to Computer Vision

[ ] [ ] Orthogonal Transformation of Cartesian Coordinates in 2D & 3D. φ = cos 1 1/ φ = tan 1 [ 2 /1]

Announcements. Equation of Perspective Projection. Image Formation and Cameras

Image Warping, Compositing & Morphing

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

CS F-07 Objects in 2D 1

Transforms. COMP 575/770 Spring 2013

Transformations using matrices

Broad field that includes low-level operations as well as complex high-level algorithms

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

Vector Algebra Transformations. Lecture 4

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

Image Warping and Morphing. Alexey Tikhonov

Parallelization. Memory coherency helps when distributing rays to various threads/processors

Image Warping and Morphing

CS4670: Computer Vision

GEOMETRIC TRANSFORMATIONS AND VIEWING

Input Nodes. Surface Input. Surface Input Nodal Motion Nodal Displacement Instance Generator Light Flocking

Transcription:

Image warping

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

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) 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: f g 2 2 2

Scaling Non-uniform scaling: different scalars per component: component: g f 2 5 0. 2, 0.5

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

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

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

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

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

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

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

Translation Eample of translation Homogeneous Coordinates 1 1 1 0 0 1 0 0 1 1 t t t t 1 1 1 0 0 1 t = 2 t = 1

Affine Transformations Affine transformations are combinations of Li f i d 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 f d c b a Models change of basis w f e d w 1 0 0

Projective Transformations Projective transformations Affine transformations, and Projective warps Properties of projective transformations: ti 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

Image warping Given a coordinate transform = T() and a source image I(), how do we compute a transformed image I ( ) =I(T())? T() I() I ( ) )

Forward warping Send each piel I() to its corresponding location = T() in I ( ) T() I() I ( ) )

Inverse warping Get each piel I ( ) from its corresponding location = T -1 ( ) in I() T -1 ( ) I() I ( ) )

Non-parametric image warping Specif a more detailed warp function Splines, meshes, optical flow (per-piel motion)

Non-parametric image warping Mappings implied b correspondences Inverse warping? P

Non-parametric image warping P w A A w B B w C C P w A A w B B w C C Barcentric coordinate P P

Barcentric coordinates P t t A 1 1 1 t 2 t 3 t 2 A 1 2 t 3 A 3

Non-parametric image warping P w A A w B B w C C P w A A w B B w C C Barcentric coordinate

Image morphing

Image morphing The goal is to snthesize a fluid transformation from one image to another. Cross dissolving is a common transition between cuts, but it is not good for morphing because of the ghosting effects. image #1 dissolving i image #2

Image morphing Wh ghosting? Morphing = warping + cross-dissolving i shape (geometric) color (photometric)

Image morphing image #1 cross-dissolving image #2 warp morphing warp

Warp specification (mesh warping) How can we specif the warp? 1. Specif corresponding spline control points interpolate to a complete warping function eas to implement, but less epressive

Warp specification How can we specif the warp 2. Specif corresponding points interpolate to a complete warping function

Solution: convert to mesh warping 1. Define a triangular mesh over the points Same mesh in both images! Now we have triangle-to-triangle i l correspondences 2. Warp each triangle separatel from source to destination How do we warp a triangle? 3 points = affine warp! Just like teture mapping

Warp specification (field warping) How can we specif the warp? 3. Specif corresponding vectors interpolate to a complete warping function The Beier & Neel Algorithm

Beier&Neel (SIGGRAPH 1992) Single line-pair PQ to P Q :

Algorithm (single line-pair) For each X in the destination image: 1. Fi 1 Find d the th corresponding di u,v 2. Find X in the source image for that u,v 3 destinationimage(x) 3. d ti ti I (X) = sourceimage(x ) I (X ) Eamples: Affine transformation

Multiple Lines D i X i X i length = length of the line segment, dist = distance to line segment The influence of a, p, b. The same as the average of X i

Full Algorithm

Resulting warp

Results Michael Jackson s MTV Black or White