<<

Elementary Matrix Representation of Some Commonly Used Geometric Transformations in Computer Graphics and Its Applications

The Authors1 anonymous

Abstract

By using an extension of Desargues theorem, and the extended Desarguesian configuration thereof, the analytical definition for the stereohomology geometric transformation in projective is proposed in this work. A series of such commonly used geometric transformations in computer graphics as central projection, parallel projection, centrosymmetry, reflection and transformation, which can be included in stereohomology, are thus analytically defined from this point of view. It has been proved that, the transformation matrices of stereohomologyare actually equivalent to the existing concept in numerical analysis: elementary matrices. Based on the meaning of elementary matrices in thus obtained, a novel approach of 3D reconstructing objects from multiple views is proposed together with some of the concepts, principles and rules for its applications in computer graphics.

Keywords:

Elementary matrix; Homogeneous coordinates; Desargues theorem; Perspective projection; 3D reconstruction; Projective geometry.

1. Introduction for example, central projection, and parallel projection, are ac- tually defined in by using the concepts of mea- As is well known that, such geometric transformations as trans- sure or directly or implicitly which will be inapplicable lation transformation, perspective projection in computergraph- in projective space. ics, can be represented as square transformation matrices only Second, conventionally, the geometric transformation ma- through the homogeneous coordinate representation. trices can also be established for perspective projection, trans- Yet it is surprising to see that presently there is no rigor- lation transformation and so forth, based on homogeneous co- ous definition for the geometric transformations represented by ordinates representation in special reference coordinate system- square matrices based on homogeneous coordinates. Ideally,a s. While mainly due to the limitations of the traditional rep- geometric transformation and its , should resentations, there is actually no simple and straightforward be defined and identified reference coordinate system indepen- reference-coordinate-system independent method for transfor- dently, while the conventional representation method and the mation matrix establishing. definitions in computer graphics, at least for geometric trans- Since most of the geometric transformations can be repre- formation matrices, are not in such a way. sented by square transformation matrices only through homo- Actually, the conventionaldefinitions for the commonlyused geneous coordinates, an improved representation for geometric geometric transformations and their transformation matrices, transformations better be based on homogeneouscoordinates in are not perfect, or even not theoretically rigorous in the fol- projective space. lowing two aspects: For geometric transformations which can be represented by First, by using homogeneous coordinates, we assume that square matrices, we have the following conclusion: the geometric transformations are defined in projective space not in Euclidean space. As we know, in most of the curren- Theorem 0. The different transformation matrices in different t computer graphics textbooks, the geometric transformations, reference coordinate systems of the same geometric transfor- mation are similar matrices. T ∗Corresponding author. Tel.:+xxxxxx/Fax.:+xxxxxxx Proof. Suppose a geometric transformation 0 in projective s- Email address: anonymous (The Authors ) pace, which transforms an arbitrary point or hyperplane X into 1Corresponding author is anonymous. Y; and the homogeneous coordinates of X and Y in reference

Preprint submitted to Computer Graphics Forum June 16, 2011 Elementary Matrix Representation of Some Commonly Used Geometric Transformations 2 coordinate systems (I) and (II) are (x),(x)′,(y),(y)′ respec- 2.2. Definition of stereohomology tively; and the coordinate transformation matrix from the ref- Definition 2 (Generalized projective transformation). If the rank erence coordinate system (I)to(II) is a nonsingular matrix T, of the n+1 dimensional coefficient matrix (ti, j) of the following = = i.e., (x)′ T(x),(y)′ T(y); Suppose the transformation matri- transformation in n dimensional projective space is equal to or ces of T0 in different reference coordinate systems (I) and(II) greater than n, then the transformation in projective space is = = are A and B respectively, i.e., (y) A(x),(y)′ B(x)′;. Then called a generalized projective transformation ( 0 , ρ R): we have: ∈ = + + + ρx1′ t1,1 x1 t1,2x2 t1,n+1 xn+1 = = = 1 (y)′ T (y) T A (x) TAT− (x)′ (1) = + + +  ρx2′ t2,1 x1 t2,2x2 t2,n+1 xn+1 (3) Since X is arbitrary, then B = TAT 1, B and A are similar to  −  ...... each other.  . . . . . = + + + ρxn′ +1 tn+1,1 x1 tn+1,2x2 tn+1,n+1 xn+1 Theorem 0 indicates that, in order to define a geometric   transformation reference coordinate system independently, we Definition 3 (invariant point). In projective space, if the homo- can take advantage of the inherentcharacteristics of the geomet- geneous coordinate vector of a point is an eigenvector of a gen- ric transformation matrix, i.e., properties of the transformation eralized projective transformation T , then the pointis called an matrix regarding eigen value(s), eigenvector(s), and the geo- invariant point of T . metric meanings thereof. Definition 4 (General Invariant hyperplane). Suppose X is any Unless otherwise specified, the current work will be dis- π R point in hyperplane , if its corresponding point X′ through a cussed only in the real field: , and a geometric transforma- generalized projective transformation matrix T , is also in π, tions will be a point (not hyperplane) transformation discussed then π is a general invariant hyperplane of T . in one reference coordinate system. Therefore, T can be used to represent both a transformation and the transformation ma- Definition 5 (Invariant hyperplane). Suppose X is any point in trix thereof. Symbols like (s),(x),(x)i,(π) and so on, represent the general invariant hyperplane π of T , if X’s corresponding the homogeneous coordinate column vectors for the point S , X, point X′ coincides with X, then π is an invariant hyperplane of Xi, and hyperplane π and so on, respectively. T . Definition 6 (null vector). If a generalized projective transfor- 2. Stereohomology mation T is singular, then there exists a point, denoted as X, of which the homogeneous coordinate vector, (x), will be trans- 2.1. Extension of Desargues theorem & Desarguesian configu- formed into (0, , 0)⊤, to which there is no corresponding ge- ration ometric point in projective space, such a column homogeneous Theorem 1 (Extended Desargues theorem [1, 2]). In n- dimen- coordinate (x) is called a null vector for T . sional projective space (2 6 n Z+), if the homogeneous coor- ∈ Lemma 1 (existence of “stereohomology center”). In n- dimen- dinate vectors of the n+1 points X1, X2, ..., Xn, Xn+1, are linearly independent, any n homogeneous coordinate vectors of the n+1 sional projective space, if a generalized projective transforma- tion T has an invariant hyperplane π, then there exists a unique points Y1, Y2, ..., Yn, Yn+1, are also linearly independent, and there exists a fixed point S, the homogeneous coordinate vector fixed point, which is collinear with any point and its image point T T of which is linearly dependent to those of any two of the corre- through ; and when is nonsingular, the fixed point is an in- variant point of T ; when T is singular, the fixed point is the sponding point pairs: Xi and Yi, ( i = 1, , n+1). Then the 2 null vector of T . rank of the homogeneous coordinate vectors of the Cn+1 inter- section points of line pairs XiX j and YiY j, which will here be Proof. Denote the generalized projective transformation matrix def defined as S i j =S ji == XiX j YiY j (i , j, i, j = 1, , n + 1), as T , and its invariant hyperplane as π. Suppose the homoge- should be n. ∩ neous coordinate vector of any point X (denote its correspond- ing point through T as Y) can be linearly expressed by that of Proof. See [1]. an arbitrary invariant point H π(ρ (h)=T (h), 0 , ρ R is ∈ H H ∈ Similar to the Desargues theorem and its inverse, the inverse the eigenvalue for all the points in π ) and that of a fixed point < of Theorem 1 also is true. C π as: (x) = (h) + ω (c) ω R (4) + ∈ Definition 1 (Extended Desarguesian configuration). If 2n therefore, Y’s homogeneous coordinate can be: 3 points, X , X , , X , X , S , Y , Y , , Y , Y , meet 1 2 n n+1 1 2 n n+1 the constraints in both Theorem 1 and its inverse, then the con- (y) =T (x) = ρ (h) + ω T (c) H figuration that consists of all these points is an Extended Desar- ρ R, and ω R (5) guesian configuration, denoted as H ∈ ∈

