Lecture 11: Transformations CS4670/5760: Computer Vision Kavita Bala.

Slides:



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

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.
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
Lecture 12: Image alignment CS4670/5760: Computer Vision Kavita Bala
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.
Graphics Graphics Korea University cgvr.korea.ac.kr 2D Geometric Transformations 고려대학교 컴퓨터 그래픽스 연구실.
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.
Autonomous Navigation for Flying Robots Lecture 2.2: 2D Geometry
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/23/10 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
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.
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.
Lecture 15: Transforms and Alignment 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
Image warping/morphing Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2005/3/15 with slides by Richard Szeliski, Steve Seitz and Alexei Efros.
CS4670 / 5670: Computer Vision Kavita Bala Lecture 20: Panoramas.
3. Transformation
Image warping/morphing
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 11: Transformations CS4670/5760: Computer Vision Kavita Bala

Announcements HW 1 FAQ pinned on Piazza PA 1 Artifacts – Soon voting will be set up. Please vote PA 2 out this weekend – Will present in class on Monday Next Friday: in class review Prelim: Mar 5, Thu, 7:30pm – Call Auditorium, Kennedy Hall

Reading Szeliski: Chapter 6.1, 3.6

What is the geometric relationship between these two images? ? Answer: Similarity transformation (translation, rotation, uniform scale)

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

Homogeneous coordinates Trick: add one more coordinate: homogeneous image coordinates Converting from homogeneous coordinates x y w (x, y, w) w = 1 (x/w, y/w, 1) homogeneous plane

Translation Solution: homogeneous coordinates to the rescue

Affine transformations any transformation with last row [ ] we call an affine transformation

Basic affine transformations Translate 2D in-plane rotationShear Scale

Affine Transformations 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

Euclidean: translation, rotation, reflection Similarity: translation, rotation, uniform scale, reflection Affine: linear transformations + translation

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

Homographies

Reading Szeliski: Chapter 3.6

Is this an affine transformation?

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

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

Homographies

Recap of 4620

Plane projection in drawing [CS 417 Spring 2002] 23

Perspective projection similar triangles: (y’, f) (x’, y’, w’) = (fx, fy, z) x’ = fx/z, y’ = fy/z

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 28

29 Masaccio, Trinity, Florence

Consider a line through point (a, b) with slope m x’ = a + m t (line through a along direction m) if t = 1/w; x’ = (a w + m)/w In homogeneous coordinates (aw+m, w) At w = 0, point at infinity (m,0) represents line with slope m 31

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) – sinc Needed to prevent “jaggies” and “texture crawl” (with prefiltering)