E N D
Projective Geometry • Projective Geometry is a mathematical framework describing image formation by perspective camera. Under perspective imaging certain geometric properties are preserved, such as collinearity ( a straight line is imaged as a straight line), whilst others are not, for example parallel lines are not imaged as parallel lines in general. The main areas of application are those in which image formation and/or invariant descriptions between images are important, such as camera calibration, stereo, object recognition, scene reconstruction, mosaicing, image synthesis, and the analysis of shadows. CS-236607 Visual Recognition
Planar Geometry: 2D Projective Plane • Point in plane represented by a pair (column vector) (x,y)T . Thus a plane is identified with . • Homogeneous representation of lines Line on the plane is represented by equation . thus a line may be represented by a vector , but since are equivalent. The set of equivalent classes of vectors in is defined as projective space . • Homogeneous representation of points. A point x= (x,y)T lies on the line iff For any , thus points are represented by homogeneous vectors and also are elements of CS-236607 Visual Recognition
Degrees of freedom d.o.f. Intersection of lines • To specify a point we need 2 values (x and y) - 2 d.o.f. (if point is represented by homogeneous coordinates (x1,x2,x3) we need (x1/x3,x2/x3)- still 2 d.o.f • To specify a line we need 2 parameters –2 ratios {a:b:c} – 2 d.o.f • Intersection of lines. • Given two lines find their intersection Define a cross product . The point x lies on the both lines: thus it is their intersection. Question.Determine the intersection of the lines l=(1,0,0) and l’=(0,1,0) . • Analogously,line passing through two points x and x’ is CS-236607 Visual Recognition
Ideal points • Intersection of parallel lines. Consider two lines and represented by Their intersection is Ignoring the scale factor it is the point (b,-a,0)T or(b/0,-a/0)T . • Points with homogeneous coordinates(x,y,0)Tdo not correspond to any finite point in • The points with last coordinate x3=0 are calledideal points or points at infinity. The set of ideal points lies on a single line, the line at infinity, denoted by . Question.Find the intersection of the lines • Any line intersects in the same ideal point (b,-a,0)T. Vector (b,-a) represents line’s direction. So the line at infinity is a set of directions of lines in the plane. CS-236607 Visual Recognition
Duality Principle • The roles of points and lines in basic incidence equation are symmetric: if then . Thus the duality principle follows: To any theorem of 2-dimensional projective geometry there corresponds a dual theorem, which may be derived by interchanging the roles of points and lines in the original theorem. CS-236607 Visual Recognition
Summary of homogeneous coordinates CS-236607 Visual Recognition
Cross ratio • Projective geometry preserves neither distances nor ratios of distances. It preserves cross ratio (c.r.), which is a ratio of ratios of distances. Given four collinear points p1, p2, p3, p4, in denote the Euclidean distance between two points pi ,pj as Then one definition of the cross ratio is • This ratio of ratios is invariant under projective transformations. • The Euclidean distance between two points pi =[Xi ,Yi ,Wi]T and pj =[Xj ,Yj ,Wj]T is computed from 2D Euclidean points: CS-236607 Visual Recognition
Cross ratio • The c.r. is the same no matter which coordinate is used as the devisor (as long as the same coordinate is used for all the points); thus, if all the points lie on the ideal line (Wi=0 for all i), then we can divide by Xi or Yi instead. If one of the points has a zero entry, for example if then which cancel each other: CS-236607 Visual Recognition
Conics and dual conics • In Euclidian geometry (EG) conics are of three main types: hyperbola, ellipse, and parabola. In 2-D projective geometry all conics are equivalent under projective transformation. • The equation of conic in inhomogeneous coordinates is CS-236607 Visual Recognition
Conics cont. • In homogeneous coordinates gives or in matrix form where • Note: C is symmetric and defined up to multiplication on a constant, so it has 5 d.o.f. • From (6) each point xi=(xi,yi) places 1 constraint on the conic coefficients CS-236607 Visual Recognition
Conics cont. or where is a conic represented as a 6-vector. Thus the conic can be found from constraints for 5 points ( because it is defined up to scale): CS-236607 Visual Recognition
Conics cont. • Since points and lines are dual concepts, a conic is a self-dual figure. That is, it can be considered as a locus of points (as we have just done), or as an envelope of tangent lines ( the set of lines that are tangent to the conic). The equation for the envelope of lines is Problem. Show that CS-236607 Visual Recognition
Conics cont. • Solution. Let the points and be two points defining a line. A point on this line is . This point lies on conic S iff which can also be written as where This means that a line has in general two intersection points with a conic. These intersection points can be real or complex and can be obtained by solving equation (11). Tangent to a conic. The two intersection points of a line with a conic coincide if the discriminant of equation (11) is zero. This can be written as CS-236607 Visual Recognition
Conics cont. • If the point is considered fixed, this forms a quadratic equation in the coordinates of which represents the two tangents from to the conic. If belongs to the conic and the equation of the tangents becomes which is linear in the coefficients of . This means that there is only one tangent to the conic at a point of a conic. This tangent is thus represented by: Relation between conic and dual conic. When varies along the conic, it satisfies and thus the tangent line to the conic at satisfies or This shows that the tangents to the conic C belong to a dual conic CS-236607 Visual Recognition
Absolute Points Every circle intersects the ideal line, W=0, at two fixed points. Circle is a conic with all off-diagonal elements (c12, c13, c23) equal zero and all diagonal elements equal: which intersect the ideal line at (called absolute conic) This equation has complex roots, known as the absolute points (also circular points): i=(1,i,0) and j=(1,-i,0). The absolute points remain invariant under similarity transformations, which makes them useful for determining the angle between two lines. CS-236607 Visual Recognition
Projective Transformations Projective Transformations are: invertible mapping h from points in to points in that maps lines to lines. Three points x1, x2, x3 lie on the same line if and only if h(x1), h(x2), h(x3) do. CS-236607 Visual Recognition
Formal Definitions Projective Space Given a coordinate system, n-dimensional real affine space is the set of points parameterized by the set of all n-component real column vectors Similarly, the points of real n-dimensional projective space can be represented by n+1-component real column vectors , with the required conditions that at least one coordinate must be non-zero and that the vectors and represent the same point of for all . The xi are called homogeneous coordinates for the projective point. CS-236607 Visual Recognition
Formal Definitions cont. Canonical Injection of into Affine space can be embedded isomorphically in by the standard injection . Affine points can be recovered from projective ones with by the mapping A projective point with xn+1=0 corresponds to an ideal ``point at infinity'' in the (x1, ..., xn) direction in affine space. The set of all such ``infinite'' points satisfying the homogeneous linear constraint xn+1=0 behaves like a hyperplane, called the hyperplane at infinity. In a general projective space any coordinate (or linear combination) can act as the homogenizing coordinate and all hyperplanes are equivalent -- none is especially singled out as the ``hyperplane at infinity''. CS-236607 Visual Recognition
Projective Mappings Definition: A nonsingular projective mapping between two projective spaces is any mapping defined by multiplication of homogeneous coordinates by a full rank matrix. A collineation on is an invertible projective mapping of onto itself. All projective mappings can be represented by matrices. As with homogeneous coordinate vectors, these are only defined up to a non-zero rescaling ExampleThe general case of a collineation is: with Provided and , CS-236607 Visual Recognition
Projective Mappings cont. this can be rewritten in inhomogeneous affine coordinates as: Property:A translation in affine space corresponds to a collineation leaving each point at infinity invariant. Proof: The translation can be represented by the matrix: CS-236607 Visual Recognition
Projective Mappings cont. Obviously More generally, any affine transformation is a collineation, because it can be decomposed into a linear mapping and a translation: In homogeneous coordinates this becomes: CS-236607 Visual Recognition
Projective Bases A projective basis for is any set of n+2 points of , no n+1 of which lie in a hyperplane. Equivalently, the (n+1)x (n+1) matrix formed by the column vectors of any n+1 of the points must have full rank. It is easily checked that forms a basis, called the canonical basis. It contains the points at infinity along each of the n coordinate axes, the origin, and the unit point . Any basis can be mapped into this standard form by a suitable collineation. Property: A collineation on is defined entirely by its action on the points of a basis. CS-236607 Visual Recognition
Transformation Groups • Axioms which define a group: A set of homogeneous transformation matrices, G, defines a group with the following properties, • closure: For all there exists a such that, • identity: There exists an identity transformation, such that for all Note that the identity element for the set of transformation transformation matrices is identity matrix • inverse: For all there exists an inverse, such that, • The inverse of a transformation is just the inverse of the transformation matrix. The group cannot contain any singular matrices. • associativity: For all CS-236607 Visual Recognition
A Hierarchy of Geometries • Euclidian geometry is defined by the group of rigid displacements; similarity or extended Euclidean geometry by the group of similarity transforms (rigid motion and uniform scalings); affine geometry by the group of affine transforms (arbitrary nonsingular linear mapping plus translations); and projective geometry by projective collineations. • There is a clear hierarchy to these four groups: As we go down the hierarchy, the transformation groups become smaller and less general, and the corresponding spatial structures become more rigid and have more invariants. CS-236607 Visual Recognition
A Hierarchy of Geometries cont. • Let us study . Its matrix Tproj has 8 d.o.f. • The affine plane is the projective plane minus the ideal line, thus affine transformations preserve the ideal line and the ideal points, that is, any point [X,Y,0]T must be transformed into [aX, aY,0]T with some arbitrary scaling a: which implies that The matrix of affine transformation, then, is CS-236607 Visual Recognition
A Hierarchy of Geometries cont. It has 6 d.o.f. • Similarity transformations preserve angles and ratios of lengths. Their matrix is (q is arbitrary angle): • Under Euclidean transformation, scale is important, and therefore the point p must first be converted to Euclidean coordinates by dividing by its third element. The transform is: CS-236607 Visual Recognition
A Hierarchy of Geometries cont. CS-236607 Visual Recognition