1 / 46

2-D Geometry

2-D Geometry. The Image Formation Pipeline. Outline. Vector, matrix basics 2-D point transformations Translation, scaling, rotation, shear Homogeneous coordinates and transformations Homography, affine transformation. Notes on Notation (a little different from book).

mab
Download Presentation

2-D Geometry

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 2-D Geometry

  2. The Image Formation Pipeline

  3. Outline • Vector, matrix basics • 2-D point transformations • Translation, scaling, rotation, shear • Homogeneous coordinates and transformations • Homography, affine transformation

  4. Notes on Notation (a little different from book) • Vectors, points: x, v (assume column vectors) • Matrices: R, T • Scalars: x, a • Axes, objects: X, Y, O • Coordinate systems: W, C • Number systems: R, Z • Specials • Transpose operator: xT (as opposed to x0) • Identity matrix: Id • Matrices/vectors of zeroes, ones: 0, 1

  5. Block Notation for Matrices • Often convenient to write matrices in terms of parts • Smaller matrices for blocks • Row, column vectors for ranges of entries on rows, columns, respectively • E.g.: If A is 3 x 3 and :

  6. 2-D Transformations • Types • Scaling • Rotation • Shear • Translation • Mathematical representation

  7. 2-D Scaling

  8. 2-D Scaling

  9. 2-D Scaling sx 1 Horizontal shift proportional to horizontal position

  10. 2-D Scaling sy 1 Vertical shift proportional to vertical position

  11. 2-D Scaling

  12. Matrix form of 2-D Scaling

  13. 2-D Scaling

  14. 2-D Rotation

  15. µ 2-D Rotation

  16. µ 2-D Rotation

  17. µ Matrix form of 2-D Rotation (this is a counterclockwise rotation; reverse signs of sines to get a clockwise one)

  18. µ Matrix form of 2-D Rotation

  19. 2-D Shear (Horizontal)

  20. 2-D Shear (Horizontal) Horizontal displacement proportional to vertical position

  21. 2-D Shear (Horizontal) (Shear factorh is positive for the figure above)

  22. 2-D Shear (Horizontal)

  23. 2-D Shear (Vertical)

  24. 2-D Translation

  25. 2-D Translation

  26. 2-D Translation

  27. 2-D Translation

  28. 2-D Translation

  29. 2-D Translation

  30. Representing Transformations • Note that we’ve defined translation as a vector addition but rotation, scaling, etc. as matrix multiplications • It’s inconvenient to have two different operations (addition and multiplication) for different forms of transformation • It would be desirable for all transformations to be expressed in a common, linear form (since matrix multiplications are linear transformations)

  31. Example: “Trick” of additional coordinate makes this possible • Old way: • New way:

  32. Translation Matrix • We can write the formula using this “expanded” transformation matrix as: • From now on, assume points are in this “expanded” form unless otherwise noted:

  33. Homogeneous Coordinates • “Expanded” form is called homogeneous coordinates or projective space • Technically, 2-D projective space P2 is defined as Euclidean space R3¡ (0, 0, 0)T • Change to projective space by adding a scale factor (usually but not always 1):

  34. Homogeneous Coordinates: Projective Space • Equivalence is defined up to scale, (non-zero for finite points) • Think of projective points in P2 as rays in R3, where z coordinate is scale factor • All Euclidean points along ray are “same” in this sense

  35. Leaving Projective Space • Can go back to non-homogeneous representation by dividing by scale factor and dropping extra coordinate: • This is the same as saying “Where does the ray intersect the plane defined by z = 1”?

  36. Homogeneous Coordinates: Rotations, etc. • A 2-D rotation, scaling, shear or other transformation normally expressed by a 2 x 2 matrix R is written in homogeneous coordinates with the following 3 x 3 matrix: • The non-commutativity of matrix multiplication explains why different transformation orders give different results—i.e., RT  TR In homogeneous form In homogeneous form

  37. Example: Transformations Don’t Commute

  38. Example: Transformations Don’t Commute

  39. Example: Transformations Don’t Commute

  40. Example: Transformations Don’t Commute

  41. 2-D Transformations • Full-generality 3 x 3 homogeneous transformation is called a homography

  42. 2-D Transformations • Full-generality 3 x 3 homogeneous transformation is called a homography Translation components

  43. 2-D Transformations • Full-generality 3 x 3 homogeneous transformation is called a homography Scale/rotation components

  44. 2-D Transformations • Full-generality 3 x 3 homogeneous transformation is called a homography Shear/rotation components

  45. 2-D Transformations • Full-generality 3 x 3 homogeneous transformation is called a homography Homogeneous scaling factor

  46. 2-D Transformations • Full-generality 3 x 3 homogeneous transformation is called a homography When these are zero (as they have been so far), H is an affine transformation

More Related