/
Image transformations and image warping Image transformations and image warping

Image transformations and image warping - PowerPoint Presentation

isabella2
isabella2 . @isabella2
Follow
65 views
Uploaded On 2023-11-04

Image transformations and image warping - PPT Presentation

CS5670 Computer Vision Reading Szeliski Chapter 36 Announcements Project 2 out due Thursday March 3 by 8pm Do be done in groups of 2 if you need help finding a partner try Ed Discussions or let us know ID: 1028466

image transformations pixel 2x2 transformations image 2x2 pixel affine linear represented matrix map inverse homogeneous transformation pixels imageg translation

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Image transformations and image warping" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1. Image transformations and image warpingCS5670: Computer Vision

2. ReadingSzeliski: Chapter 3.6

3. AnnouncementsProject 2 out, due Thursday, March 3 by 8pmDo be done in groups of 2 – if you need help finding a partner, try Ed Discussions or let us know

4. Image alignmentWhy don’t these image line up exactly?

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

6. ?What is the geometric relationship between these two images?

7. Very important for creating mosaics!First, we need to know what this transformation is.Second, we need to figure out how to compute it using feature matches.What is the geometric relationship between these two images?

8. Richard SzeliskiImage Stitching8Image Warpingimage filtering: change range of imageg(x) = h(f(x))image warping: change domain of imageg(x) = f(h(x))fxhgxfxhgx

9. Richard SzeliskiImage Stitching9Image Warpingimage filtering: change range of imageg(x) = h(f(x))image warping: change domain of imageg(x) = f(h(x))hhffgg

10. Richard SzeliskiImage Stitching10Parametric (global) warpingExamples of parametric warps:translationrotationaspect

11. Parametric (global) warpingTransformation T is a coordinate-changing machine: p’ = T(p)What does it mean that T is global?Is the same for any point pcan be described by just a few numbers (parameters)Let’s consider linear xforms (can be represented by a 2x2 matrix):Tp = (x,y)p’ = (x’,y’)

12. Common linear transformationsUniform scaling by s:(0,0)(0,0)What is the inverse?

13. Common linear transformationsRotation by angle θ (about the origin)(0,0)(0,0)What is the inverse?For rotations:θ

14. 2x2 MatricesWhat types of transformations can be represented with a 2x2 matrix?2D mirror across Y axis?2D mirror across line y = x?

15. 2x2 MatricesWhat types of transformations can be represented with a 2x2 matrix?2D mirror across Y axis?2D mirror across line y = x?

16. What types of transformations can be represented with a 2x2 matrix?2D Translation?2x2 Matrices

17. What types of transformations can be represented with a 2x2 matrix?2D Translation?Translation is not a linear operation on 2D coordinatesNO!2x2 Matrices

18. All 2D Linear TransformationsLinear transformations are combinations of …Scale,Rotation,Shear, andMirrorProperties of linear transformations:Origin maps to originLines map to linesParallel lines remain parallelRatios are preservedClosed under composition

19. Homogeneous coordinatesTrick: add one more coordinate:homogeneous image coordinatesConverting from homogeneous coordinatesxyw(x, y, w)w = 1(x/w, y/w, 1)homogeneous plane

20. TranslationSolution: homogeneous coordinates to the rescue

21. Affine transformationsany transformation represented by a 3x3 matrix with last row [ 0 0 1 ] we call an affine transformation

22. Basic affine transformationsTranslate2D in-plane rotationShearScale

23. Affine transformations are combinations of …Linear transformations, andTranslationsProperties of affine transformations:Origin does not necessarily map to originLines map to linesParallel lines remain parallelRatios are preservedClosed under compositionAffine transformations

24. Is this an affine transformation?

25. Where do we go from here?affine transformationwhat happens when we mess with this row?

26. Projective Transformations aka Homographies aka Planar Perspective MapsCalled a homography (or planar perspective map)

27. HomographiesWhat happens when the denominator is 0?

28. Points at infinity

29. Image warping with homographiesimage plane in frontimage plane belowblack areawhere no pixelmaps to

30. Homographies

31. HomographiesHomographies …Affine transformations, andProjective warpsProperties of projective transformations:Origin does not necessarily map to originLines map to linesParallel lines do not necessarily remain parallelRatios are not preservedClosed under composition

32. Alternate formulation for homographieswhere the length of the vector [h00 h01 … h22] is 1

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

34. Implementing image warpingGiven a coordinate xform (x’,y’) = T(x,y) and a source image f(x,y), how do we compute a transformed image g(x’,y’) = f(T(x,y))?f(x,y)g(x’,y’)xx’T(x,y)yy’

35. Forward WarpingSend each pixel (x,y) to its corresponding location (x’,y’) = T(x,y) in g(x’,y’)xx’T(x,y)What if pixel lands “between” two pixels?yy’f(x,y)g(x’,y’)

36. Forward WarpingSend each pixel (x,y) to its corresponding location (x’,y’) = T(x,y) in g(x’,y’)xx’T(x,y)What if pixel lands “between” two pixels?Answer: add “contribution” to several pixels, normalize later (splatting)Can still result in holesyy’f(x,y)g(x’,y’)

37. Inverse WarpingGet each pixel g(x’,y’) from its corresponding location (x,y) = T-1(x,y) in f(x,y)xx’T-1(x,y)Requires taking the inverse of the transformWhat if pixel comes from “between” two pixels?yy’f(x,y)g(x’,y’)

38. Inverse WarpingGet each pixel g(x’,y’) from its corresponding location (x,y) = T-1(x’,y’) in f(x,y)What if pixel comes from “between” two pixels?Answer: resample color value from interpolated (prefiltered) source imagexx’yy’f(x,y)g(x’,y’)T-1(x,y)

39. InterpolationPossible interpolation filters:nearest neighborbilinearbicubicsincNeeded to prevent “jaggies” and “texture crawl” (with prefiltering)

40. Questions?