A geometric interpretation of the homogeneous coordinates is given in the following Figure.

Similar documents
Homogeneous Coordinates

Robotics - Homogeneous coordinates and transformations. Simone Ceriani

1. Projective geometry

Projective geometry and spacetime structure. David Delphenich Bethany College Lindsborg, KS USA

Lines and points. Lines and points

1 Overview. CS348a: Computer Graphics Handout #8 Geometric Modeling Original Handout #8 Stanford University Thursday, 15 October 1992

Exercises for Unit I (Topics from linear algebra)

Introduction. Chapter Points, Vectors and Coordinate Systems

COMP 175 COMPUTER GRAPHICS. Lecture 04: Transform 1. COMP 175: Computer Graphics February 9, Erik Anderson 04 Transform 1

Chapter 12. The cross ratio Klein s Erlanger program The projective line. Math 4520, Fall 2017

1.1 Single Variable Calculus versus Multivariable Calculus Rectangular Coordinate Systems... 4

Exercises for Unit I I (Vector algebra and Euclidean geometry)

Pose estimation from point and line correspondences

Study guide for Exam 1. by William H. Meeks III October 26, 2012

Computer Graphics MTAT Raimond Tunnel

Position and orientation of rigid bodies

Exercises for Unit I (Topics from linear algebra)

Math 302 Outcome Statements Winter 2013

Lecture 4: Affine Transformations. for Satan himself is transformed into an angel of light. 2 Corinthians 11:14

Multiple View Geometry in Computer Vision

ELEMENTARY LINEAR ALGEBRA

Course Summary Math 211

Camera Models and Affine Multiple Views Geometry

Lecture 8: Coordinate Frames. CITS3003 Graphics & Animation

Math 3108: Linear Algebra

Introduction and Vectors Lecture 1

Vectors Coordinate frames 2D implicit curves 2D parametric curves. Graphics 2008/2009, period 1. Lecture 2: vectors, curves, and surfaces

What you will learn today

(A B) 2 + (A B) 2. and factor the result.

CSE 167: Introduction to Computer Graphics Lecture #2: Linear Algebra Primer

Linear Algebra 1 Exam 2 Solutions 7/14/3

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Contents. 1 Vectors, Lines and Planes 1. 2 Gaussian Elimination Matrices Vector Spaces and Subspaces 124

web: HOMEWORK 1

Chapter 5. Linear Algebra. Sections A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

4.1 Distance and Length

ELEMENTARY LINEAR ALGEBRA

Winter 2017 Ma 1b Analytical Problem Set 2 Solutions

CSE 167: Introduction to Computer Graphics Lecture #2: Linear Algebra Primer

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Notes on multivariable calculus

Linear Algebra. Paul Yiu. 6D: 2-planes in R 4. Department of Mathematics Florida Atlantic University. Fall 2011

Analysis-3 lecture schemes

Lecture 4: Affine Transformations. for Satan himself is transformed into an angel of light. 2 Corinthians 11:14

Course Notes Math 275 Boise State University. Shari Ultman

The complex projective line

Conics and their duals

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p

Inverse differential kinematics Statics and force transformations

MATH 423/ Note that the algebraic operations on the right hand side are vector subtraction and scalar multiplication.

IDEAL CLASSES AND SL 2

Chapter 5. Linear Algebra. Sections A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

MTH501- Linear Algebra MCQS MIDTERM EXAMINATION ~ LIBRIANSMINE ~

Vector Geometry. Chapter 5

Slope Fields and Differential Equations. Copyright Cengage Learning. All rights reserved.

Equality: Two matrices A and B are equal, i.e., A = B if A and B have the same order and the entries of A and B are the same.

11.1 Three-Dimensional Coordinate System

MORE EXERCISES FOR SECTIONS II.1 AND II.2. There are drawings on the next two pages to accompany the starred ( ) exercises.

Reading. 4. Affine transformations. Required: Watt, Section 1.1. Further reading:

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

University of Alberta. Math 214 Sample Exam Math 214 Solutions

Matrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices

Finite affine planes in projective spaces

Intro Vectors 2D implicit curves 2D parametric curves. Graphics 2011/2012, 4th quarter. Lecture 2: vectors, curves, and surfaces

Distance Formula in 3-D Given any two points P 1 (x 1, y 1, z 1 ) and P 2 (x 2, y 2, z 2 ) the distance between them is ( ) ( ) ( )

Linear and affine transformations

Introduction to Linear Algebra, Second Edition, Serge Lange

Linear Algebra. Workbook

Implicit Functions, Curves and Surfaces

Projective Geometry Lecture Notes

Fractions, Projective Representation, Duality, Linear Algebra and Geometry

Linear Algebra. Preliminary Lecture Notes

Part II. Geometry and Groups. Year

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra /34

LS.1 Review of Linear Algebra