From “Eq.(5) Eq.(4) ρH ”, we have: X1 X2 Xn Xn+1-S -Y1Y2 Yn Yn+1 (2) − × (y) ρ (x) = ω (T (c) ρ (c)) − H − H Elementary Matrix Representation of Some Commonly Used Geometric Transformations 3 which indicates that there exist a unique fixed point, denoted as S below(the uniqueness can be proved through proof by contra- 1 diction): a1∆1 b1∆2 c1∆3 d1∆4 − = (s) T (c) ρH (c), −  a2∆1 b2∆2 c2∆3 d2∆4  which is collinear to X and the corresponding Y.   (6) Since any line through S is transformed into itself, then S is ×  a ∆ b ∆ c ∆ d ∆   3 1 3 2 3 3 3 4  an invariant point when T is nonsingular or S is the null vector     when T is singular ( S < π in this case).  a4∆1 b4∆2 c4∆3 d4∆4      Definition 7 (Stereohomology). In n- dimensional projective The square transformation matrix of stereohomologyshould space, a generalized projective transformation is called a stere- be obtained via more simple and direct method rather than that ohomology, if (1) the coefficient matrix thereof has a stereoho- in (Eq.(6)) from the coordinate information of an Extended De- mology hyperplane (denoted as π ), the homogeneous coordi- sarguesian Configuration. nate vector of any point on which is an eigenvector of the trans- Lemma 3 (Existence of an n- dimensional Eigenspace). The formation matrix, and the rank of the vector set with all these obtained n+1 dimensional transformation matrix of generalized eigenvectors is n; and (2)there exists a fixed point( called stere- projective transformation T in Lemma 2, has an eigenvalue ohomology center, denoted as S ), of which the homogeneous with geometric multiplicity of n, i.e., there exists an n- dimen- coordinate vector is linearly dependent to those of any point in sional Eigenspace of the transformation matrix, and a hyper- the n- dimensional projective space, and its correspondingpoint plance of the transformation T . through the generalized projective transformation. Proof. Here only gives the proof when the transformation ma- According to Lemma 1, Definition 7 can actually be simpli- trix is nonsingular, i.e., not only all the homogeneous coordi- fied as: a generalized projective transformation with an invari- nate vectors (x) are linearly independent, but all the vectors (y) ant hyperplane. i i are linearly independent. And the symbol T here will be used Definition 8. (Elementary homology) An elementary homol- to represent both the geometric transformation and the trans- ogy geometric transformation is a stereohomology, of which formation matrix. the stereohomology center is not on the stereohomology hyper- To provethe current statement, we need to construct and use plane, i.e., the inner product of the homogeneous coordinate the properties of the minimal polynomial of the n+1-dimensinal vectors of the stereohomology center and the stereohomology transformation matrix T . hyperplane, is not zero. First, since the homogeneous coordinate vector of S can be linearly expressed as: Definition 9. (Elementary perspective) An elementary perspec- tive is a stereohomology, of which the stereohomology center = + is on the stereohomology hyperplane. (s) λ1(x)1 λ1′ (y)1 = + λ2(x)2 λ2′ (y)2 Lemma 2 (Existence & uniqueness theorem). For the Extended . . . . (7) Desarguesian Configuration (Eq.(2) in Definition 1), there ex- . . . . ists a unique generalized projective transformation, denoted as = + λn+1(x)n+1 λn′ +1(y)n+1 T , which transforms X , X , X , X + and S into Y , Y , 1 2 n n 1 1 2 Yn, Yn+1 and S (or null) respectively. and since all the n+1 homogeneous coordinate vectors of either Proof. See [1]. (x)i or (y)i ( i = 1, , n+1 ) are linearly independent, 0 , µi R (i = 1, , n+1 ), which make (s) can be linearly expressed∃ The final form of the transformation matrix T 3d in 3- dimen- ∈as: sional projective space, which transforms A, B, C, D, into A′, B′, C′, D′, and S into S (or null) in the extended Desargue- n+1 sian configuration (Eq. (2) in Definition 1), respectively, will be (s) = µi (x)i (8) obtained in the following form [1] (The ∆ s and ∆ s are deter- i=1 i i′ minants defined in [1]): Since (x)i and (y)i are the corresponding points through the geometric transformation T ( i = 1, , n + 1), i.e., there a ∆ b ∆ c ∆ d ∆ 1′ 1′ 1′ 2′ 1′ 3′ 1′ 4′ exist a series of 0 , ρ R (i =1∀,...,n+1), which satisfy: i ∈  ∆ ∆ ∆ ∆  a2′ 1′ b2′ 2′ c2′ 3′ d2′ 4′ = T = + T 3d = ρi (y)i (x)i (i 1, , n 1) (9) k   = T ×  a ∆ b ∆ c ∆ d ∆  and ρs (s) (s) (10)  3′ 1′ 3′ 2′ 3′ 3′ 3′ 4′      combine all the above results in Eq.(7, 8, 9, 10) together, we  a′ ∆′ b′ ∆′ c′ ∆′ d′ ∆′   4 1 4 2 4 3 4 4  will obtain the linear expression of (s) by(y)i in two different   Elementary Matrix Representation of Some Commonly Used Geometric Transformations 4 forms: + + n 1 µ n 1 µ λ which can be rewritten as (i, j =1, , n+1): i 1 (s) = i i′ (y ) (11) λ − λ i i=1 i i=1 i (s) , = λ (x) λ (x) i j i i − j j and = + + λ′j(y) j λi′(y)i (20) 1 n 1 n 1 ρ µ − (s) = T µ (x) = i i (y ) (12) and ρ i i ρ i s i=1 i=1 s T (s)i, j = T (λi(x)i λ j(x) j) Since the linear expression of (s) by(y)i should be unique − = λ ρ (y) λ ρ (y) (21) once the homogeneouscoordinate vectors are selected, compar- i i i − j j j ing the corresponding factors before each (y)i, we can obtain: Comparing the linear expression of (s)i, j in Eq. (20) and T ρiλi = const. ( i = 1, , n+1) (13) (s)i, j in Eq. (21) by (y) j and (y)i, considering Eq. (13), we thus λi′ ∀ can obtain that: Since according to Eq. (10) = ρiλi 1 T (s)i, j (s)i, j (s) = T (s) (14) − λi′ ρs = and according to Eq.(7) i , j, i, j 1, , n+1 (22) Since the rank of the vector∀ set which consists of all the homo- = + 2 (s) λi(x)i λi′(yi) geneous coordinate vectors of the Cn+1 intersection points is n, and all the vectors are associated eigenvectors, the geometric λ′ = λ (x) + i T (x) multiplicity of the associated eigenvalue is n. i i ρ i i When T is a singular matrix, the proof is similar with only λi λi′ 2 = T (x)i+ T (x)i (15) slight difference. ρs ρsρi The above statement of Lemma 3 is actually corresponding i = 1, , n+1 to the extended Desargues theorem: Theorem 1; and Lemma 4 Then from Eq.(15) we∀ can obtain: below will be corresponding to the inverse thereof. ρ λ (T ρ I) T + i i I (x) = 0 (16) Lemma 4 (Existence of “stereohomology center”). In n- dimen- − s λ i i′ sional real projective space, if a generalized projective transfor- i = 1, , n+1 mation transforms the points X1, X2, Xn,and Xn+1 in extended ∀ Since ρs is an eigenvalue of the transformation matrix T , Desarguesian configuration ( Eq.(2) in Definition 1 ) and T , I, into Y1, Y2, Yn,and Yn+1 respectively, and there exists an + ρiλi eigenvalue with geometric multiplicity of n for the n+1 dimen- (t ρs) t (17) T − λi′ sional transformation matrix . Then the homogeneous coor- T is the minimal characteristic polynomial of the transformation dinate vector of S is an eigenvector of , and the correspond- T matrix T . Consequently, ing eigenvalue equals zero in case that is singular. ρ λ Proof. Proof is omitted here. i i = const. (18) − λi′ Lemma 5 (“Stereohomologycenter ”Linear correlationship). For T is also an eigenvalue of transformation matrix , and then it the generalized projective transformation T , which transforms can be proved that the geometric multiplicity thereof is n. X , X , , X , X + and S in extended Desarguesian configu- Then prove that all the homogeneous coordinate vectors of 1 2 n n 1 2 ration ( Eq.(2) in Definition 1 ) the C + different intersection points, denoted as (s) ,(i , j, i, n 1 i, j into Y , Y , , Y , Y + and S (or Null) respectively, for any j=1, , n+1), are the associated eigenvectors of the eigenvalue 1 2 n n 1 point X, and its corresponding points Y through the transforma- Eq. (18). tion T , the homogeneous coordinate vectors (x) and (y) of the According to Eq. (7), which can be rewritten as: two points are linearly dependent to (s).

