a bundle of functions to check the statments in of the rigid multiview variety paper
The multiview variety from computer vision is generalized to images by n cameras of points linked by a distance constraint. The resulting five-dimensional variety lives in a product of 2n projective planes. We determine defining polynomial equations, and we explore generalizations of this variety to scenarios of interest in applications.READ FULL TEXT VIEW PDF
a bundle of functions to check the statments in of the rigid multiview variety paper
The emerging field of Algebraic Vision is concerned with interactions between computer vision and algebraic geometry. A central role in this endeavor is played by projective varieties that arise in multiview geometry .
The set-up is as follows: A camera is a linear map from the three-dimensional projective space to the projective plane , both over . We represent cameras by matrices of rank . The kernel of is the focal point . Each image point of camera has a line through as its fiber in . This is the back-projected line.
We assume throughout that the focal points of the cameras are in general position, i.e. all distinct, no three on a line, and no four on a plane. Let denote the line in spanned by the focal points and . This is the baseline of the camera pair . The image of the focal point in the image plane of the camera is the epipole . Note that the baseline is the back-projected line of with respect to and also the back-projected line of with respect to . See Figure 1 for a sketch.
Fix a point in which is not on the baseline , and let and be the images of under and . Since is not on the baseline, neither image point is the epipole for the other camera. The two back-projected lines of and meet in a unique point, which is . This process of reconstructing from two images and is called triangulation [5, §9.1].
The triangulation procedure amounts to solving the linear equations
For general data we have , where is obtained from by deleting the th row. Cramer’s Rule can be used to recover . Let
be the column vector formed by the signed maximal minors of. Write for the first four coordinates of . These are bilinear functions of and . They yield
We note that, in most practical applications, the data will be noisy, in which case triangulation requires techniques from optimization .
The multiview variety of the camera configuration was defined in  as the closure of the image of the rational map
The points are the consistent views in cameras. The prime ideal of was determined in [3, Corollary 2.7]. It is generated by the bilinear polynomials plus further trilinear polynomials. See  for the natural generalization of this variety to higher dimensions.
The analysis in  was restricted to a single world point . In this paper we study the case of two world points that are linked by a distance constraint. Consider the hypersurface in defined by
The affine variety in consists of pairs of points whose Euclidean distance is . The rigid multiview map is the rational map
The rigid multiview variety is the image of this map. This is a -dimensional subvariety of . Its multihomogeneous prime ideal lives in the polynomial ring , where and are coordinates for the th factor on the left respectively right in . Our aim is to determine the ideal . Knowing generators of has the potential of being useful for designing optimization tools as in  for triangulation in the presence of distance constraints.
The choice of world and image coordinates for the camera configuration gives our problem the following group symmetries. Let be an element of the Euclidean group of motions , which is generated by rotations and translations. We may multiply the camera configuration on the right by to obtain . Then since is invariant under . For , we may multiply on the left to obtain . Then .
This paper is organized as follows. In Section 2 we present the explicit computation of the rigid multiview ideal for . Our main result, to be stated and proved in Section 3, is a system of equations that cuts out the rigid multiview variety for any . Section 4 is devoted to generalizations. The general idea is to replace by arbitrary subvarieties of that represent polynomial constraints on world points. We focus on scenarios that are of interest in applications to computer vision.
Our results in Propositions 1, 3, 4 and Corollary 2 are proved by computations with Macaulay2 ; for details see Appendix A. Following standard practice in computational algebraic geometry, we carry out the computation on many samples in a Zariski dense set of parameters, and then conclude that it holds generically.
In this section we offer a detailed case study of the rigid multiview variety when the number of cameras is small. We begin with the case . The prime ideal lives in the polynomial ring in variables. This is the homogeneous coordinate ring of , so it is naturally -graded. The variables have degree , the variables have degree , the variables have degree , and the variables have degree . Our ideal is -homogeneous.
Throughout this section we shall assume that the camera configuration is generic in the sense of algebraic geometry. This means that lies in the complement of a certain (unknown) proper algebraic subvariety in the affine space of all -tuples of -matrices. All our results in Section 2 were obtained by symbolic computations with sufficiently many random choices of (see Appendix A
for details). Such choices of camera matrices are generic. They will be attained with with probability.
For , the rigid multiview ideal is minimally generated by eleven -homogeneous polynomials in twelve variables, one of degree , one of degree , and nine of degree .
Let us look at the result in more detail. The first two bilinear generators are the familiar -determinants
These cut out two copies of the multiview threefold , in separate variables, for and . If we write the two bilinear forms in (6) as and then is a real -matrix of rank , known as the fundamental matrix [5, §9] of the camera pair .
The rigid multiview variety is a divisor in . The nine octics that cut out this divisor can be understood as follows. We write and for the -matrices in (6), and and for the matrices obtained by deleting their th rows. The kernels of these -matrices are represented, via Cramer’s Rule, by and . We write and for the vectors given by their first four entries. As in (2), these represent the two world points and in . Their coordinates are bilinear forms in or , where each coefficient is a -minor of . For instance, writing for the entry of , the first coordinate of is
Recall that the two world points in are linked by a distance constraint (4), expressed as a biquadratic polynomial . We set , where is a quadrilinear form. We regard
as a tensor of order. It lives in the subspace of . Here denotes the space of symmetric tensors of order .
We now substitute our Cramer’s Rule formulas for and into the quadrilinear form . For any choice of indices and ,
is a multihomogeneous polynomial in of degree . This polynomial lies in but not in the ideal of , so it can serve as one of the nine minimal generators described in Proposition 1.
The number of distinct polynomials appearing in (7) equals . A computation verifies that these polynomials span a real vector space of dimension . The image of that vector space modulo the degree component of the ideal has dimension .
We record three more features of the rigid multiview with cameras. The first is the multidegree [9, §8.5], or, equivalently, the cohomology class of in . It equals
This is found with the built-in command multidegree in Macaulay2.
The second is the table of the Betti numbers of the minimal free resolution of in the format of Macaulay2 . In that format, the columns correspond to the syzygy modules, while rows denote the degrees. For we obtain
0 1 2 3 4 5 total: 1 11 25 22 8 1 0: 1 . . . . . 1: . 2 . . . . 2: . . 1 . . . 7: . 9 24 22 8 1
The column labeled 1 lists the minimal generators from Proposition 1. Since the codimension of is , the table shows that is not Cohen-Macaulay. The unique th syzygy has degree in the -grading.
The rigid multiview ideal for is generated by together with the nine polynomials for .
We next come to the case of three cameras:
For , the rigid multiview ideal is minimally generated by polynomials in variables. Its Betti table is given in Table 1.
Proposition 3 is proved by computation. The generators occur in eight symmetry classes of multidegrees. Their numbers in these classes are
For instance, there are nine generators in degree , arising from Proposition 1 for the first two cameras. Using various pairs among the three cameras when forming the matrices and in (7), we can construct the generators of degree classes and .
Table 1 shows the Betti table for in Macaulay2 format. The first two entries (6 and 2) in the 1-column refer to the eight minimal generators of . These are six bilinear forms, representing the three fundamental matrices, and two trilinear forms, representing the trifocal tensor of the three cameras (cf. , [5, §15]). The entry 1 in row 5 of column 1 marks the unique sextic generator of , which has -degree .
For the case of four cameras we obtain the following result.
For , the rigid multiview ideal is minimally generated by polynomials in variables. All of them are induced from . Up to symmetry, the degrees of the generators in the -grading are
We next give a brief explanation of how the rigid multiview ideals were computed with Macaulay2 . For the purpose of efficiency, we introduce projective coordinates for the image points and affine coordinates for the world points. We work in the corresponding polynomial ring
The rigid multiview map is thus restricted to . The prime ideal of its graph is generated by the following two classes of polynomials:
the minors of the matrices
the dehomogenized distance constraint
From this ideal we eliminate the six world coordinates .
For a speed up, we exploit the group actions described in Section 1. We replace and by and . Here and are chosen so that is sparse. The modification to is needed since we generally use . The elimination above now computes the ideal , and it terminates much faster. For example, for , the computation took two minutes for sparse and more than one hour for non-sparse . For , Macaulay2 ran out of memory after 18 hours of CPU time for non-sparse . The complete code used in this paper can be accessed via http://www3.math.tu-berlin.de/combi/dmg/data/rigidMulti/.
One last question is whether the Gröbner basis property in [3, §2] extends to the rigid case. This does not seem to be the case in general. Only in Proposition 1 can we choose minimal generators that form a Gröbner basis.
Let . The reduced Gröbner basis of in the reverse lexicographic term order is a minimal generating set. For a generic choice of cameras the initial ideal equals
For special cameras the exact form of the initial ideal may change. However, up to symmetry the degrees of the generators in the -grading stay the same. In general, a universal Gröbner basis for the rigid multiview ideal consists of octics of degree plus the two quadrics (6). This was verified using the Gfan  package in Macaulay2. Analogous statements do not hold for .
The computations presented in Section 2 suggest the following conjecture.
The rigid multiview ideal is minimally generated by polynomials. These polynomials come from two triples of cameras, and their number per class of degrees is
At the moment we have a computational proof only up to. Table 2 offers a summary of the corresponding numbers of generators.
Conjecture 6 implies that is set-theoretically defined by the equations coming from triples of cameras. It turns out that, for the set-theoretic description, pairs of cameras suffice. The following is our main result:
Suppose that the focal points of are in general position in . The rigid multiview variety is cut out as a subset of by the octic generators of degree class . In other words, equations coming from any two pairs of cameras suffice set-theoretically.
With notation as in the introduction, the relevant octic polynomials are
for all possible choices of indices. Let denote the ideal generated by these polynomials in , the polynomial ring in variables. As before, we write for the prime ideal that defines the -dimensional variety in . It is generated by bilinear forms and trilinear forms, corresponding to fundamental matrices and trifocal tensors. In light of Hilbert’s Nullstellensatz, Theorem 7 states that the radical of is equal to . To prove this, we need a lemma.
A point in the multiview variety is triangulable if there exists a pair of indices such that the matrix has rank . Equivalently, there exists a pair of cameras for which the unique world point can be found by triangulation. Algebraically, this means for some .
All points in are triangulable except for the pair of epipoles, , in the case where . Here, the rigid multiview variety contains the threefolds and .
Let us first consider the case of cameras. The first claim holds because the back-projected lines of the two camera images and always span a plane in except when and . In that case both back-projected lines agree with the common baseline . Alternatively, we can check algebraically that the variety defined by the -minors of the matrix consists of the single point .
For the second claim, fix a generic point in and consider the surface
Working over , the baseline is either tangent to , or it meets that quadric in exactly two points. Our assumption on the genericity of implies that no point in the intersection is a focal point. This gives
The point lies in the multiview variety . Each generic point in has this form for some . Hence (9) proves the desired inclusion . The other inclusion follows by switching the roles of and .
If there are more than two cameras then for each world point , due to general position of the cameras, there is a pair of cameras such that avoids the pair’s baseline. This shows that each point is triangulable if . ∎
It follows immediately from the definition of the ideals in question that the following inclusion of varieties holds in :
We prove the reverse inclusion. Let be a point in the right hand side.
Suppose that and are both triangulable. Then has a unique preimage in , determined by a single camera pair . Likewise, has a unique preimage in , also determined by a single camera pair . There exist indices such that
Suppose that is not in . Then . This implies
and hence . This is a contradiction to our choice of .
It remains to consider the case where is not triangulable. By Lemma 8, we have , as well as and . The case where is not triangulable is symmetric, and this proves the theorem. ∎
The equations in Theorem 7 are fairly robust, in the sense that they work as well for many special position scenarios. However, when the cameras are generic then the number of octics that cut out the divisor inside can be reduced dramatically, namely to .
As a subset of the -dimensional ambient space , the -dimensional rigid multiview variety is cut out by polynomials of degree class . One choice of such polynomials is given by
First we claim that for each triangulable point at least one of the matrices or has rank , and the same for with or . We prove this by contradiction. By symmetry between and , we can assume that . Then , , and . However, this last equality of the two epipoles is a contradiction to the hypothesis that the focal points of the cameras are not collinear.
Next we claim that if has rank then at least one of the submatrices or has rank , and the same for , and . Note that the bottom submatrix of has rank , since the first four columns are linearly independent, by genericity of and . The claim follows. ∎
In this section we discuss several extensions of our results. A first observation is that there was nothing special about the constraint in (4). For instance, fix positive integers and , and let be any irreducible polynomial that is bihomogeneous of degree . Its variety is a hypersurface of degree in . The following analogue to Theorem 7 holds, if we define the map as in (5).
The closure of the image of the map is cut out in by polynomials of degree class . In other words, the equations coming from any two pairs of cameras suffice set-theoretically.
In the generic case, we can replace by 16, as in Corollary 9.
Another natural generalization is to consider world points that are linked by one or several constraints in . Taking images with cameras, we obtain a variety which lives in . For instance, if and are constrained to lie on a plane in , then and is a variety of dimension in . Taking -matrices as in (1) for the four points, we then form
For we verified with Macaulay2 that the prime ideal is generated by of these determinants, along with the four bilinear forms for .
The variety is cut out in by the polynomials from (10). In other words, the equations coming from any two pairs of cameras suffice set-theoretically.
To continue the theme of rigidity, we may impose distance constraints on pairs of points. Fixing a nonzero distance between points and gives
We are interested in the image of the variety