geometric fundamentals in robotics homogeneous coordinates
play

Geometric Fundamentals in Robotics Homogeneous Coordinates Basilio - PowerPoint PPT Presentation

Geometric Fundamentals in Robotics Homogeneous Coordinates Basilio Bona DAUIN-Politecnico di Torino July 2009 Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 1 / 32 Introduction Homogeneous coordinates are an augmented


  1. Geometric Fundamentals in Robotics Homogeneous Coordinates Basilio Bona DAUIN-Politecnico di Torino July 2009 Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 1 / 32

  2. Introduction Homogeneous coordinates are an augmented representation of points and lines in R n spaces, embedding them in R n +1 , hence using n +1 parameters. This representation is useful in dealing with perspective and projective transformation (computer graphics, etc.) and for rigid displacement representation. We start introducing the concept on 2D spaces. Given a point p in R 2 , represented as P = ( p 1 , p 2 ), i.e., the vector � T its homogeneous representation (using homogeneous � p 1 p = p 2 coordinates) is � T ; 0 � T not allowed � ˜ � 0 p = ˜ ˜ ˜ with 0 p 1 p 2 p 3 The vector representation is obtained dividing the first n homogeneous components by the ( n + 1)-th, that is often called scale. p 1 = ˜ p 1 / ˜ p 3 ; p 2 = ˜ p 2 / ˜ p 3 Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 2 / 32

  3. A geometric interpretation of the homogeneous coordinates is given in the following Figure. Figure: Geometric interpretation of homogeneous coordinates. Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 3 / 32

  4. We embed the plane π : z = 1 in a 3D space and we consider the planar coordinates as the intersection of a projection line that goes through the origin of the RF { i , j , k } . As z goes to ∞ we can represent the origin, while as z goes to 0, we can represents points at infinity, along a well defined direction. The set of all points at infinity represents the line at infinity. Figure: Points at ∞ . Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 4 / 32

  5. The same approach is valid for 3D homogeneous coordinates: given a point p in R 3 , represented as P = ( p 1 , p 2 , p 3 ), or else by a vector � p 1 � T p = p 2 p 3 its homogeneous representation is � p 1 � T ˜ p = p 2 p 3 p 4 Hence p 1 = ˜ p 1 / ˜ p 4 ; p 2 = ˜ p 2 / ˜ p 4 ; p 3 = ˜ p 3 / ˜ p 4 In robotics it is common to set ˜ p 4 = 1. We will adhere to this convention. Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 5 / 32

  6. Some author treats differently the homogeneous representation of a point (geometric vector v p ) by that of an oriented segment (physical vector v ab ). In the first case � � v p ˜ v p = 1 while in the second case � � � � � � v b v a v ab v ab = ˜ − = 1 1 0 Not all textbooks adhere to this convention, since in this case the sum of two geometric vectors produces � � � � � � v p v q v p + v q v p + ˜ ˜ v q = + = 1 1 2 This sum, once transformed back in 3D space, becomes not the usual parallelogram sum of segments, but the midpoint of the parallelogram (see also Affine Spaces). Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 6 / 32

  7. Figure: Homogeneous sum of two geometric vectors. Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 7 / 32

  8. Affine spaces Briefly, affine spaces are spaces where the origin is not considered to be a special point, and homogeneous coordinates are used to characterize the affine elements (points and planes). Figure: Linear and affine subspaces. Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 8 / 32

  9. Rigid displacements and homogeneous coordinates Using homogeneous representation, the generic displacement ( R , t ) is given by the following homogeneous transformation matrix � � R t H ≡ H ( R , t ) = 0 T 1 since � � � � R t v H ˜ v = = Rv + t 1 0 T 1 Hence, the SE (3) group transformation g = ( R , t ) ∈ SE (3), is represented by the 4 × 4 homogeneous matrix H through the use of homogeneous coordinates: p a = g ab p b ↔ ˜ p a = H ab ( R ab , t ab )˜ p b Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 9 / 32

  10. Transformation composition g ab g bc is obtained by the homogeneous matrix product H ab ( R ab , t ab ) H bc ( R bc , t bc ) i.e., � � � � � � R ab t ab R bc t bc R ab R bc R ab t bc + t ab = 0 T 0 T 0 T 1 1 1 Often it is convenient to write the time derivative of a homogeneous vector as   ˙ p 1 p 2 ˙ ˙   ˜ p =   p 3 ˙ 0 This notation will prove useful when dealing with twists. Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 10 / 32

  11. Introduction to projective/perspective geometry Homogeneous coordinates ˜ p are used for describing point in projective spaces P n of dimension n . a and ˜ a ∼ ˜ Two points ˜ b are “equal” (˜ b ) if there exist a real λ � = 0 such that a = λ ˜ b ∼ λ ˜ ˜ ˜ b → b collinear points are equal this also means that vectors are equal up to a scale factor. a and ˜ We say that ˜ b belong to the same line, i.e., to the same affine subspace of R n +1 . Consider the planar (2D) projection through a pinhole camera of a 3D � x z � T . The ray of light intercepts the image plane in point P , p = y the 2D image point P i , whose homogeneous coordinates on the image plane are   x � � T � � T = 1 x / f x p i = ˜ y → p i =   y / f y f f where f is the focal distance Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 11 / 32

  12. Figure: Example of projection through a pinhole camera. Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 12 / 32

  13. Considering the similar triangles in Figure, we have: f = X x y f = Y Z ; Z If we set λ = Z / f , where f is known and the distance Z from π of the point p is unknown, we have X = λ x , Y = λ y , Z = λ f Hence, if we compute the cartesian coordinates of p i on π from homogeneous coordinates, we have       fX x x � � x / f  ∼ λ  ∼ p i = ↔ ˜ p i = fY y y     y / f Z 1 f f � T is � x and every 3D point with homogeneous coordinates λ y projected onto the same point p i of the image plane π . Notice that the above transformation is a nonlinear one. Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 13 / 32

  14. The nonlinear mapping R 3 → R 2 can be expressed as a (linear) matrix transformation between the homogeneous spaces R 4 → R 3 as   X       fX x f 0 0 0 � � Y p  ∼ λ  =   fY y 0 f 0 0 ⇔ λ ˜ p i = P      Z  1 1 0 0 1 0 Z 1 � �� � P Nonsingular (i.e., invertible) mappings between projective spaces are described by products of full rank square matrices T by homogeneous coordinates, ˜ p a = T ab ˜ p b An invertible mapping from P n onto itself preserves collinearities, i.e., if two points belong to a line, also the transformed points will belong to a line. Affine transformations preserve not only collinearities, but also parallelism between lines and ratios of distances. Similarity transformations preserves also angles, but not scales, while Euclidean (rigid) transformations preserve also scales Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 14 / 32

  15. Figure: Examples of different mappings. Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 15 / 32

  16. Hyperplanes A hyperplane in R n is defined by the equation between a set of points p i and a set of (real) coefficients ℓ i ℓ 1 p 1 + ℓ 2 p 2 + · · · + ℓ n p n + ℓ n +1 = 0 Using the homogeneous coordinates we obtain an homogeneous linear equation in P n T ˜ ˜ p = 0 ℓ where     ℓ 1 p 1 . . . .     ˜ . . ℓ =  ; p = ˜      ℓ n  p n  ℓ n +1 1 The two homogeneous vectors can exchange their roles; we say that they are dual. Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 16 / 32

  17. Remember that, given a vector p ∈ V ( F ), the set of all linear transformations f ( p ) : V �→ R 1 form another vector space V ∗ , and f ∈ V ∗ are called dual vectors or 1 − forms. For example, the total time derivative of a scalar function f ( p ) on R 3 is d f ( p ( t )) = ∇ p φ ( p )˙ p ( t ) d t is a dual vector wrt ˙ p . Another dual vector is the divergence   � ∂ p 1 � T ∂ . . ∇ · p = · · ·  .  ∂ p 1 ∂ p n p n or the Laplacian ( gradient of the divergence )   ∂ f � ∂ ∂ p 1   � T ∂ .   ∇ 2 f = ∇ · ∇ f = . · · ·   . ∂ p 1 ∂ p n   ∂ f   ∂ p n Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 17 / 32

  18. Duality in projective spaces The space of all hyperplanes in R n defines another perspective space, called the dual of the original P n Duality principle : for all projective results established using points and planes, a symmetrical result holds interchanging the role of planes and points. Example: two points define a line ↔ two lines define a point Notice that the projective plane P 2 whose point are defined by homogeneous coordinates, has more point that the usual R 2 plane, since it includes also points at ∞ . Basilio Bona (DAUIN-Politecnico di Torino) Rigid motions July 2009 18 / 32

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend