Lines and points. Lines and points

Similar documents
1. Projective geometry

Multiple View Geometry in Computer Vision

Robotics - Homogeneous coordinates and transformations. Simone Ceriani

Rotation of Axes. By: OpenStaxCollege

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

Camera Models and Affine Multiple Views Geometry

Conics and their duals

Math Bank - 6. What is the area of the triangle on the Argand diagram formed by the complex number z, -iz, z iz? (a) z 2 (b) 2 z 2

Camera: optical system

A Study of Kruppa s Equation for Camera Self-calibration

Homogeneous Coordinates

Statistical Geometry Processing Winter Semester 2011/2012

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

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

Mathematics 309 Conic sections and their applicationsn. Chapter 2. Quadric figures. ai,j x i x j + b i x i + c =0. 1. Coordinate changes

Linear Algebra (Review) Volker Tresp 2017

Geometric Modeling Summer Semester 2010 Mathematical Tools (1)

Properties of Matrices and Operations on Matrices

FILL THE ANSWER HERE

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

Linear Algebra Review. Vectors

Pose estimation from point and line correspondences

Introduction to Matrix Algebra

Introduction. Chapter Points, Vectors and Coordinate Systems

CS 4300 Computer Graphics. Prof. Harriet Fell Fall 2011 Lecture 11 September 29, 2011

Solutions to Problem Sheet for Week 11

8. Diagonalization.

Mathematics 1. Part II: Linear Algebra. Exercises and problems

LinGloss. A glossary of linear algebra

TBP MATH33A Review Sheet. November 24, 2018

1.72, Groundwater Hydrology Prof. Charles Harvey Lecture Packet #4: Continuity and Flow Nets

2. Review of Linear Algebra

Augmented Reality VU Camera Registration. Prof. Vincent Lepetit

4.2. ORTHOGONALITY 161

MAT1035 Analytic Geometry

APPM 1360 Final Exam Spring 2016

Review of Linear Algebra

Contents. Preface for the Instructor. Preface for the Student. xvii. Acknowledgments. 1 Vector Spaces 1 1.A R n and C n 2

Algorithms for Computing a Planar Homography from Conics in Correspondence

HIGHER SCHOOL CERTIFICATE EXAMINATION MATHEMATICS 4 UNIT (ADDITIONAL) Time allowed Three hours (Plus 5 minutes reading time)

GOVERNMENT OF KARNATAKA KARNATAKA STATE PRE-UNIVERSITY EDUCATION EXAMINATION BOARD SCHEME OF VALUATION. Subject : MATHEMATICS Subject Code : 35

Matrix & Linear Algebra

National Quali cations

Hyperbolic Geometry on Geometric Surfaces

Linear Algebra (Review) Volker Tresp 2018

Junior Seminar: Hyperbolic Geometry Lecture Notes

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

Single view metrology

APPENDIX D Rotation and the General Second-Degree Equation

KEAM (ENGINEERING) ANSWER KEY 2017

Given the vectors u, v, w and real numbers α, β, γ. Calculate vector a, which is equal to the linear combination α u + β v + γ w.

Hyperbolic Conformal Geometry with Clifford Algebra 1)

Math Subject GRE Questions

Chapter 8. Rigid transformations

Technische Universität München Zentrum Mathematik

Mathematical Fundamentals

10.1 COMPOSITION OF FUNCTIONS

Multiple View Geometry in Computer Vision

3.3.1 Linear functions yet again and dot product In 2D, a homogenous linear scalar function takes the general form:

DIRECTORATE OF EDUCATION GOVT. OF NCT OF DELHI

Institutionen för matematik, KTH.

AM 106/206: Applied Algebra Madhu Sudan 1. Lecture Notes 12

Analytic Geometry MAT 1035

Review of Linear Algebra

Chapter Contents. A 1.6 Further Results on Systems of Equations and Invertibility 1.7 Diagonal, Triangular, and Symmetric Matrices

Directional Field. Xiao-Ming Fu

Transformations. Chapter D Transformations Translation

Analytic Geometry MAT 1035

STATE COUNCIL OF EDUCATIONAL RESEARCH AND TRAINING TNCF DRAFT SYLLABUS.

Coordinates for Projective Planes

CLASS XII MATHEMATICS. Weightage (Marks) (i) Relations and Functions 10. Type of Questions Weightage of Number of Total Marks each question questions

Mathematical Properties of Stiffness Matrices