(s) = λ (x) + λ′(y) (i=1, , n+1) i i i i Proof. Since there exists an invariant hyperplane π of the trans- and formation per Lemma 3, according to Lemma 1, there exists a (s) , =(x) (x) = (y) (y) 1 2 1 − 2 2 − 1 fixed invariant point (s) which is the stereohomology center of (s)2,3 =(x)2 (x)3 = (y)3 (y)2 T  − − . Denote the eigenvalue corresponding to the invariant hy-  . . . . .  . . . . . perplane π as λ, then the current statement is equivalent to: for  = =  (s)k,k+1 (x)k (x)k+1 (y)k+1 (y)k (19) any point X we have:  − −  . . . . .  . . . . . µ R : T (x) = λ (x) + µ (s) (23) (s)n,n+1 =(x)n (x)n+1= (y)n+1 (yn) ∃ ∈  − − Further proof will be omitted here.  = =  (s)n+1,1 (x)n+1 (x)1 (y)1 (y)n+1  − −   Elementary Matrix Representation of Some Commonly Used Geometric Transformations 5

Theorem 2 (Existence & Uniqueness of stereohomology ma- As has been mentioned that the stereohomology matrix ob- trix). A stereohomology matrix can be uniquely determined by tained from Extended Desarguesian configuration, with the for- an extended Desarguesian configuration: the unique general- m in Eq. (6) is too complicated for application. And most com- ized projective transformation matrix which transforms X ,X , monly, we don’t use the coordinate information from the Ex- 1 2 Xn, Xn+1 and S in extended Desarguesian configuration Eq. (2) tended Desarguesian configuration for stereohomology related in Definition 1 into Y1, Y2, Yn, Yn+1 and S ( or Null ) respec- transformation determination. e.g., for those transformations tively. which are intended to be included by stereohomology, it should Proof. First, a generalized projective transformation coefficient be sufficient to determine a central projection, by coordinate matrix determined by an Extended Desarguesian Configuration information of a projection center and a projection plane, or to is a stereohomology, which can be proved from Lemmas. determine a parallel projection by projection direction and pro- The uniqueness of the generlized projective transformation jection plane; and so forth. therefore is equivalent to the uniqueness which has been proved These considerations finally lead to a rather simple rep- in Lemma 2 resentation for stereohomolgy: elementary matrix in numer- ic analysis, which begins with symbolically constructing the Property 1. The order of the minimal characteristic polynomial transformation matrix of a specific 3D stereohomology. of a stereohomology matrix always is 2. For a 3- dimensional elementary homology T 3d with stere- Property 2. If an (n+1)- dimensional stereohomology matrix ohomology center S :(s1, s2, s3, s4)⊤, and stereohomology hy- has two different eigenvalues, one of which should be the pri- perplane π:(a, b, c, d)⊤, suppose neither two of a, b, c, and d mary eigenvalue λ, and have geometric multiplicity of n, the are zero at the same time, and the two eigenvalues of T 3d are other eigenvalue can be denoted by ρ; when λ=ρ, the stereoho- λ, corresponding to π with a geometric mutiplicity of 3, and ρ, mology matrix can not be diagonalized. corresponding to S . Therefore, (s1, s2, s3, s4)⊤ is an associated eigenvector of ρ, Definition 10 (primary eigenvalue). It has been proved that an and the linearly independent( b, a, 0, 0)⊤,( c, 0, a, 0)⊤,( d, 0, 0, a)⊤ T (n+1) dimensional stereohomology transformation matrix are the associated eigenvectors− of λ, i.e.: − − has at least one eigenvalue, denoted as λ, with geometric multi- 3d plicity of n. This eigenvalue λ is called the primary eigenvalue T (s1, s2, s3, s4)⊤ = ρ (s1, s2, s3, s4)⊤ of stereohomology T . 3d =  T ( b, a, 0, 0)⊤ λ ( b, a, 0, 0)⊤  − − (25)  3d = 3. Matix representation of stereohomology  T ( c, 0, a, 0)⊤ λ ( c, 0, a, 0)⊤  − − 3d Definition 11 (Elemetary Matrix). An elementary matrix is a T ( d, 0, 0, a)⊤ = λ ( d, 0, 0, a)⊤  − − matrix which can be represented as [3]:   de f Eq.(25) can be rewritten as: E(u, v; σ) == I σ u v⊤ − u, v Rn, 0 , σ R (24) ∈ ∈ 1 λb λc λd ρs b c d s1 − − − − 1 − − − a 0 0 s  λa 0 0 ρs2   2  T 3d = == 1 ×  0 a 0 s3  as +bs +cs +ds ×  0 λa 0 ρs3    1 2 3 4        0 0 a s4   0 0 λa ρs4            ρas +λbs +λcs + λds bs (ρ λ) cs (ρ λ) ds (ρ λ) 1 2 3 4 1 − 1 − 1 −  as (ρ λ) λas +ρbs +λcs +λds cs (ρ λ) ds (ρ λ)  2 − 1 2 3 4 2 − 2 −  + + +  (26)  as3(ρ λ) bs3(ρ λ) λas1 λbs2 ρcs3 λds4 ds3(ρ λ)   − − −     + + +   as4(ρ λ) bs4(ρ λ) cs4(ρ λ) λas1 λbs2 λcs3 ρds4  − − −      Then Eq. (26) can be rewritten and extended to n- dimen- For elementary perspective transformation, similarly we can sional projective space as: obtain (using any fixed point (x) < π as auxiliary point/vector, and its corresponding point homogeneousvector per Eq. (23) in Lemma 5): def (s) (π)⊤ T ((s), (π); λ, ρ) === λ I + (ρ λ) − (s)⊤ (π) n+1 (s), (π) R , (s)⊤ (π) , 0, ρ R (27) ∈ ∈ Elementary Matrix Representation of Some Commonly Used Geometric Transformations 6