II. DIFFERENTIABLE MANIFOLDS. Washington Mio CENTER FOR APPLIED VISION AND IMAGING SCIENCES

Robotics & Automation. Lecture 17. Manipulability Ellipsoid, Singularities of Serial Arm. John T. Wen. October 14, 2008

Spring, 2006 CIS 610. Advanced Geometric Methods in Computer Science Jean Gallier Homework 1

ELEMENTARY LINEAR ALGEBRA

Multi-Frame Factorization Techniques

Linear Algebra March 16, 2019

MCE/EEC 647/747: Robot Dynamics and Control. Lecture 2: Rigid Motions and Homogeneous Transformations

Math Linear Algebra II. 1. Inner Products and Norms

Math Camp II. Basic Linear Algebra. Yiqing Xu. Aug 26, 2014 MIT

Math 118, Fall 2014 Final Exam

Extra Problems for Math 2050 Linear Algebra I

homogeneous 71 hyperplane 10 hyperplane 34 hyperplane 69 identity map 171 identity map 186 identity map 206 identity matrix 110 identity matrix 45

MockTime.com. (b) (c) (d)

Linear Algebra: Homework 3

Lecture 16: Projection and Cameras. October 17, 2017

Linear Algebra Homework and Study Guide

Vector and Affine Math

VECTORS AND THE GEOMETRY OF SPACE

1. Let m 1 and n 1 be two natural numbers such that m > n. Which of the following is/are true?

1 Euclidean geometry. 1.1 The metric on R n

Linear Algebra & Geometry why is linear algebra useful in computer vision?

2D Geometric Transformations. (Chapter 5 in FVD)

Vector Spaces. Addition : R n R n R n Scalar multiplication : R R n R n.

Synthetic Geometry. 1.4 Quotient Geometries

Mobile Robotics 1. A Compact Course on Linear Algebra. Giorgio Grisetti

Transcription:

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. p 2 T its homoge- Given a point p in R 2, represented as P = (p 1, p 2 ), i.e., the vector p = p 1 neous representation (using homogeneous coordinates) is p = p 1 p 2 p 3 T ; with T not allowed 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 A geometric interpretation of the homogeneous coordinates is given in the following Figure. Figure 1: Geometric interpretation of homogeneous coordinates. 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, we can represents points at infinity, along a well defined direction. The set of all points at infinity represents the line at infinity. Figure 2: Points at. 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 = p 1 p 2 p 3 T

its homogeneous representation is p = p 1 p 2 p 3 p 4 T 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. 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 while in the second case ṽ ab = ṽ p = vp 1 vb va = 1 1 vab Not all textbooks adhere to this convention, since in this case the sum of two geometric vectors produces v ṽ p + ṽ q = 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). Figure 3: Homogeneous sum of two geometric vectors. 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). 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) = T 1 since v R t Hṽ = = Rv + t T 1 1 2

Figure 4: Linear and affine subspaces. 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 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., Rab t ab Rbc t bc Rab R bc R ab t bc + t ab = T 1 T 1 T 1 Often it is convenient to write the time derivative of a homogeneous vector as p = ṗ 1 ṗ2 This notation will prove useful when dealing with twists. ṗ3 Introduction to projective/perspective geometry n. Homogeneous coordinates p are used for describing point in projective spaces P n of dimension Two points ã and b are equal (ã b) if there exist a real λ such that ã = λ b b λ b collinear points are equal this also means that vectors are equal up to a scale factor. We say that ã and 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 point P,p = x y z T. The ray of light intercepts the image plane in the 2D image point P i, whose homogeneous coordinates on the image plane are where f is the focal distance p i = x y f p i = T x/f = 1 T x y/f f y 3