Lecture 19: Isometries, Positive operators, Polar and singular value decompositions; Unitary matrices and classical groups; Previews (1)

Linear Algebra March 16, 2019

Chapter 5. Basics of Euclidean Geometry

The Spectral Theorem for normal linear maps

2D Geometric Transformations. (Chapter 5 in FVD)

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

Linear Equations and Vectors

3. Fundamentals of Lyapunov Theory

33A Linear Algebra and Applications: Practice Final Exam - Solutions

ENGI 9420 Lecture Notes 2 - Matrix Algebra Page Matrix operations can render the solution of a linear system much more efficient.

Functions with orthogonal Hessian

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

N-WEAKLY SUPERCYCLIC MATRICES

Pre-Calculus and Trigonometry Capacity Matrix

ELEMENTS OF MATRIX ALGEBRA

EE731 Lecture Notes: Matrix Computations for Signal Processing

Linear Algebra Homework and Study Guide

Extra FP3 past paper - A

Identifying second degree equations

6. Linear Transformations.

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

Linear and affine transformations

ISOMETRIES OF THE PLANE AND COMPLEX NUMBERS. y in R 2 is (

mathematical objects can be described via equations, functions, graphs, parameterization in R, R, and R.

CSC 470 Introduction to Computer Graphics. Mathematical Foundations Part 2

2. TRIGONOMETRY 3. COORDINATEGEOMETRY: TWO DIMENSIONS

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 ( ) ( ) ( )

Affine transformations

Transcription:

omogeneous coordinates in the plane Homogeneous coordinates in the plane A line in the plane a + by + c is represented as (a, b, c). A line is a subset of points in the plane. All vectors (ka, kb, kc) k(a, b, c), k represent the same line as (a, b, c). Two vectors k (a, b, c) and k (a, b, c), k, k are said to be equivalent. The equivalence class k(a, b, c), k is called homogeneous vectors. The vector (,, ) does not represent any line. The set of homogeneous vectors R (,, ) forms the projective space P. A point (, y) is on the line l (a, b, c) iff a + by + c. The line equation may be written as (, y, )(a, b, c) (, y, )l, where the vector (, y, ) corresponds to the D Cartesian point (, y). If (, y, )l and k then k(, y, )l. Any vector (k, ky, k), k is a homogeneous representation of the D point (, y). An arbitrary homogeneous vector (,, ),, represents the point ( /, / ) in R. A homogeneous vector has degrees of freedom, it is represented by elements but has arbitrary scale. Lines and points A point is on a line l iff l. A line l intersects a point iff l. An intersection point between two lines l and l satisfies l and l, i.e. is orthogonal to l and l. E. The lines l (,, ) and l (,, ) T have intersection (,, ) T since T l and T l. Similarly, a line l through two points and satisfies l T and l T. E. The points (,, ) T and (,, ) T are intersected by the line l (,, ) T, + y since l T and l T. D homographies p. Lines and points Let L l l. The null-space N of L is defined as N(L ) { : L }. For l,l R this is satisfied by e.g. v l l, where the cross product is defined as where a b i j k a a a b b b a a b a b a b a b a b a b a a a a a a. a b, D homograp Similarly, a line through the points and may be calculated as l. D homographies p. D homograp

The intersection of parallel lines The line at infinity Two parallel lines l (a, b, c) and l (a, b, c ) intersect each other at the point l l (c c)(b, a, ). The point (b, a, ) does not have a finite representation since (b/, a/) is not defined. This corresponds to the interpretation that parallel lines have no intersection in the Euclidean plane. However, if we study with Cartesian representation lim(b, a, k) k lim (b/k, k a/k), Homogeneous vectors (,, ) with correspond to finite points in the real space R or the set of intersections between non-parallel lines. If we etend R with points having (but (, ) (, ) ) we get the projective space P. Points with are called ideal point or points at infinity. All ideal points (,, ) are on the line at infinity l (,, ), since (,, )(,, ). In the projective plane P two distinct lines have eactly one intersection point, independently of if they are parallel or not. The geometry of P n is called projective geometry. we may interpret the vector (b, a, ) as being infinitely far away in the direction of (b, a). D homographies p. D homograp nterpretation of the projective plane Duality A useful interpretation of P is as a set of rays in R. A homogeneous vector k(,, ), k corresponds to a ray though the origin. The inhomogeneous representation is given from its intersection with the plane. ideal point O l π Since l l, the meaning of lines and points are interchangeable. Thus, for any relation in P there is a dual relation where the meaning of lines and points are interchanged. The equation l may be interpreted as that the point is on the line l, but also that the point l is on the line. The equations l l may be interpreted as that the point is on the lines l and l, but also that the line intersects the points l and l. Rays for ideal points lie within the plane and have no (Euclidean) intersection with the plane. D homographies p. D homograp

Conics The conic equation A conic (section) is a second order curve in the plane. In Euclidean space there are three types of conics: ellipses, parabolas, and hyperbolas. Degenerate conics consist of a point or one or two lines. The equation for a conic in Euclidean coordinates is a + by + cy + d + ey + f. In homogeneous coordinate /, y / it becomes a + b + c + d + e + f or in matri form where C C, a b/ d/ b/ c e/ d/ e/ f. A conic has degrees of freedom since it defined by parameters but has arbitrary scale. D homographies p. 9 D homograph Five points define a conic Five points define a conic Every point on a conic gives one equation for the coefficients since any point ( i, y i, z i ) intersected by the conic has to satisfy This may be written as a i + b iy i + cy i + d iz i + ey i z i + fz i. h i i y i y i i z i y i z i z i where c (a, b, c, d, e, f) is the conic C as a -vector. With points we get y y z y z z y y z y z z y y z y z z y y z y z z y y z y z z i c, c Xc, Given the points (,, ), (,,), (,,), (,, ), (,,) we get X 8 with null-vector c or y. and conic C where c is obtained as a null-vector to the matri X. D homographies p. D homograph

Conic tangents Dual conics The tangent l to a conic C in a point on C is given by l C. Eample: The conic (/) + (y/) or 9 C intersects the points (,, ) and (,,). The tangents are The equation C defines a subset of points in P. The conic C is called a point conic. There is a corresponding second order epression for lines. A line conic (dual conic) is denoted C, where C is the adjoint matri to C and the equation l C l define the subset of all lines in P that are tangent to the point conic C. l C (/,, ) or, and l C (,/, ) or y. D homographies p. C l C l D homograph Dual conics Projective transformations If C is symmetric with full rank then C C up to scale. This means that all points on C have unique tangents l C and all tangents l have unique tangency points C l. In this case the the point conic C corresponds to the line conic C since C (C l) C(C l) l C l. Should the matri C be rank deficient the conic is degenerate. Degenerate point conics include two lines (rank ) and one line (rank ). E. the point conic C lm + ml consists of the lines l and m. The null-vector l m on both lines l and m does not have a unique tangent. Degenerate line conics include two points (rank ) and one point (rank ). E. The line conic C y + y has rank and consists of all lines intersecting and/or y. All lines have unique tangency points ecept l y. Definition: A projectivity (or projective transformation or homography) is an invertible mapping h from P onto itself such that three points,, and are collinear iff h( ), h( ), and h( ) also are collinear. Thus: Lines are mapped onto lines. O / y / / π / All projective transformations of homogeneous points may be written as h() H, where H is a non-singular -matri. The matri H has 8 degrees of freedom (9 elements, arbitrary scale). y π D homographies p. D homograph

Rectification of plane perspective Rectification of plane perspective If the coordinates for points i and their mappings i in the image are known, we may calculate the homography H. Each point pair (, y) and (,y ) has to satisfy Given H we may apply H to remove the effect of the perspective transformation. h + h y + h h + h y + h y h + h y + h h + h y + h or (h + h y + h ) h + h y + h y (h + h y + h ) h + h y + h. The latter equations are linear in h ij. Given points we get 8 equations, enough to uniquely determine H assuming the points are in standard position, i.e. no points are collinear. D homographies p. D homograph normhomo.m and linespt.m drawhomoline.m function Xhomonorm(X) %HOMONORM Normalize homogenous points. % %Xhomonorm(X); % v. --9. Niclas Borlin, niclas@cs.umu.se. m,nsize(x); XX./X(m*ones(,n),:); function linespt(l,l) %LINESPT Find homogenous intersection of two homogenous lines. % %linespt(l,l) %l,l - lines in homogenous coordinates. % - intersection in homogenous coordinates. % v. --9. Niclas Borlin, niclas@cs.umu.se. null(l,l ); function hdrawhomoline(l,varargin) %DRAWHOMOLINE Draw homogenous line. % %hdrawhomoline(l,line attributes) %L - matri with homogenous lines in % each column. %h - graphic handles. % v. --. Niclas Borlin, % niclas@cs.umu.se. % Get aes scaling. aais; lima(:); ylima(:); % Construct lines for each side of % the ais. al,,,;,,,; -lim,-ylim; % Preallocate handle vector for lines. hzeros(size(l,),); for i:size(l,) ll(:,i); % Determine if line is more vertical or % horizontal. if (abs(l())<abs(l())) % More horizontal. Calculate intersection to % left/right sides. normhomo(linespt(l,al(:,))); normhomo(linespt(l,al(:,))); else % More vertical. Calculate intersection to % upper/lower sides. normhomo(linespt(l,al(:,))); normhomo(linespt(l,al(:,))); end h(i)line((),(),(),(),varargin{:} end D homographies p. 9 D homograph

nsformation of points, lines, and conics Transformations of points, lines, and con Consider a point homography H. If and are on the line l then the points and will also be on a line l H l since l i (H l) i l H H i l i. Under the same point mapping H a conic C is mapped to C H CH since C ( H ) CH } H {{ CH }. C A line conic C is mapped to C HC H since l C l (H l ) C (H l ) l HC }{{ H } l. C, l, C H, l H l, C H CH D homographies p. D homograph Line conics and angles Line conics and angles Line conics are needed to describe angles between lines in projective geometry. In Euclidean geometry, angles between lines are calculated from the inner product between their normals, e.g. if l (l, l, l ) and m (m, m, m ) with normals (l, l ) and (m,m ), then the angle θ between the lines is calculated from cosθ l m + l m p (l + l )(m + m ). The epression l C m is invariant under a homography H since l H l and C HC H means that l C m (H l) HC H H m l H HC H H m l C m. Thus, if we know the projection C of C in an image, we can determine if two lines l and m in the image are orthogonal by calculating l C m. The corresponding well-defined epression in projective geometry is cos θ l C m p (l C l)(m C m), where C. Especially we have that l and m are orthogonal if l C m. D homographies p. D homograph

A transformation hierarchy for P Class I: Isometry Homographies may be divided into different subgroups with different level of generality. The four subgroups we will talk about are the following, in order of increasing level of generality Isometry. Similarity. Affinity. Projectivity. An isometry is a transformation of the plane R that preserves the Euclidean distance. y, ɛ cos θ sin θ t ɛ sin θ cos θ t y where ɛ ±. If ɛ +, the transformation is called orientation preserving and is a Euclidean transformation composed by a rotation and a translation. If ɛ, the transformation contains a mirroring. An isometry may be written as H E R t, y where R is an orthogonal matri and t is a -vector. An isometry has degrees of freedom; rotation () and translation (). Invariants: lengths, angles, areas, etc. D homographies p. D homograph Class II: Similarity A similarity is an isometry plus isotropic scaling. For orientation-preserving isometries, the similarity has the matri form y, or s cosθ s sinθ t s sinθ s cosθ t y H S sr t where the scalar s represents the scaling. A similarity has degrees of freedom; rotation (), translation () and scaling (). Invariants: angles, parallelity, length ratios, area ratios, shape. A similarity is also called a metric transformation., y Class III: Affinity An affine transformation (affinity) is a non-singular transformation followed by a translation and is represented by or y H A a a t a a t y A t where A is a non-singular matri., y, An affinity has degrees of freedom; the elements of A and t. Invariants: parallelity, length ration for parallel lines, area ratios. D homographies p. D homograph

erpretation of an affine transformation Class IV: Projectivity If we factor the transformation matri A into A R(θ)R( φ)dr(φ), where R(θ) and R(φ) are rotation matrices and D is a diagonal matri D λ λ then the transformation A may be interpreted as a sequence of rotations and (anisotropic) scaling. θ φ, Thus the two etra degrees of freedom may be interpreted as the scaling λ /λ and the anisotropy angle φ. This kind of factorization is always possible from the singular value decomposition (SVD) A UDV (UV )(VDV ) R(θ)(R( φ)dr(φ)). A projective transformation (projectivity) is a general linear mapping of homogeneous coordinates and is written H P A t v v, where v (v, v ) and v is a scalar. A projectivity has 8 degrees of freedom; 9 elements in H P and arbitrary scale. Invariants: Cross ratios of line lengths. The most important different between a projectivity and an affinity is the vector v and its effect on the mapping of ideal points. Study the mapping of an ideal point (,, ) : A t v v A v + For an affinity, v and all ideal points are mapped to ideal points. For a projectivity with v, some ideal points are mapped to finite points. rotation deformation D homographies p. 9 D homograph he effect of different transformations Decomposition of a projective transforma Similarity Affinity Projectivity A projective transformation may be decomposed into a sequence of transformations on different levels in the hierarchy: H H S H A H P sr t K I v v A vt v v, where A srk + tv is a non-singular matri and K is an upper triangular matri with K. The decomposition is valid if v and unique if s is chosen to be positive. Since H H P H A H S and H P, H A, H P are projective, affine, and similar, respectively, it is possible to decompose the transformation in the opposite direction, i.e. there eists also a factorization such that H H P H A H S I v v with different values for K, R, t and v. K sr t D homographies p. D homograph

Reconstruction of affine properties Affine rectification An affine transformation maps the line at infinity onto itself since l H A l A t A l. If we know the projection l of l in a projective mapping of a plane we may perform affine measurements. E.g. parallel lines in the plane should intersect on l. HP l H P( l ) / HP We may also transform the image such that l is transformed back to l. If l is the line l (l, l, l ) we may (assuming l ) construct the following transformation H H A l l l, where H A is an arbitrary affine transformation. If we apply H on the image, the line at infinity will be mapped to its canonical positions since H (l, l, l ) (,, ) l. π π π HA D homographies p. D homograph The circular points and their dual There are two points on l that are mapped onto each other under a similarity. They are called circular or absolute points and are denoted I i, J Under an orientation-preserving similarity I H S I scos θ s sin θ t s sin θ s cos θ t y s cos θ si sin θ s sin θ + sicos θ s i i. (cos θ isin θ) (cos θ isin θ) i se iθ i I. The circular points The circular points are intersection points between a circle and the line at infinity. The equation for a circle has a c and b a + a + d + e + f and intersects l where or a( + ), with solution I (, i, ) and J (, i, ). Since I are J are on all circles, we only need more points to uniquely determine the equation of the circle, something already known in Euclidean geometry. D homographies p. D homograph

Calculation of the circle equation The dual conic to the circular points Which circle intersects the points (,, ), (,,) and (,,)? If we add the circular points, the -point algorithm gives us the matri X i i with null-space C corresponding to or + y y ( ( + y ) ).. The line conic C IJ + JI is dual to the circular points. In Euclidean coordinates it is given by C i i + i i I The conic C is invariant under a similarity transformation H S since C H S C H S sr t sr t I sr t sr s RR C.. and conic c,,,,,. The conic C has degrees of freedom (symmetric matri with arbitrary scale and C )..... D homographies p. D homograph The information content ofc The effect of a homography onc Study the line conic C under a projective transformation: (H P H A H S )C (H P H A H S ) (H P H A ) ( ) ( ) H S C H S H A H P KK KK v v KK v KK. v C The (projection of the) conic C contains all information needed to perform a metric rectification, i.e. to determine the affine and projective properties of the transformation. Assume we have two lines l (,,.), m (,,.) and the transformation s., R v. H H P H A H S cos sin sin cos, v., or...8..899.8.., K....8, Then l H l.., m H m.9., D homographies p. 9 and HC H C.8.8..9.9 D homograph

etermination of orthogonality withc If we know the image (projection) of C C.8.8..9.9 Metric rectification withc Given C we can calculate the affine and projective properties K and v: KK.8.8.99 K 9.98.9.9...8 we are able to determine if the lines. l., m.9. in the image are orthogonal in the world plane. l C m...8.8.99.8.8.9., and KK v.8 v.8.8.99.8. D homographies p. D homograph Metric rectification withc Metric rectification by orthogonal line Given K and v we may eliminate the affine and projective component of the transformation by applying H M (H P H A ) on the points and H M on the lines..8 If an images has been affinely rectified we need equations to determine the degrees of freedom in K. We may get these equation from pairs of imaged orthogonal lines. Assume l and m in the affinely rectified image correspond to two orthogonal lines l and m in the world plane. which is a linear equation in S KK s s s s ˆl m, l m + l m, l m s,,. Since v we have where s (s, s, s ). 8....8 l l l KK m m m Given the image of two pairs of orthogonal lines we may determine s and therefore K and H A up to an unknown scale. The application of H A on the image will do a metric rectification... 8.....8.... H M D homographies p. D homograph