Theorem 3 (elementary matrix representation). A stereohomol- ogy geometric transformation, which is defined in Definition 7, def (s) (π)⊤ T ((s), (π); (x), λ, µ′) === λ I + µ′ can and only can be represented as elementary matrix, which is (x)⊤ (π) defined by Eq. (24) in Definition 11; and an elementary matrix n+1 (s), (π), (x) R , (s)⊤ (π) = 0, always have the geometric meaning of stereohomology. ∈ (x)⊤ (π) , 0, µ′ , 0, (x)satisfies Eq. (23) (28) Eq. (28) can also be rewritten as: Theorem 4 (tri-stereohomology theorem). If T1 and T2 are two different stereohomology transformation with stereohomol- de f µ (s) π⊤ T ((s), (π); λ, µ) == λ I + ogy centers of S 1,S 2 respectively, and stereohomology hyper- √(s)⊤ (s) (π)⊤ (π) planes of π and π respectively. T = T T . Then: 1 2 3 1 2 n+1 (s), (π) R , (s)⊤ (π)= 0, 0 , µ R (29) (i) If S 1 coincides with S 2, then T3 is also a stereohomology; ∈ ∈ Denote the stereohomology hyperplane of T as π , then In Eq.(29), the √(s)⊤ (s) (π)⊤ (π) in the denominator is 3 3 π , π and π are collinear. added only in order that the parameter µ′ can be independent 1 2 3 to the homogeneous coordinates selection for (s)and (π). (ii) If π1 coincides with π2, then T3 is also a stereohomology; The transformation matrices constructed have generality for Denote the stereohomology center of T3 as S 3, then S 1, any other elementary homology or elementary perspective re- S 2 and S 3 are collinear. spectively. Proof. Using Theorem 3, Eq. (27) and (29), and Definition 7, Lemma 6 (Sylvester theorem). If a matrix A Fm n, B Fn m, ∈ × ∈ × the current statement is straightforward. and the characteristic polynomials of AB and BA are fAB(λ) and fBA(λ) respectively, then: Unless otherwise specified, the primary eigenvalue of stere-

