Abstract
We study the problem of resecting the metric affine camera models from at least three non-colinear point correspondences. A direct application is plane pose estimation. We consider the three most popular metric affine cameras, namely the paraperspective, weak-perspective and orthographic cameras. For each model, we give an algebraic procedure which finds the optimal solution, where by optimal we mean the global minimizer of the reprojection error under the Euclidean norm. Our algebraic procedures cover both the minimal case of three points and the redundant cases of more than three points. They always return two solutions, as the problem has a two-way ambiguity on the rotation and translation for the three cameras in the general case. The scale of the paraperspective and weak-perspective cameras is, however, recovered uniquely. The orthographic case is the most involved and has not been solved analytically in the literature. We characterize its intrinsic complexity by showing that it reduces to finding the roots of an irreducible and non-solvable by radicals sextic polynomial. The previous algorithms for the paraperspective and weak-perspective cases have singularities, while, in contrast, our algebraic procedures do not.






Similar content being viewed by others
References
Arun, K., Huang, T., Blostein, S.: Least-squares fitting of two 3-D points sets. IEEE Trans. Pattern Anal. Mach. Intell. 9(5), 698–700 (1987)
Bartoli, A., Gérard, Y., Chadebecq, F., Collins, T., Pizarro, D.: Shape-from-template. IEEE Trans. Pattern Anal. Mach. Intell. 37(10), 2099–2118 (2015)
Cardoso, J.R., Zietak, K.: On a sub-Stiefel Procrustes problem arising in computer vision. Numer. Linear Algebra Appl. 22(3), 523–547 (2015)
Collins, T., Bartoli, A.: Locally affine and planar deformable surface reconstruction from video. In: International Workshop on Vision, Modeling and Visualization (2010)
Collins, T., Bartoli, A.: Infinitesimal plane-based pose estimation. Int. J. Comput. Vis. 109(3), 252–286 (2014)
Collins, T., Bartoli, A.: Planar structure-from-motion with affine camera models: closed-form solutions, ambiguities and degeneracy analysis. IEEE Trans. Pattern Anal. Mach. Intell. 39(6), 1237–1255 (2017)
Faugeras, O., Luong, Q.-T., Papadopoulo, T.: The Geometry of Multiple Images. MIT Press, Cambridge (2001)
Fischler, M.A., Bolles, R.C.: Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Comput. Vis. Graph. Image Process. 24(6), 381–395 (1981)
Hagedorn, T.R.: General formulas for solving solvable sextic equations. J. Algebra 233(2), 704–757 (2000)
Haralick, R.M., Joo, H., Lee, C., Zhuang, X., Vaidya, V.G., Kim, M.B.: Pose estimation from corresponding point data. IEEE Trans. Syst. Man Cybern. 6(19), 1426–1446 (1989)
Hartley, R.I., Zisserman, A.: Multiple View Geometry in Computer Vision, 2nd edn. Cambridge University Press, Cambridge (2003)
Henrion, D., Lasserre, J.B., Loefberg, J.: Gloptipoly 3: moments, optimization and semidefinite programming. Optim. Methods Softw. 24(4–5), 761–779 (2009)
Horaud, R., Dornaika, F., Lamiroy, B., Christy, S.: Object pose: the link between weak perspective, paraperspective and full perspective. Int. J. Comput. Vis. 22(2), 173–189 (1997)
Horn, B.K.P., Hilden, H.M., Negahdaripour, S.: Closed-form solution of absolute orientation using orthonormal matrices. J. Opt. Soc. Am. A 5(7), 1127–1135 (1988)
Klein, G., Murray, D.: Parallel tracking and mapping for small AR workspaces. In: International Symposium on Mixed and Augmented Reality (2007)
Oberkampf, D., DeMenthon, D.F., Davis, L.S.: Iterative pose estimation using coplanar feature points. Comput. Vis. Image Underst. 63(3), 495–511 (1996)
Snavely, N., Seitz, S.M., Szeliski, R.: Modeling the world from internet photo collections. Int. J. Comput. Vis. 80(2), 189–201 (2008)
Steger, C.: Algorithms for the orthographic-\(n\)-point problem. J. Math. Imaging Vis. (2017). https://doi.org/10.1007/s10851-017-0762-0
Steger, C.: A comprehensive and versatile camera model for cameras with tilt lenses. Int. J. Comput. Vis. 123(2), 121–159 (2017b)
Stewart, I.: Galois Theory, 4th edn. CRC Press, Boca Raton (2015)
Taylor, J., Jepson, A.D., Kutulakos, K.: Non-rigid structure from locally-rigid motion. In: International Conference on Computer Vision and Pattern Recognition (2010)
Umeyama, S.: Least-squares estimation of transformation parameters between two point patterns. IEEE Trans. Pattern Anal. Mach. Intell. 13(4), 376–380 (1991)
Acknowledgements
This research has received funding from the EU’s FP7 through the ERC research Grant 307483 FLEXABLE. We thank Florian Bugarin and Didier Henrion for their help in using Gloptipoly.
Author information
Authors and Affiliations
Corresponding author
Appendices
Translationless Formulation
We show how to eliminate the translation from the problem’s initial formulation (1). We compute the centre of gravity of the model points as:
We then define a new set of model points by centring the initial ones, meaning that we translate their centre of gravity to the origin:
Defining the translation for the new set of model points as \(\mathbf {t}' {\mathop {=}\limits ^{\text {def}}}\mathbf {t} + \mathtt P \mathbf {x}\), the problem is rewritten as:
Taking the partial derivatives of \(\mathcal {O}_2\) with respect to \(\mathbf {t}'\), we obtain:
where \(\mathbf {y} = \frac{1}{m}\mathtt Y \mathbf {1}\) is the centre of gravity of the observed points and \(\mathbf {x}' = \frac{1}{m}\mathtt X '\mathbf {1}\). Because the new model points in \(\mathtt X '\) were obtained by centring the model points in \(\mathtt X \), we have \(\mathbf {x}' = \mathbf {0}\). We thus obtain:
Defining \(\mathtt Y ' {\mathop {=}\limits ^{\text {def}}}\mathtt Y-\mathbf {y}{\mathbf {1}}^\top \) as a new set of observed points by centring the initial ones, we arrive at the translationless formulation:
Once the rotational part \(\mathtt P \) is estimated, the translation is given by:
Analytic Expression of the Cholesky Factor of \(\mathtt I +\mathbf {d}\mathbf {d}^\top \)
The Cholesky factor \(\mathtt V \) defined as \(\mathtt I +\mathbf {d}\mathbf {d}^\top = \mathtt V \mathtt V ^\top \) and its inverse are given by:
Aligning the Projection Direction to the Z-Axis
We need to choose \(\mathtt R _\mathbf {d}\in \mathbb {SO}_3\) such that \(\mathtt {\Pi }_\mathbf {d}\mathtt R _\mathbf {d} = [ \mathtt H \; \mathbf {0} ]\) for some matrix \(\mathtt H \in GL_2(\mathbb {R})\). This means finding a rotation which aligns the projection direction \(\mathbf {d}\) with the z-axis \(\mathop {\text {stk}}(0,0,1)\). In IPPE [5], we chose the smallest angle rotation, using Rodrigues’s formula. This has three limitations. (i) The formula fails for \(\mathbf {d} = \mathbf {0}\) and is unstable for \(\Vert \mathbf {d}\Vert _2\) small. (ii) The formula involves trigonometry. (iii) The analytic expression of the required \({\mathtt H}^{-1}\) and \(\det ({\mathtt H}^{-1})\) is very involved.
We propose a solution in radicals which addresses the above three limitations. This is a general solution, which has the smallest rotation solution as a special case. The requirement on \(\mathtt R _\mathbf {d}\) is rewritten as \(\mathtt {\Pi }_\mathbf {d} = [\mathtt H \;\mathbf {0}]\mathtt R _\mathbf {d}^\top \). Multiplying each side of this equation to the right by its transpose leads to \(\mathtt {\Pi }_\mathbf {d}\mathtt {\Pi }_\mathbf {d}^\top = \mathtt H \mathtt H ^\top \), or equivalently to \(\mathtt I +\mathbf {d}\mathbf {d}^\top = \mathtt H \mathtt H ^\top \). The general solution to this equation has one free degree of freedom and is given by \(\mathtt H = \mathtt V \mathtt F \), with \(\mathtt F \in \mathbb {O}_2\) an arbitrary orthonormal matrix and \(\mathtt V \in GL_2(\mathbb {R})\) a lower triangular matrix representing a Cholesky factor of \(\mathtt I +\mathbf {d}\mathbf {d}^\top = \mathtt V \mathtt V ^\top \). The first two rows of \(\mathtt R _\mathbf {d}^\top \) are obtained from \(\mathtt {\Pi }_\mathbf {d} = \mathtt H \mathtt {\Pi }_\mathbf {0} \mathtt R _\mathbf {d}^\top \) as \(\mathtt {\Pi }_\mathbf {0} \mathtt R _\mathbf {d}^\top = \mathtt F ^\top {\mathtt V}^{-1} \mathtt {\Pi }_\mathbf {d}\), and its third row is then obtained as their cross-product. A simple solution is obtained by choosing \(\mathtt F = \mathtt I \) as:
We have that \({\mathtt H}^{-1}\) is the leading \((2\times 2)\) sub-matrix of \(\mathtt R _\mathbf {d}^\top \), and \(\det ({\mathtt H}^{-1})\) is its bottom-right element. We propose an efficient algorithm to compute the Cholesky factor and its inverse, and matrix \(\mathtt R _\mathbf {d}\), given in Table 8.
Solution of the Rank-1 Equation of Type 3, \(z\mathbf {u}\mathbf {u}^\top + z\mathtt G = \mathtt K \)
Proposition 1
(Rank-1 equation, type 3) Let \(\mathtt G \in \mathbb {S}\) and \(\mathtt K \in \mathbb {S}\) be two known matrices. The following matrix equation defines three constraints on three unknowns in \(\mathbf {u} \in \mathbb {R} ^2\) and \(z\in \mathbb {R} ^+\):
Equation (36) has always a unique solution for z and one or two solutions for \(\mathbf {u}\). Let \(\mathtt V \in \mathbb {R} ^{2\times 2}\) be an upper triangular full rank matrix obtained from the Cholesky decomposition \(\mathtt G = \mathtt V \mathtt V ^\top \) and set \(\mathtt A \leftarrow {\mathtt V}^{-1}\mathtt K {\mathtt V}^{-\top }\). The solution for z is given by \(z = \lambda _2(\mathtt A)\). The two solutions for \(\mathbf {u}\) are given by \(\mathbf {u} = \pm \mathrm {rank}_1\!\!\left( \frac{1}{\lambda _2(\mathtt A)} \mathtt K -\mathtt G \right) \). They both vanish if \(\lambda _1(\mathtt A) = \lambda _2(\mathtt A)\).
Proof
Because \(\mathtt G \in \mathbb {S}\), we can always compute its Cholesky decomposition and rewrite Eq. (36) as:
with \(\mathbf {e} {\mathop {=}\limits ^{\text {def}}}{\mathtt V}^{-1} \mathbf {u}\) and \(\mathtt A {\mathop {=}\limits ^{\text {def}}}{\mathtt V}^{-1}\mathtt K {\mathtt V}^{-\top }\), \(\mathtt A \in \mathbb {S}\). Since \(z\mathbf {e}{\mathbf {e}}^\top = \mathtt A-z\mathtt I \) is rank-1 positive semi-definite, Eq. (37) is equivalent to:
Equation (39) implies \(\det (\mathtt A-z\mathtt I)=0\) and so \(\exists j \in \{1,2\}\), \(z=\lambda _j(\mathtt A)\). Equation (38) and Lemma 2 in Bartoli et al. [2] then imply that z has a single solution given by \(z=\lambda _2(\mathtt A)\). Substituting the solution for z into Eq. (36), we obtain:
and that \(\mathbf {u}\) is then obtained by invoking rank-1 factorization. Multiplying this equation by \({\mathtt V}^{-1}\) to the left and \({\mathtt V}^{-\top }\) to the right, we obtain:
whose right-hand side vanishes for \(\lambda _1(\mathtt A)=\lambda _2(\mathtt A)\), leading to \(\mathbf {e} = \mathbf {u} = \mathbf {0}\). \(\square \)
Solution of the Rank-1 Equation of Type 4, \(-z\mathbf {u}\mathbf {u}^\top + z\mathtt G = \mathtt K \)
Proposition 2
(Rank-1 equation, type 4) Let \(\mathtt G \in \mathbb {S}\) and \(\mathtt K \in \mathbb {S}\) be two known matrices. The following matrix equation defines three constraints on three unknowns in \(\mathbf {u} \in \mathbb {R} ^2\) and \(z\in \mathbb {R} ^+\):
Equation (40) has always a unique solution for z and one or two solutions for \(\mathbf {u}\). Let \(\mathtt V \in \mathbb {R} ^{2\times 2}\) be an upper triangular full rank matrix obtained from the Cholesky decomposition \(\mathtt G = \mathtt V \mathtt V ^\top \) and set \(\mathtt A \leftarrow {\mathtt V}^{-1}\mathtt K {\mathtt V}^{-\top }\). The solution for z is given by \(z = \lambda _1(\mathtt A)\). The two solutions for \(\mathbf {u}\) are given by \(\mathbf {u} = \pm \mathrm {rank}_1\!\!\left( \frac{1}{\lambda _1(\mathtt A)} \mathtt K -\mathtt G \right) \). They both vanish if \(\lambda _1(\mathtt A) = \lambda _2(\mathtt A)\).
Proof
The proof is very similar to the proof of proposition 1. The conditions are now:
from which we obtain \(z=\lambda _1(\mathtt A)\), and allow us to use rank-1 factorization to retrieve \(\mathbf {u}\). \(\square \)
Intersecting a Centred Ellipse and the Unit Circle
1.1 Problem Statement
Given \(\bar{\mathtt E} \in \mathbb {R} ^{2\times 2}\), \(\bar{\mathtt E} \succeq 0\), representing the centred ellipse, the problem is to solve for the intersection points with coordinates \(\mathbf {q}\in \mathbb {R} ^2\) such that:

The intersection points of two conics are generally found in two steps. The first step finds a degenerate member of the pencil defined by the two conics. This degenerate member is a pair of lines, and the second step is to recover and intersect these with one of the conics to retrieve the intersection points.
1.2 Finding the Degenerate Conic as a Pair of Lines
By expanding and equating Eqs. (43) and (44), we have:
and thus:
which represents one of the sought degenerate conics in the pencil. The degenerate conic \(\mathtt P {\mathop {=}\limits ^{\text {def}}}\mathop {\text {diag}}(\bar{\mathtt P},0)\) generally represents a pair of lines, but degenerates to a single line if \(\bar{\mathtt P} \) is rank-1. These two lines intersect at the origin, as \(\ker (\mathtt P) = \mathop {\text {stk}}(0,0,1)\). The two lines have homogeneous coefficient vectors \(\mathbf {m},\mathbf {l}\in \mathbb {R} ^3\), with \(m_3=l_3=0\), as they contain the origin. We have:
which we expand to:
Because the role of \(\mathbf {m}\) and \(\mathbf {l}\) is perfectly similar, we can find both by solving for only one of them. We chose to eliminate \(\bar{\mathbf {l}}\) and rewrite the first two equations as \(l_1=\frac{a'}{2m_1}\) and \(l_2=\frac{b'}{2m_2}\). Substituting into the third equation, we have:
This is a homogeneous quadratic in two variables. We solve for \(m_2\) by fixing \(m_1=1\) and rescale the result for convenience. Of the two solutions of the quadratic, one is associated with \(\bar{\mathbf {m}}\) and one to \(\bar{\mathbf {l}}\), giving:
The sign of \(\det (\bar{\mathtt P})\) gives the number of real intersection points up to symmetry about the origin: \(\det (\bar{\mathtt P})<0\) corresponds to two real intersection points, \(\det (\bar{\mathtt P})=0\) corresponds to one real intersection point, and \(\det (\bar{\mathtt P})>0\) corresponds to two complex intersection points.
1.3 Intersecting the Pair of Lines with the Unit Circle
By intersecting the two lines with the unit circle, we retrieve the two solution points up to symmetry, with coordinates \(\mathbf {q}_1,\mathbf {q}_2 \in \mathbb {R} ^2\). We have:
and:
Because we only need \(\mathbf {q}_1\) and \(\mathbf {q}_2\) up to scale, we have:
and:
Expanding, and using \(\det (\bar{\mathtt P}) = 1+\det (\bar{\mathtt E}) - \text {tr}(\bar{\mathtt E})\), we rewrite these compactly in terms of \(\bar{\mathtt E} \) as:
Impossibility of Cases \(1.\mathtt x.\mathtt x \) Other Than 1.2.2
Case 1.2.2 is studied in Sect. 4.5. We show that all other sub-cases of \(1.\mathtt x.\mathtt x \) are impossible under the problem’s inputs.
1.1 Case 1.1.2
We first specialize the parameterization of cases \(1.\mathtt x.\mathtt x \) and reduce it to two unknowns. We then show that the orthonormality constraint yields a pair of incompatible equations on one of these two unknowns.
1.1.1 Specializing the Parameterization
We have \(\mathrm {rank}(\mathtt M)=\mathrm {rank}(\mathtt M _1)=1\). This is equivalent to \(\beta = -\sigma _1^2\), as shown in Sect. 4.5.1. Using parameterization (20), we thus have:
1.1.2 Reducing the Unknowns to \(\alpha ,\nu \in \mathbb {R} \)
Solving for \(\mathbf {q}\). We have from Eq. (16) that:
It is easy to verify that this matrix has \(\mathbf {q}\) as nullvector and \(\mathtt S \mathbf {q}\) as eigenvector, with eigenvalue \(\sigma _1^2\). Still using Eq. (16), we thus have:
Left-multiplying by \(\mathbf {q}^\top \) gives \(\mathbf {q}^\top \mathbf {z}_1' = 0\). Because \(\Vert \mathbf {q}\Vert _2=1\), we obtain:
Solving for \(\mathbf {b}_2\). We have from Eq. (17) that:
By substituting \(\mathtt M _2 = \mathtt M + \sigma _2^2\mathtt I = -\sigma _1^2\mathbf {q}\mathbf {q}^\top + \sigma _2^2\mathtt I \), and \(\mathbf {q}\) from Eq. (46), we obtain:
Solving for \(\mathbf {b}_1\). We left-multiply Eq. (45) by its eigenvector \(\mathbf {q}^\top \mathtt S ^\top \), giving:
Substituting \(\mathbf {q}\) from Eq. (46), we obtain:
Because \(\mathtt S ^\top \mathtt S ^\top = - \mathtt I \), we arrive at:
The general solution to this equation has one free parameter \(\nu \in \mathbb {R} \) and takes the form:
Expressing \(\mathbf {b}\). We use the expression \(\mathbf {b} = \alpha \mathtt S \mathbf {q}\) from parameterization (21), giving, using Eq. (46):
1.1.3 Impossibility
We have a reduced expression of \(\mathtt A \) in terms of the two unknowns \(\alpha ,\nu \in \mathbb {R} \), from expressions (48) and (47) of \(\mathbf {b}_1\) and \(\mathbf {b}_2\), and (49) of \(\mathbf {b}\). We observe that they have a stronger dependency on \(\mathbf {z}_1'\) than on \(\mathbf {z}_2'\). We thus use the formulation group to fix \(Z_{2,1}=0\), giving the following simplified expression for \(\mathtt A \):
It is then straightforward to see that the orthonormality constraint \(\mathtt A \mathtt A ^\top = \mathtt I \) yields three equations, one quadratic in \(\alpha \), \(\Vert [1\;0]\mathtt A \Vert _2^2=1\), one quadratic in \(\nu \), \(\Vert [0\;1]\mathtt A \Vert _2^2=1\), and one linear in \(\nu \), \([1\;0]\mathtt A \mathtt A ^\top \mathop {\text {stk}}(0,1)=0\). The linear equation in \(\nu \) gives:
and the quadratic equation gives two complex solutions:
with \(i^2 = \sqrt{-1}\). The linear and the quadratic equations are thus compatible only if they both vanish, which occurs if \(\sigma _2=0\), which contradicts the hypothesis of non-colinearity of the model points, or \(Z_{2,2}=0\), which, because \(Z_{2,1}=0\), contradicts the hypothesis that \(\mathrm {rank}(\mathtt Z)=2\).
1.2 Case 1.2.1
The proof of impossibility is obtained very similarly to case 1.1.2. We have:
We use to formulation group to set \(Z_{1,2}=0\), which leads, using the orthonormality constraint, to two incompatible equations in \(\nu \).
1.3 Case 1.1.1
We have \(\mathrm {rank}(\mathtt M) = \mathrm {rank}(\mathtt M _1)= \mathrm {rank}(\mathtt M _2) = 1\) and \(\sigma _1 = \sigma _2\). Following cases 1.1.2 and 1.2.1, we have:
Therefore, we must have \(\mathbf {z}_1' \propto \mathbf {z}_2'\), which contradicts the hypothesis that \(\mathrm {rank}(\mathtt Z) = 2\).
1.4 Cases \(1.0.\mathtt x \)
We have \(\mathtt M _1=\mathtt 0 \), and from Eq. (16) and parameterization (20):
The off-diagonal equation reduces to \(\beta q_1 q_2 = 0\), which means that one of these three variables must vanish. However, the diagonal equations are \(\beta q_1^2 + \sigma _1^2 = 0\) and \(\beta q_2^2 + \sigma _1^2 = 0\). Because \(\sigma _1\not =0\), they, respectively, imply \(\beta \not =0\), \(q_1\not =0\) and \(\beta \not =0\), \(q_2\not =0\), which contradicts the off-diagonal equation.
1.5 Cases \(1.\mathtt x.0\)
We have \(\mathtt M _2 = \mathtt 0 \) and follow cases \(1.0.\mathtt x \) to discard this case.
Algebraic Procedure for the Weak-Perspective Camera
We give our algebraic procedure for the weak-perspective camera, obtained as a simplication of the paraperspective camera case, in Table 9.
Derivation Details for Case \(2.\mathtt x.\mathtt x \)
We derive an optimized solution for case \(2.\mathtt x.\mathtt x \) using the formulation give in Sect. 4.4.
Solving for \(\mathtt B \). We define \(\mathbf {z} {\mathop {=}\limits ^{\text {def}}}\text {vect}(\mathtt Z)\), \(\mathbf {g} {\mathop {=}\limits ^{\text {def}}}\mathop {\text {stk}}(a,b)\) and:
This allows us to rewrite the cost function as:
We find the optimal solution for \(\mathbf {g}\). We define a Lagrange multiplier \(\ell \) to enforce the constraint \(a^2+b^2=1\) and the Lagrangian:
Differentiating with respect to \(\mathbf {g}\) and nullifying, we obtain:
We obtain \(\mathbf {g}\) as a function of \(\ell \) and s as:
We determine two possible values for \(\ell \) by substituting the solution for \(\mathbf {g}\) into the constraint, giving:
which we expand to the following quadratic in \(\ell \):
The discriminant is \(\delta = 4\left\| {\mathtt K}^\top \mathbf {z}\right\| _2^2 > 0\), and we thus obtain:
As expected, we obtain \(\mathbf {g}\) with unitary norm as:
The final step is to find the optimal solution for s and r. Substituting the solution for \(\mathbf {g}\) into the cost function yields:
Expanding the cost function, we obtain:
The first and second terms do not depend on r. The third term may be rewritten as:
and is thus minimized for \(r=1\). We now solve for s. The problem becomes:
We have \(\Vert \mathtt K \mathbf {h}\Vert _2^2 = (\sigma _1^2+\sigma _2^2) \Vert \mathbf {h}\Vert _2^2\), and we can thus expand the cost function as:
Only the last term depends on s. Because of the negative sign, we have to maximize it, and because it is always positive, we can maximize its square. We thus have:
The cost function is expanded to:
Only the last term depends on s, and we thus have \(s=\mathop {\mathrm {sign}}(\det (\mathtt Z))\).
Rights and permissions
About this article
Cite this article
Bartoli, A., Collins, T. Plane-Based Resection for Metric Affine Cameras. J Math Imaging Vis 60, 1037–1064 (2018). https://doi.org/10.1007/s10851-018-0794-0
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10851-018-0794-0