Lecture 15: Transforms and Alignment CS4670/5670: Computer Vision Kavita Bala.

Slides:



Advertisements
Similar presentations
CS 691 Computational Photography Instructor: Gianfranco Doretto Image Warping.
Advertisements

Lecture 11: Transformations CS4670/5760: Computer Vision Kavita Bala.
CS4670: Computer Vision Kavita Bala Lecture 10: Feature Matching and Transforms.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
Announcements Project 1 artifact voting ( announce later today) Project 2 out today (help session at end of class) IMPORTANT: choose Proj 2 partner.
Lecture 8: Geometric transformations CS4670: Computer Vision Noah Snavely.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2008 Some slides from Steve Seitz
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2005 Some slides from Steve Seitz
Lecture 7: Image Alignment and Panoramas CS6670: Computer Vision Noah Snavely What’s inside your fridge?
Lecture 6: Image transformations and alignment CS6670: Computer Vision Noah Snavely.
Lecture 9: Image alignment CS4670: Computer Vision Noah Snavely
Announcements Project 2 out today panorama signup help session at end of class Today mosaic recap blending.
Announcements Project 1 artifact voting Project 2 out today panorama signup help session at end of class Guest lectures next week: Li Zhang, Jiwon Kim.
Lecture 6: Image Warping and Projection CS6670: Computer Vision Noah Snavely.
Optical Flow Estimation
Image Warping and Mosacing : Rendering and Image Processing Alexei Efros …with a lot of slides stolen from Steve Seitz and Rick Szeliski.
Announcements Project 1 Grading session this afternoon Artifacts due Friday (voting TBA) Project 2 out (online) Signup for panorama kits ASAP (weekend.
Announcements Project 1 artifact voting Project 2 out today (help session at end of class)
Image warping/morphing Digital Video Special Effects Fall /10/17 with slides by Y.Y. Chuang,Richard Szeliski, Steve Seitz and Alexei Efros.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/27/11 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
Announcements Midterm due Friday, beginning of lecture Guest lecture on Friday: Antonio Criminisi, Microsoft Research.
Image Stitching Ali Farhadi CSE 455
Image Warping (Szeliski 3.6.1) cs129: Computational Photography James Hays, Brown, Fall 2012 Slides from Alexei Efros and Steve Seitz
Warping CSE 590 Computational Photography Tamara Berg.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/24/15 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/23/10 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
Projective geometry ECE 847: Digital Image Processing Stan Birchfield Clemson University.
Mosaics Today’s Readings Szeliski, Ch 5.1, 8.1 StreetView.
Computational Photography Derek Hoiem, University of Illinois
Image Warping and Morphing cs195g: Computational Photography James Hays, Brown, Spring 2010 © Alexey Tikhonov.
Advanced Multimedia Warping & Morphing Tamara Berg.
CS559: Computer Graphics Lecture 8: Warping, Morphing, 3D Transformation Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Image Morphing Computational Photography Derek Hoiem, University of Illinois 9/29/15 Many slides from Alyosha Efros.
Multimedia Programming 07: Image Warping Keyframe Animation Departments of Digital Contents Sang Il Park.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Recap from Monday DCT and JPEG Point Processing Histogram Normalization Questions: JPEG compression levels Gamma correction.
Computer Vision – Sampling Hanyang University Jong-Il Park.
Image Warping Many slides from Alyosha Efros + Steve Seitz + Derek oeim Photo by Sean Carroll.
Example: warping triangles Given two triangles: ABC and A’B’C’ in 2D (12 numbers) Need to find transform T to transfer all pixels from one to the other.
CS559: Computer Graphics Lecture 7: Image Warping and Panorama Li Zhang Spring 2008 Most slides borrowed from Yungyu ChuangYungyu Chuang.
CS559: Computer Graphics Lecture 7: Image Warping and Morphing Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Lecture 14: Feature matching and Transforms CS4670/5670: Computer Vision Kavita Bala.
Image Stitching Computer Vision CS 691E Some slides from Richard Szeliski.
Image Warping 2D Geometric Transformations
Lecture 10: Image alignment CS4670/5760: Computer Vision Noah Snavely
Computer Graphics Lecture 15 Fasih ur Rehman. Last Class Combining Transformations Affine versus Rigid body Transformations Homogenous Transformations.
Image warping/morphing Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2005/3/15 with slides by Richard Szeliski, Steve Seitz and Alexei Efros.
Lecture 16: Image alignment
3. Transformation
COSC579: Image Align, Mosaic, Stitch
Homogeneous Coordinates (Projective Space)
Image Warping (Szeliski Sec 2.1.2)
Lecture 7: Image alignment
Image Warping (Szeliski Sec 2.1.2)
Image warping/morphing
Image Warping : Computational Photography
Image Stitching Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi.
CSCE 441: Computer Graphics Image Warping
Recap from Friday Image Completion Synthesis Order Graph Cut Scene Completion.
Lecture 3: Camera Rotations and Homographies
Announcements Project 2 out today (help session at end of class)
Image Warping : Computational Photography
2D transformations (a.k.a. warping)
Image Stitching Computer Vision CS 678
Image Warping (Szeliski Sec 2.1.2)
Transformations 2 University of British Columbia
Image Stitching Linda Shapiro ECE/CSE 576.
Image Stitching Linda Shapiro ECE P 596.
Geometric Transformations
Presentation transcript:

Lecture 15: Transforms and Alignment CS4670/5670: Computer Vision Kavita Bala

Reading Szeliski: Chapter 6.1, 3.6 Updated HW 1: Q (2) Also read FAQ

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

Basic affine transformations Translate 2D in-plane rotationShear Scale

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

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

Projective Transformations Under perspective projection, parallel lines can map to lines that intersect. Therefore, this cannot be modeled by an affine transform! Projective transformations are a more general family which includes affine transforms and perspective projections Projective transformations are linear transformations using homogeneous coordinates

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

Projective Transformations aka Homographies aka Planar Perspective Maps Called a homography (or planar perspective map)

Why do we care? What is the relation between a plane in the world and a perspective image of it? Can we reconstruct another view from one image? Relation between pairs of images – Need to make a mosaic

Plane projection in drawing [CS 417 Spring 2002] 13

14 Masaccio, Trinity, Florence

Perspective projection similar triangles: 15

Homogeneous coordinates revisited Perspective requires division – that is not part of affine transformations – in affine, parallel lines stay parallel therefore no vanishing point “True” purpose of homogeneous coords: projection

Perspective projection to implement perspective, just move z to w: 17

Cornell CS4620 Fall 2015 Homogeneous coordinates revisited Introduced w = 1 coordinate as a placeholder – used as a convenience for unifying translation with linear Now allow arbitrary w 18 © 2015 Kavita Bala w/ prior instructor Steve Marschner

Homographies

What happens when the denominator is 0?

Points at infinity

Implications of w All scalar multiples of a 4-vector are equivalent When w is not zero, can divide by w – therefore these points represent “normal” affine points When w is zero, it’s a point at infinity, a.k.a. a direction – this is the point where parallel lines intersect – can also think of it as the vanishing point Projective space

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

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

Image Warping Given a coordinate xform (x’,y’) = T(x,y) and a source image f(x,y), how do we compute an xformed image g(x’,y’) = f(T(x,y))? f(x,y)g(x’,y’) xx’ T(x,y) y y’

Forward Warping Send each pixel f(x) to its corresponding location (x’,y’) = T(x,y) in g(x’,y’) f(x,y)g(x’,y’) xx’ T(x,y) y y’

Forward Warping Send each pixel f(x,y) to its corresponding location x’ = h(x,y) in g(x’,y’) f(x,y)g(x’,y’) xx’ T(x,y) What if pixel lands “between” pixels? Answer: add “contribution” to several pixels, normalize later (splatting) Problem? Can still result in holes y y’

Inverse Warping Get each pixel g(x’,y’) from its corresponding location (x,y) = T -1 (x,y) in f(x,y) f(x,y)g(x’,y’) xx’ T -1 (x,y) Requires taking the inverse of the transform What if pixel comes from “between” pixels? y y’

Inverse Warping Get each pixel g(x’) from its corresponding location x’ = h(x) in f(x) What if pixel comes from “between” two pixels? Answer: resample color value from interpolated (prefiltered) source image f(x,y)g(x’,y’) xx’ y y’ T -1 (x,y)

Interpolation Possible interpolation filters: – nearest neighbor – bilinear – bicubic (interpolating) Needed to prevent “jaggies” and “texture crawl” (with prefiltering)