m n ohomology λ, will be set as a default nonzero value of 1. f (λ) = λ − f (λ) (30) AB BA Property 3 (rank of stereohomology). The rank of (n+1)- di- 4. Applications of elementary matrices in computer graph- mensional stereohomology matrix should be greater than or e- ics qual to n. The elementary matrix representation of stereohomology Proof. Let A = α (s), B = (π) ( α R). Applying Eq. (30) ⊤ actually can be used for a series of geometric transformation- in Lemma 6 to the characteristic polynomials∀ ∈ of AB and BA, s which have been commonly used in computer graphics. we have the following results: < π T When S , using Eq. (27) to represent . let 4.1. Represent geometric transformations by elementary matri- ρ λ ces α = − −(s)⊤ (π) Since some of the geometric transformations like projec- then we have the of stereohomology transforma- tions, are actually singular transformations, while a projective tion matrix: transformation in projective geometry is nonsingular, in order to represent such kind of transformations, the concept of stere- (s) (π)⊤ det(T ) = det λ I + (ρ λ) ohomology is defined to be able to include both singular and − (s)⊤ (π) nonsingular transformations. = = n = n fAB(λ) λ fBA(λ) λ ρ (31) Property 4 (singular stereohomology). The transformation ma- Since λ , 0 is the eigenvalue with the geometric multiplicity trix T of a singular stereohomology can and only can be rep- of n, if and only if ρ = 0, we have rank(T )= n; otherwise resented as: T de f (s) (π)⊤ rank( )= n+1. T ((s), (π)) === I (33) When S π, let − (s)⊤ (π) ∈ R µ where (s),(π) ,(s)⊤ (π) , 0. α = − ∈ √(s)⊤ (s) (π)⊤(π) Definition 12 (reflexive; involutory). If a projective geometric the determinant of T : transformation T satisfies:

2 = + (s)⊤ (π) T = k I, 0 , k R det(T ) det λ I µ ∃ ∈ √(s)⊤ (s) (π)⊤(π) T then is involutory, or is called an involutory (projective) n n+1 = fAB(λ) = λ fBA(λ) = λ (32) transformation. T Since λ is the only nonzero eigenvalue of , so for an elemen- Property 5 (involutory stereohomology). An involutory stereo- T tary perspective transformation, always is nonsingular. Here homology T can and only can be represented as: rank(T ) = n+1. de f (s) (π)⊤ T ((s), (π)) === I 2 (34) − × (s)⊤ (π) Elementary Matrix Representation of Some Commonly Used Geometric Transformations 7

Definition 13 (Central projection). A central projection T is Definition 18 (Centrosymmetry). A centrosymmetry transfor- a singular stereohomology, of which both the stereohomology mation T is an involutory stereohomology, of which the stere- center S and the stereohomology hyperplane π are at finity. ohomology center S is at finity, while the stereohomolgy hy- And the stereohomology center S is called the projection perplane π is at infinity. center of Central projection T , and π is called the projection S is called the symmetric center of T . hyperplane or image hyperplane of T . Definition 19 (translation transformation). A translation trans- Definition 14. (normal direction for finite hyperplane) For a formation is an elementary perspective, of which both the stere- point at infinity P and a hyperplane at finity π, if the inner ohomology center S and the stereohomology hyperplane π are product of the homogeneous∞ coordinate vector of P and that at infinity. of any infinite point in hyperplane π, is equal to zero,∞ then we But Definition 19 is not the best definition for a translation say P is the normal direction of π, or P is (projectively) or- ∞ ∞ transformation especially when determining the transformation thogonal to π, denoted as P π. ∞⊥ matrix. It better be defined as: Specifically, in 3- dimensional projective space, if we use T 2 2 2 Definition 20 (translation transformaiton). If two reflection 1 (x , x , x , 0)⊤ (where x + x + x , 0) to represent the homo- 1 2 3 1 2 3 and T , have parallel reflection hyperplanes π π , then the geneous coordinate vector of a point at infinity (unless oth- 2 1 2 compound transformation of two reflection T and T : T = erwise specified, all the examples discussed in 3- 1 2 T T , is a translation transformation. dimensional projective space in the present work 1 2 will take this as a premise), and if the homogeneous co- In Euclidean space, the translation distance of T is just ordinate vector of a finite hyperplane π is (a, b, c, d )⊤, then twice that between π1 and π2. Or it can be defined as: the normal direction of π can be represented as k (a, b, c,0)⊤ (where 0 , k R). Definition 21 (translation transformation). The compound trans- ∈ formation of two centrocymmetric transformation T1 and T2: Definition 15 (Projectively parallel). If there exists one inter- T = T T , is a translation transformation. 1 2 section point at infinity of line l1 and another line l2, or hyper- In Euclidean space, the translation distance of T is twice plane π, then we say line l1 is projectively parallel, or simply, that between the two symmetric centers S 1 and S 2; and trans- parallel, to line l2, or hyperplane π, denoted as l1 l2, or l1 π. If there exists one intersection line at infinity of two hy- lation direction can be determined according to the direction of perplanes π1 and π2, then we say hyperplane π1 is projectively oriented line −−−−→S 1S 2. parallel, or simply, parallel to π2, denoted as π1 π2. Definition 22 ( transformation). Suppose T1 and T2 The following conclusion will be straightforward: are two reflection transformations, and the intersection line of the two reflection hyperplanes is: l = π π . The the com- Property 6 (normal direction property). If two finite hyper- 1 ∩ s pound transformation T = T1 T2, is called a rotation trans- planes π1 π2, then π1 and π2 have the same normal direction. formation. l is the rotational axis of T . Definition 16 (Parallel projection). A parallel projeciton T is a In Euclidean space, the rotation angle degree is twice that singular stereohomology, of which the stereohomology center of the dihedral angle between π and π . S is at infinity, while the stereohomology hyperplane π is at 1 2 finity. 4.2. Represent 3D reconstructing objects from multiple projec- The stereohomology center S is called the projection direc- tions tion of parallel projection T , and the stereohomology hyper- plane π is called the projection hyperplane, or the image hyper- 4.2.1. A brief introduction plane of the parallel projection T . In Vision[4], Marr presented a very general discussion of Specially, if S π, the parallel projection T is called an or- representation and process for 3D reconstruction, and described thogonal parallel projection.⊥ three levels of information processing: theory, representation / algorithm, implementation. An orthogonal parallel projection can be uniquely deter- In the present work, though the 3- dimensional reconstruc- mined by its projection hyperplane. tion may mean the same thing: to reconstruct objectives from their images or projections, the basic concepts are still different T Definition 17 (Reflection). A general reflection is an invo- from the conventional ones. lutory stereohomology, of which, the stereohomology center S First, let us consider an axiom, or a speculation in the cur- is at infinity, and the stereohomology hyperplane π is at finity. π rent representation, which is useful in 3D reconstruction but is called the reflection hyperplane; and S is called the reflection may be easily neglected by the conventional representation. direction. Specially, when S π, the general reflection T is called an Speculation 1 (Feasibility of 3D reconstruction). A 3- dimen- orthogonal reflection,⊥ or simply called a reflection. sional reconstruction is feasible, if and only if, there exists a one-to-one mapping between objectives and their image conse- quence(s). Elementary Matrix Representation of Some Commonly Used Geometric Transformations 8

