1 / 82

Geometric Transformation & Projective Geometry

Geometric Transformation & Projective Geometry. by: Diako Mardanbegi, PhD student. Transformation and Projective Geometry. Computer Vision: Relative movement of a camera Object locations wrt . Camera Graphics Describe objects and cameras in a scene and how they should move in 3D scene.

stacy
Download Presentation

Geometric Transformation & Projective 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. Geometric Transformation &Projective Geometry by: Diako Mardanbegi, PhD student

  2. Transformation and Projective Geometry • Computer Vision: • Relative movement of a camera • Object locations wrt. Camera • Graphics • Describe objects and cameras in a scene and how they should move in 3D scene. • User interfaces (like WPF) relies heavy placing components relative to each other (2D) and for its 3D graphics engine.

  3. Outline • 2-D Transformations • Representing Transformations • Homogeneous form • Multiple frames • Cartesian Coordinate System • Describe a local frame • Orientation • Translation • Mapping between multiple frames • 3-D Transformations • Euler angles • Quaternion • Projective coordinate system • Homography

  4. 2-D Translation y x

  5. 2-D Translation

  6. 2-D Rotation about the origin

  7. 2-D Rotation about the origin a b  Rotation about the origin

  8. 2-D Rotation about the origin a b  Rotation about the origin

  9. 2-D Rotation about a specified point

  10. 2-D Rotation about a specified point a d o’ o’ b  c o’ Rotation about a specified point

  11. 2-D Scaling relative to the origin Vertical shift proportional to vertical position Horizontal shift proportional to Horizontal position

  12. 2-D Scaling relative to the origin a b Scaling relative to the origin

  13. 2-D Scaling relative to a specified point Scaling relative to a specified point

  14. Representing transformations , , , • Trick of additional coordinate makes this possible to express all transformations in a common linear form • Old way: • Cartesian coordinates • New way: • With additional coordinate (Homogeneous coordinates)

  15. Representing transformations homogeneous transformation: linear transformation of homogeneous coordinates x‘ = H x In homogeneous form In homogeneous form

  16. from Cartesian coordinates to Homogeneous coordinates • from Homogeneous coordinates to Cartesian coordinates

  17. Advantages • Easy to compose multiple transformations after each other • Combination of all transformations into a single matrix

  18. Advantages a d • for example :General 2-D Pivot-Point Rotation o’ o’ b  c o’

  19. Inverse of transformations • Easy to invert

  20. Transformations Don’t Commute a b 

  21. Transformations Don’t Commute a b 

  22. Other 2-D transformations • Reflection • Shear 2

  23. Homography matrix • Full-generality 3 x 3 homogeneous transformation

  24. Homography matrix • Full-generality 3 x 3 homogeneous transformation Translation components

  25. Homography matrix • Full-generality 3 x 3 homogeneous transformation Scale/rotation components

  26. Homography matrix • Full-generality 3 x 3 homogeneous transformation Shear/rotation components

  27. Homography matrix • Full-generality 3 x 3 homogeneous transformation Homogeneous scaling factor

  28. Homography matrix • Full-generality 3 x 3 homogeneous transformation When these are zero (as they have been so far), H is an affine transformation

  29. Why we are using only one fixed Cartesian system? • Why we don’t define a local coordinate system? a d o’ o’  o’  b c o’

  30. We can do it, but first know about: • What is exactly a cartesian coordinate system? • How to describe a local frame in a fixed frame? • How to express a point in each frame?

  31. Cartesian Coordinate System y-axis • A coordinate system in Rn is defined by an origin oand n orthogonal basis vectors • In R3, positive direction of each axis X, Y, Z is indicated by unit vector i, j, k • Let P = (x, y, z)T be a point in R3 • Coordinate is length of projection of vector from origin to point onto axis basis vector What do these values mean? . P j i x-axis k O ? z-axis

  32. Vector Projection • The projection of vector a onto u is that component of a in the direction of u

  33. Y’ Y . P X’ B X A

  34. Describe a local frame in a fixed frame A,B Y Y Y Y’ Y’ Y’ homogeneous form X’ X’ X’  X X X A,B : orientation of frame B relative to A B (x, y) : translation of frame B relative to A A

  35. Mapping from frame to frame Y’ Y . P X’ B A X A Mapping Transformation

  36. Transformation in3-Dimension

  37. Going from 2D to 3D • Vector cross product • Definition: If a=(xa, ya, za)T and b=(xb, yb, zb)T, then: c=ax b =(yazb-zayb, zaxb - xazb, xayb- yaxb)T • c is orthogonal to both aand b (direction given by right-hand r with magnitude k=ixj

  38. 3-D Translation P’ = T . P

  39. 3-D Scaling

  40. 3-D Rotation • In 2-D, we are always rotating in the plane of the image, but in 3-D the axis of rotation itself is a variable • Three canonical rotation axes are the coordinate axes X, Y, Z

  41. 3-D Rotation • Similar to 2-D rotation matrices, but with coordinate corresponding to rotation axis held constant

  42. 3-D Rotation • When object is to be rotated about an axis that is parallel to one of the coordinate axes

  43. 3-D Rotation Easiest way ?! • When an object is to be rotated about an axis that is not parallel to one of the coordinate axes

  44. Orientation in 3-D B A

  45. Hierarchy of frames +Yworld +Xworld +Zworld

  46. 3-D Camera Coordinates • Right-handed system • From point of view of camera looking out into scene: • +X right, -Xleft • +Ydown, -Y up • +Z in front of camera,-Zbehind

  47. +Yworld +Xworld +Zworld Creating a simple WPF 3D space with camera: http://www.codeproject.com/KB/WPF/Wpf3DPrimer.aspx

  48. Orientation in 3-D • in 2D we have 4 elements in orientation matrix but we can locate the local frame by having only one angle . (we know the axis) • in 3D we have 9 elements but how many angles do we need for locating the local frame in space? • only 3

  49. Euler’s Theorem Euler’s Theorem : “Any two independent orthonormal coordinate frames can be related by a sequence of rotations (not more than three) about coordinate axes, where no two successive rotations may be about the same axis”

  50. Z-Y-X Euler angles • Start with the frame coincident with a known frame {A}. Rotate {B} first about ZB by an angle , then about YBby an angle and, finally, about XB by an angle 

More Related