Figure 5: Example of projection through a pinhole camera. Considering the similar triangles in Figure, we have: x f = X Z ; y f = Y 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 y/f i = fy λ y y Z 1 f and every 3D point with homogeneous coordinates λx y f T is projected onto the same point p i of the image plane π. Notice that the above transformation is a nonlinear one. 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 Y p fy λ y = f Z λ p i = P 1 Z 1 1 }{{} 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 4

Figure 6: Examples of different mappings. Hyperplanes A hyperplane in R n is defined by the equation between a set of points p i and a set of (real) coefficients l i l 1 p 1 + l 2 p 2 + + l n p n + l n+1 = Using the homogeneous coordinates we obtain an homogeneous linear equation in P n where l = l 1. l n l n+1 lt p = ; p = p 1. p n1 The two homogeneous vectors can exchange their roles; we say that they are dual. 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 df(p(t)) dt = p φ(p)ṗ(t) is a dual vector wrt ṗ. Another dual vector is the divergence p = p 1 p n T p 1. p n 5

or the Laplacian (gradient of the divergence) 2 f = f = p 1 f T p 1 p n. f p n 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. A collineation given by a full rank matrix T transforms points as A hyperplane l T b p b = is transformed as p a = T ab p b lt b p b = l T a p a = hence yielding lt a T ab p b l T b = l T a T ab la = T ab T lt b Matrix T ab T is called the dual of T ab Comparing this last equation with the first one, we conclude that points and lines can be transformed, but using different (dual) collineation matrices T ab and T ab T. Points and lines We restrict our analysis on the 2D projective space P 2 ; for the sake of clarity, we drop the sign on top of the homogeneous vectors, i.e., ã is now indicated as a. A line l = l 1 l 2 l 3 can be characterized by three parameters: 1. the slope l 1 /l 2 2. the x-intercept l 3 /l 1 3. the y-intercept l 3 /l 2 Points p and lines l are related by l T p = in the sense that a point is on a line or a line include a point iff the previous relation holds. Duality 6

A line l passing for two points p 1 and p 2 is defined as l = p 1 p 2 = S(p 1 )p 2 A point p belonging to two lines (intercept) l 1 and l 2 is defined as p = l 1 l 2 = S(l 1 )l 2 Points at infinity or ideal points have the following representation p = p 1 p 2 T All ideal points lie on the ideal line, represented by l = 1 T Three points p 1,p 2,p 3 lie on the same line (they are collinear) iff det p 1 p 2 p 3 = Since the duality principle holds, three lines l 1, l 2, l 3 meet at the same point (they are concurrent) iff detl 1 l 2 l 3 = Parallelism Two lines m = m1 m 2 m 3 ; n = are parallel when the intersection point is at infinity, i.e., p = m n = p1 p 2 n1 This reduces to the conditions m 1 = n 1 m1 n or det 1 = m 2 n 2 m 2 n 2 p1 The direction k points toward the point at infinity. p 2 n 2 n 3 Summary point p = p 1 p 2 p 3 T line l = l 1 l 2 l 3 T incidence p T l = incidence l T p = line l = p 1 p 2 point p = l 1 l 2 collinearity detp 1 p 2 p 3 = collinearity detl 1 l 2 l 3 = point p 1 p 2 T line l 3 T 7

Transformations in P 2 The generic projective transformation (also called homographies) in P 2 is represented by a non singular 3 3 matrix (acting on homogeneous vectors), whose elements are t11 t 12 t 13 T = t 21 t 22 t 23 t 31 t 32 t 33 Since the transformations are equivalent up to a scale factor, the number of dof in T is 8. According to structural constraint, we have a hierarchy of transformations, from the most general to the least one; in particular Transformations in P 2 (most general) projective affine similarity Euclidean (rigid) The affine transformation must preserve the ideal line and the ideal points (as well as parallelism); hence, for any arbitrary scaling factor λ λ p1 p 2 = T p1 p 2 that implies T = t11 t 12 t 13 t 21 t 22 t 23 t 33 dof=6 The similarity transformation must preserve angles and ratios of lengths; that implies cosθ sinθ t13 T = sin θ cosθ t 23 dof=3 t 33 with t 33 1. The effects of the last column in T is to produce a shear i.e., a scale variation that is non uniform in all directions. The Euclidean (rigid) transformation must preserve also lengths; that implies cosθ sinθ t13 T = sin θ cosθ t 23 dof=3 1 Historical notes Homogeneous coordinates were introduced in 1827 by Möbius in the context of barycentric coordinates. Given a triangle, the barycentric coordinates of a point P are the weights required at the triangle vertices such that P become the center of gravity of the triangle. The point is computed as p = w a x w b y w c z T, with w a + w b + w c = 1 From homogeneous coordinates to quaternions There exist a link between homogeneous coordinates and quaternions that goes through the Möbius transformation. Given two complex numbers x = x 1 + jx 2, y = y 1 + jy 2 C, the ordered pair of complex numbers z = x y T C 2, z T 8

Figure 7: Example of barycentric coordinates. are the homogeneous coordinates of z = z 1 + jz 2 z = x y = z 1 + jz 2 = x 1 + jx 2 y 1 + jy 2 To every pair of complex numbers (x, y) a unique complex numbers z corresponds, while for every complex number z there is an infinite number of complex pairs (projective transformation). Transformation between homogeneous representations x u u a b x z = w = where = = y v v c d y where a, b, c, d are complex numbers. We can compute the transformed complex number as ax + by cx + dy w = u v ax + by = cx + dy = a x y + b c x y + d = az + b cz + d This is nothing else that the Möbius transformation. Möbius transformation w = az + b cz + d ; a, b, c, d, w, z C If we take a particular form of the Möbius transformation, due to Gauss: w = az + b b z + a we know that every rotation of the sphere can be expressed by a complex function as the one above, and we notice that it can be represented by the matrix of its coefficients a b α + jβ γ + jδ b a = γ + jβ α jβ 1 j 1 j = α + β + γ + δ 1 j 1 j = α1 + βi + γj + δk = a quaternion For further details see: T. Needham, Visual Complex Analysis, OUP, 1997. 9