Speculation 1 is true no matter what kind of 3D reconstruc- Definition 27 (Camera matrix). Suppose in 3- dimen- tion one considers, i.e., either from multiple projections or from sional projective space, there are m (m > 2) different views of only single view, either by geometric optical principles or any an objective projected by the following m different camera ma- other, with any additional constraints like and so forth trices in Eq. (36). Then Eq. (37) defines the camera group ma- or not. trix, which is actually a block matrix (also can be called multi- From this point of view, the constraints in 3D reconstruction projection matrix) which can be partitioned into the m different better be divided into two types, though it is still a little hard to camera matrices( also called sub-multi-projection matrices). present rigorous definitions for them: de f (s)1(π)1⊤ C 1 ((s)1, (π)1) === I − (s)⊤(π)1 Type I Geometric constraints, which are general for all kind 1  of 3D reconstruction problems; e.g., the epipolar geome- de f (s)2(π)⊤  C ((s) , (π) ) === I 2  try constraints in 3D reconstruction; the Desargues theo- 2 2 2  − (s)2⊤(π)2   (36) rem; and so forth; .  .  Type II Transcendental constraints, which are special andon- ly feasible for some specific cases; e.g., the symmetry of C de=== f (s)m(π)m⊤  m ((s)m, (π)m) I  specific objectives, light and shadow, or color, and so on, − (s)m⊤ (π)m   of objectives.  (s)1 (π)1⊤  I  − (s)⊤ (π)1 4.2.2. Some basic definitions for the current representation  1  Definition 23 (normalized homogeneous coordinate). Such ho-  (s)2 (π)2⊤  mogeneous coordinate vector as (x1, x2, x3, 1)⊤, which repre- de f  I  P ===  − (s)⊤ (π)2  (37) sents a point, is called normalized homogeneous coordinate, s-  2   .  ince which can be simply and directly mapping to (x ,x , x )⊤  .  1 2 3   in Euclidean space.    (s)m (π)m⊤  For the homogeneouscoordinatevector of an arbitrary point  I   − (s)m⊤ (π)m  X′:(x′ , x′ , x′ , x′ )⊤ (where x′ , 0, so that X′ can be mapped  4m 4 1 2 3 4 4   × into Euclidean space), the normalized homogeneous coordinate Definition 28 (Camera Calibration). In this work, the calibra- can be obtained by dividing x4′ for every xi′ (i =1, ,4). tion of a camera means, the processof finding the homogeneous The normalized homogeneous coordinate vector of (x) is coordinate vectors of stereohomology center and the stereoho- denoted as (x) mology hyperplane of a camera matrix. Similarly, the calibration of a camera group matrix(e.g., de- Definition 24 (normalization operation). A normalization op- fined by Eq.(37) in Definition27), should be the process of eration is a mapping which can map homogeneous coordinate finding all the homogeneouscoordinate information of all the m vector, or homogeneous coordinate vector block matrix, into pair of stereohomology centers and sterehomology hyperplanes its normalized form. A normalized operation is denoted as: for the m different camera matrices. (x) == S [(x)] X == S [X] Definition 29 (objective matrix). An objective matrix is a ma- Definition 25 (matrix dot multiplication). If m n dimensional × trix, each column of which is a homogeneous coordinate col- matrices A = (ai, j)m n, B = (bi, j)m n, then the dot multiplica- Ξ × × umn vector of a point, denoted by . Generally, an objective tion product of A and B is defined as: matrix representing n different points is a 4 n dimensional × de f matrix. If all the homogeneous coordinate vectors in an objec- A B === ai, j bi, j (35) tive matrix are normalized homogeneous coordinates, then the ⊙ m n × objective matrix is called a normalized objective matrix, denot- Definition 26 (camera matrix). In the current work, a central ed by Ξ . projection or parallel projection will be considered as a camera; According to definition, Ξ == S [ Ξ ]. and there exists a and the transformation matrix thereof is called a camera matrix, diagonal matrix Λ, which is called a relaxation matrix, and has denoted by C . the dimension of n n to the image matrix Ξ, and which makes: According to definition, a camera matrix can be represented × by Eq. (33). Ξ ==Ξ Λ == S [ Ξ ] Λ (38)

According to Definition 26, a camera matrix represented by Definition 30 (Subimage matrix). An objective matrix Ξ or Ξ Eq. (33) for central projection camera matrices and parallel pro- transformed by a sub-multi-projection matrix or camera matrix jection, is only a linear camera model. In the present work, the C will lead to a subimage matrix, denoted as ψ. If all the image nonlinear distortion will not be considered for cameras. point coordinates in ψ have been normalized, denoted as ψ = S [ψ]. Then: Lemma 7(Null Vector for Singular Stereohomology). For sin- de f de f gular stereohomologydefined by Eq. (33), and any non-null ho- ψ == C Ξ ψ == C Ξ (39) mogeneous coordinate column vector (x), if and only if 0 , de f de f k R,(x) = k (s): T (x) = 0 ∃ ψ Λ == C Ξ ψ Λ == C Ξ (40) ∈ Elementary Matrix Representation of Some Commonly Used Geometric Transformations 9

The Λ matrix is an n n diagonal matrix. A subimage matrix Theorem 5 (Projective depth theorem). For a camera matrix has the same dimension× to the corresponding 4 n objective C , which has the image hyperplane π, and the projection through matrix. × which can be represented by Eq. (43) and (44), if all the points (x) are on the same hyperplane α, which satisfies α π, then Definition 31 (image matrix). An image matrix Ψ is a block i || all the projective depth γi in Eq. (44) should be a constant. matrix which consists of m different subimage matrices ψi (i = 1, , m), which can be obtained from transforming the 4 n Proof. Theorem 5 can be proved by analyzing the fourth entity × objective matrix Ξ or Ξ by the 4m 4 camera group matrix/ of each obtained image homogeneous coordinate vector (y)i in × multi-projection matrix P. If all the m subimage matrices ψi Eq. (44) since (y) = γ (y) , and γ is actually the fourth entity i i i i are normalized, then the image matrix is called a normalized of (y)i according to Definitions 23 and 24. image matrix, denoted as Ψ . An image matrix can be defined by: Theorem5 can be applied in the simplification for projec- tive depth matrix and its matrix dot multiplication operation in ψ1 C1 Ξ C1 reconstruction. C Ξ C def ψ2 2 2 Ψ === . = . = .  Ξ= P Ξ (41) Theorem 6 (Coordinate transformation of camera matrix). If . . . there exists a coordinate transformation L , which transforms        ψ   C Ξ   C  C C C = L C L 1  m   m   m  camera matrix 1 into 2. Then 2 1 ( )⊤ − . According to definition,  Ψ == S [Ψ ], and there exists a projective depth matrix Γ, which has the same dimension to the 4.2.3. Statements of projection and reconstruction proble ms image matrix Ψ and satisfies: Definition 33 (Statement of projection). Therefore the projec- tions of any n different points by m different cameras defined in Ψ ==Γ Ψ ==Γ S [ Ψ ] (42) ⊙ ⊙ Eq. (36) can thus be represented by: Definition 32 (projective depth and projective depth matrix). Ψ == P Ξ (46) Since the projection of a point X into Y through camera matrix 4m n 4m 4 4 n Ψ × × × C can be represented by: Here since 4m n can also be represented by Eq. (42), then we have: × Γ Ψ == P Ξ γ (y) = C (x) (43) 4m n 4m n 4m 4 4 n (47) × ⊙ × × × and n different points X1, X2, , Xn into Y1, Y2, , Yn through where Ξ represents the normalized objective matrix, of which 4 n C can be represented by: each column× is corresponding to a normalized homogeneous coordinate vector of an objective point, and Ψ4m n represents × C (x) (x) (x) the image matrix, which consists of the homogeneous coordi- 1 2 n nates of the M different projections. = γ1 (y)1 γ2 (y)2 γn (y)n Lemma 8 (Reconstruction Lemma). For the projection model γ1 0 0 . in Eq. (46) and Eq. (47), the statement of reconstruction is fea- =  0 γ2 0 .  sible for both Eq. (46) and Eq. (47), is equivalent to that, P is (y)1 (y)2 (y)n . . . .. (44) a column full-rank matrix, i.e., rank(P)=4.  . 0 0   0 0 γn    Proof. Actually, according to Speculation 1, Eq. (46) and E- γ1 γ2 γn   q. (47) already define a mapping from objective to the corre- γ γ γ =  1 2 n  (y)1 (y)2 (y)n sponding image sequences. So the problem is equivalent to γ1 γ2 γn ⊙   that, whether there exists an inverse mapping for Eq.(46) or  γ1 γ2 γn    Eq. (47).   Accordingto matrix analysis theory, if and only if rank(P)= For each camera C , denote the matrix dot multiplication + i =4, P has left inverse matrices, denoted as P . Eq.(46) or E- matrix in Eq.(44) as Γ , and that for the multiple camera pro- + i q. (47) premultiplying P will obtain the objective matrix from jection, as Γ, then we have the following equation: the image matrix, i.e., there exists an inverse mapping from im- age matrix into the objective matrix. Γ C Γ 1 ψ1 1 Here we don’t need to consider the matrix for Eq. (47). Γ C 2 ψ2 2 Γ Ψ =  .   .  =  .  Ξ (45) ⊙ . ⊙ . . Definition 34 (Statement of reconstruction). Simply, the recon-        Γ   ψ   C  struction equation of n points can be obtained from their projec-  m   m   m  In the aforementioned   equations Eq.(42),  (43), (44) and tion equation Eq. (47), denote the left inverse matrix of camera P P (45), γi is called projective depth, and the corresponding matri- group matrix as †, we have: ces Γ and Γi are the projective depth matrices for multi-projection matrix and for camera matrices respectively. Ξ == P† Γ Ψ (48) ⊙ Elementary Matrix Representation of Some Commonly Used Geometric Transformations 10

Theorem 7 (Feasibility of reconstruction). For the projection 4.2.4. Special camera models for reconstruction simplification and reconstruction model in the present work, from Specula- In some application circumstances, there are some camera tion 1 we can obtain the following corollaries: The reconstruc- group models, in which we can have the reconstruction work tion is feasible if and only if: simplified. (i) when all the camera matrices in a camera group matrix are Definition 35 (Simplified Camera group model Type I). The central projections, and there exists at least two projec- type I simplified camera group matrix P, consists of camera C = tion centers which do not coincide with each other; matrices i (i 1, , m), which have the common stereoho- = 2 mololgy hyperplane π, and the lines l j ( j 1, , Cm) across (ii) when all the camera matrices in a camera group matrix are any two of the stereohomologycenters of which, should be par- parallel projections, and there exists at least two projec- allel to the common stereohomology hyperplane π. tion directions, which do not coincide with each other; Property 7 (idealized central projection model reconstruction). (iii) when there are both central projection and parallel pro- In a reconstruction problem, if all the different views are ob- jection camera matrices in a camera group matrix. tained from the Type I simplified camera group model, then the calculation of projective depth matrix Γ can be omitted. Proof. To prove this statement, we only need to consider the case when the camera group matrix P has two different camer- Proof. The statement can be proved by using Theorem 5. C a matrices as sub-projection matrices. Suppose they are 1 and Definition 36 (Simplified Camera group model Type II). The C 2 with stereohomology centers of (s)1,(s)2 and image hyper- Type II simplified camera group matrix P, consists of camera planes of (π)1, and (π)2 respectively. Postmultiply an arbitrary matrices C (i = 1, , m), which are all parallel projection P i non-zero homogeneous coordinate vector (x) to , the current matrices. statement is equivalent to that, (x): P (x), 0. Since ∀ Property 8. In a reconstruction problem, if all the different

C1 C1 (x) views are obtained from the Type II simplified camera group P (x) = (x) = (49) Γ C2 C2 (x) model, then the calculation of projective depth matrix can be Use Lemma 7 to the partitioned block matrix C (x) and C (x) omitted. 1 2 in Eq. (49), the statement will be straightforward. Proof. The statement can be proved by using Theorem 5. Theorem 7 is applicable for all of the multiple projectionre- Definition 37 (Simplified Camera group model Type III). The construction problems using central/parallel projection camera Type III simplified camera group matrix P, consists of camera models with only Type I constraints. matrices Ci (i = 1, , m), which are all orthogonal parallel By definition, both Eq. (46) and Eq. (47) represents com- projection matrices. patible equations, therefore when P is column full-rank, the objective matrix obtained by premultiplying P+ to these equa- Property 9 (orthogonal parallel projection model reconstruc- + tion). In the 3D reconstruction problems based on a Type II tions, is a least norm solution, and the P is a least norm pseu- do inverse matrix for P. Due to perturbations, they usually are camera group matrix model, first, the calculation of the projec- tive depth matrix Γ can be omitted; second, the camera calibra- contradictory equations; then linear least square approximation tion can be greatly simplified. approach is used,and the left-inverse now denoted as P† in E- q. (48) is the Moore-Penrose pseudo-inverse of the P. The parallel projection model can be directly applied to Different P+s mean different approximation approaches to CAD circumstances, in which cameras are orthogonal parallel the solution. projection, the relative positions of cameras are simple, and the Γ Usually when we begin to reconstruct an objective from its matrix is not necessary for reconstruction. projections, the Γ matrix here may not be exactly equal to that in Eq. (47). What we really need is the objective matrix Ξ, and Conclusion the normalized Ξ can be obtained by applying normalization (1) The concept of stereohomology has been proposed refer- operation to Ξ. Then the reconstruction equation can be rewrit- ence coordinate system independently, which includes a ten as: series of commonly used geometric transformations of which the transformation matrices are elementary matri- Ξ == P† Γ′ Ψ (50) ⊙ ces. or : Ξ == P Γ Ψ (51) † ⊙ (2) The elementary matrix representation of stereohomology Ξ == S Ξ can be employed to represent the processes of projection then : [ ] and reconstruction in computer vision. A novel linear Ξ Ψ Γ In Eq. (51), symbols like , ,P†, , with a “wide hat” representation mathematical model has been presented. are used to represent the corresponding Ξ, Ψ , P , Γ with per- † (3) The current representation for 3D reconstruction actually turbation respectively, which may be from measurement, float- provides a possible axiomatic approach to reconstruction ing point roundoff, any kind of distortions, and so on. problems with only TYPE I constraints. Elementary Matrix Representation of Some Commonly Used Geometric Transformations 11

Acknowledgements [3] Alston S. Householder. The Theory of Matrices in Numerical Analysis, New York: Dover Publications,Inc., 1964 Removed to keep anonymous. [4] David Marr. Vision: A Computational Investigation into the Hu- man Representation and Processing of Visual Information. Free- man Publishers, 1982 References [5] H.C. Longuet-Higgins. A computer algorithm for reconstructing a scene from two projections. Nature, 293:133C135, Sept 1981 [1] Zi-qiang Chen. An investiation of perspective projection. Jour- [6] Gene H. Golub, Charles F. Van Loan. Matrix Computation. 3rd nal of East China University of Science & Technology, 2000, Ed.,Baltimore and London: The Johns Hopkins University Press, 26(2):201–205. (in Chinese) 1996 [2] Zi-qiang Chen. Meaning of elementary matrices in projective ge- [7] G. W. Stewart and J. Sun. Matrix Perturbation Theory. Academic ometry and its applications. Progress in Natural Science, 2005, Press, San Diego, 1990 15(9):1113–1122. (in Chinese)