New insights on Multi-Solution Distribution of the P3P Problem
Bo Wang, Hao Hu, Caixia Zhang

TL;DR
This paper provides new geometric insights into the solution distribution of the P3P problem, revealing how the number of solutions changes with the optical center's position relative to specific toroids, and clarifying the relationship with roots of the quartic equation.
Contribution
It establishes explicit geometric conditions linking P3P solutions to roots of the quartic, identifying critical surfaces and points that influence solution count and stability.
Findings
When outside all 6 toroids, roots correspond to true solutions with 2 or 4 solutions.
Passing through a toroid changes the number of solutions by 1, either increasing or decreasing.
Solutions near control points are affected by the position relative to the toroids, which are critical surfaces.
Abstract
Traditionally, the P3P problem is solved by firstly transforming its 3 quadratic equations into a quartic one, then by locating the roots of the resulting quartic equation and verifying whether a root does really correspond to a true solution of the P3P problem itself. However, a root of the quartic equation does not always correspond to a solution of the P3P problem. In this work, we show that when the optical center is outside of all the 6 toroids defined by the control point triangle, each positive root of the Grunert's quartic equation must correspond to a true solution of the P3P problem, and the corresponding P3P problem cannot have a unique solution, it must have either 2 positive solutions or 4 positive solutions. In addition, we show that when the optical center passes through any one of the 3 toroids among these 6 toroids ( except possibly for two concentric circles) , the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · graph theory and CDMA systems · Computational Geometry and Mesh Generation
New insights on Multi-Solution Distribution of the P3P Problem
Bo Wang
Institute of Automation, Chinese Academy of Sciences
Hao Hu
Ming Hsieh Department of Electrical Engineering, University of Southern California
Caixia Zhang
College of Science, North China University of Technology
Abstract
Traditionally, the P3P problem is solved by firstly transforming its 3 quadratic equations into a quartic one, then by locating the roots of the resulting quartic equation and verifying whether a root does really correspond to a true solution of the P3P problem itself. However, a root of the quartic equation does not always correspond to a solution of the P3P problem . In this work, we show that when the optical center is outside of all the 6 toroids defined by the control point triangle, each positive root of the Grunert’s quartic equation must correspond to a true solution of the P3P problem, and the corresponding P3P problem cannot have a unique solution, it must have either 2 positive solutions or 4 positive solutions. In addition, we show that when the optical center passes through any one of the 3 toroids among these 6 toroids ( except possibly for two concentric circles) , the number of the solutions of the corresponding P3P problem always changes by 1, either increased by 1 or decreased by 1.Furthermore we show that such changed solutions always locate in a small neighborhood of control points, hence the 3 toroids are critical surfaces of the P3P problem and the 3 control points are 3 singular points of solutions. A notable example is that when the optical center passes through the outer surface of the union of the 6 toroids from the outside to inside, the number of the solutions must always decrease by 1. Our results are the first to give an explicit and geometrically intuitive relationship between the P3P solutions and the roots of its quartic equation. It could act as some theoretical guidance for P3P practitioners to properly arrange their control points to avoid undesirable solutions.
1 Introduction
The Perspective-3-Point Problem, or P3P problem, is a single-view based pose estimation method. It was first introduced by Grunert [1] in 1841, and popularized in computer vision community a century later by mainly the Fishler and Bolles’ work in 1981[2]. The P3P problem requires the least number of points to have a finite number of solutions and no feature-matching across views is needed. It has been widely used in various fields ([6],[7],[8],[9],[10],[11],[12],[17]). For its minimal demand in restricted working enrironment and compuational efficiency in RANSAC framework, the P3P problem is preferred due to its minimum requirement. The P3P problem can be defined as: Given the perspective projections of three control points with known coordinates in the world system and a calibrated camera, to determine the position and orientation of the camera in the world system. It is shown that[5] the P3P problem could have 1,2,3 or at most 4 solutions depending on the configuration between the optical center and its 3 control points. Since in any real applications, some basic questions must be answered before any real implementation, such as does it has a unique solution? If not, how many solutions could it have? Is the solution stable? etc., the multiple solution phenomenon in the P3P problem has been a focus of investigation since its very inception in the literature. Traditionally the multi-solution phenomenon in P3P problem is analyzed by at first transforming its 3 quadratic constraints into a quartic equation, then multiple roots of the quartic equation are located to derive possible solutions. For example, Haralick et al summarized 6 different transformation methods[5] . Gao et al. [3] gave a complete solution classification in an algebraic way. Gao et al. [4] also gave an analysis on the solutions distribution in a probabilistic way. Recently, Rieck ([13],[14],[15]) gave a systematic analysis on the multi-solution phenomenon via his introduced novel algebraic entities, in particular on the distribution of multiple solutions around the danger cylinder and their stability problem. From a geometric way, Zhang and Hu[21] showed that when the optical center lies on the danger cylinder, the P3P problem must have 4 solutions, one is a double solution, and when the optical center lies on the three vertical planes, the P3P problem must have a pair of side-sharing solutions and a pair of point-sharing solutions [20]; Sun and Wang [16] gave an interpretation of the solution changes at the intersecting lines of the three vertical planes with the danger cylinder. Wu and Hu [19] gave a thorough investigation on the degenerate cases. Although many results are reported in these literature, some key questions still persist: for example, it is well known that a root of the resulting quartic equation does not necessarily correspond to a solution of the P3P problem itself. It could in fact correspond to 2, 1 solutions, even no solution at all. In other words, a one-to-one relationship between a root and a solution does not exist in general case, but under what conditions does some definitive relation exist? It is still an open question up to now.Another essential question is: what is the relationship between the number of solutions and the position of optical center in geometric view? In this work, we try to give answers to the above questions, our main contributions are 3-fold:
(1). We show that given 3 control points, when the optical center is outside of the 6 toroids, the corresponding P3P problem cannot have a unique solution, it can only have either 2 solutions or 4 solutions.
(2). We show that given 3 control points, when the optical center is outside of the 6 toroids, each positive root of the Grunert’s quartic equation must correspond to a positive solution of the P3P problem, or in this restricted case, a one-to-one relationship does exist between a root and a solution, and our result seems the first in the literature to establish such a one-to-one relationship. In addition, this conclusion holds also for the other 5 different methods by Haralick[5].
(3). We show that given 3 control points , the 6 toroids can be divided into two groups, when the optical center passes through a toroid in one group, the number of the solutions of the corresponding P3P problem must change exactly by one, either increased by one, or decreased by one. However when the optical center passes through a toroid in the other group, the number of the solutions of the corresponding problem does not change, but its S-solution( see the main text for its definition) changes from one to another. This result shows that the 3 toroids must act as some kinds of critical surfaces in term of the solution distribution of the P3P problem.
The above three results provide some new insights into the nature of the multi-solution phenomenon in P3P problem, and could be also of theoretical guidance to P3P practitioners in addition to their academic values. The paper is organized as follows: The next section is some preliminaries as well as some new concepts, including the supplementary P3P problem and supplementary-solution, or S-solution; The main results are reported in Section 3, and Section 4 is some concluding remarks.
2 Preliminaries
For the notational convenience, some preliminaries on the P3P problem are provided at first.
2.1 P3P Problem and Its Corresponding Supplementary Problems
As shown in Fig.1, are the three control points with known distance , , , is the optical center. Since the camera ( under the pinhole model) is calibrated, the three subtended angles of the projection rays can be considered known entities, then by the Law of Cosines, the following 3 basic constraints on the three unknown in (1) must hold.
[TABLE]
Hence the P3P problem is meant to determine such positive triplets satisfying the 3 basic constraints in (1).
Given a P3P problem in (1), we can define its supplementary problem in (2):
[TABLE]
Since the constraint system (2) is obtained by replacing and in (1) by their respective supplementary angle () and (), the corresponding problem is called the supplementary problem of the original P3P problem in this work. Similarly, the supplementary problem, and supplementary problem can be defined.
2.2 Solution and S-Solution of the P3P Problem
A P3P solution is a positive triplet () satisfying the 3 constraints in (1) since any distance must be positive. Note that if a real-valued triplet() satisfying (1) and if , the signs of could be:
(1): all three positive; (2): all three negative; (3): two positive and one negative; (4): two negative and one positive.
In addition, since if a triplet () satisfies (1), () must also satisfy (1), we need only consider those triplets with all three positive elements or two positive elements + one negative element. As we have said, a positive triplet satisfying (1) is a solution of the P3P problem. For a triplet () with one negative element + two positive elements and satisfying (1), say (), its positive counterpart () must be a solution of its supplementary problem (2), hereinafter, such a triplet () is called a supplementary solution, in short, a S-solution, of the original P3P problem. In sum, a non-zero-real-valued triplet satisfying (1) corresponds to either a solution or a S-solution of the original P3P problem.
2.3 The 6 Toroids
As shown in Fig.2, by rotating the circumcircle of the triangle around one of its three sides separately, 3 pairs of toroids can be generated [18], denoted as (),(),()(see their definitions in the next section). In section 3 we will show that these 6 toroids play a very important role for the multiple solution phenomenon in the P3P problem.
2.4 Grunert’s Quartic Equation and Its Possible Root Distributions
As shown in [5], by setting and by some algebraic manipulations, a quartic equation in can be derived from (1) as:
[TABLE]
where the first and last coefficients have the following form:
[TABLE]
the above (4) indicates that if the optical center is not on the toroid pair (), . If is outside of their union, then . Otherwise if is inside of their union, . Similarly, (5) indicates that if the optical center is not on toroid pair (), . If is outside of their union, then . Otherwise if is inside of their union, . Clearly if the optical center lies on either outside of the union of the 4 toroids (),(), or inside of their intersection, always hold, which in turn implies that the quartic equation in (3) can have either two real roots + a pair of complex roots, or 4 real roots, including possible repeated roots.
2.5 Notational Definitions
For the notational convenience, we first introduce some definitions.
- •
: The toroid generated by rotating the circular arc with the fixed inscribed angle of around the circular segment BC by ; Similarly,there are , .
- •
: The circumsphere of the P3P problem, defined as the sphere such that the circumcircle of the P3P problem is a great circle of the sphere.
- •
: The set of the points inside and on the closed surface .
- •
: The union of the 6 point sets:, , , , , .
- •
: The outer normal vector of the toroid at point ;
- •
: The intersecting curve of the two toroids: and .
3 Main Results
Some new results are introduced which include five theorems. They are some geometric conditions on distribution of a unique solution and changes of the numbers of solutions.
3.1 The Role of to the Number of the P3P Multi-Solution
In the following theorem 1 and 2, we show that when the optical center locates outside of Tunion, the P3P problem cannot have a unique solutiosn, and each positive root of the Grunert’s derivation correspond to a solution of the P3P problem.
Theorem 1**.**
*If the optical center is outside of , the corresponding P3P problem cannot have a unique solution, it must have at least two solutions. *
Before giving a formal proof of Theorem 1, we introduce at first the following three lemmas:
Lemma 1**.**
*Assume is an arbitrary point on the circumsphere, , of the P3P problem ,then the subtended angles of P to the three control points (), must satisfy the following condition: . *
Proof**.**
Since the circumcircle of the triangle is a great circle of , its radius must be no less than that of the circumcircle of the triangle . As shown in Fig.3, for any point on the circumcircle of the triangle , the above inequalities must hold.
Lemma 2**.**
*If the optical center is outside of , the corresponding P3P problem has no S-solutions. *
Proof**.**
Proofs by Contradiction: Suppose the optical center is outside of , and the corresponding P3P problem did have a S-solution. Without loss of generality, assume the S-solution is (), by definition of S-solution, the triplet () must simultaneously satisfy the following two equivalent constraint systems in (6) and (7):
[TABLE]
[TABLE]
Eq.(7) indicates that the three toroids, , and must at least intersect at one point which corresponds to () as a solution of the supplementary problem . In the following, we show that such a common intersecting point does not exist, hence a S-solution does not exist. Suppose is an arbitrary point on the circumsphere of the P3P problem, according to Lemma 1, .Since is outside of , we have:
[TABLE]
Since ,we have , as shown in Fig.3. Similarly since , we have . In addition, since and have only two common points and , and and have only two common points and , by , and have only a single common intersecting point . Similarly we can prove that and can only have a single intersecting point at B.Hence the three toroids (, ,) has no real intersecting point. In other words, system (7) has no any positive solution, or a S-solution of the P3P problem in (6).
Lemma 3**.**
Given a real root of the Grunert’s quartic equation in Eq.(3) in Section 2.4, there always exists a corresponding real triplet() satisfying (1);
If (or , or ) in the above triplet (), then the corresponding optical center must lie on one of the toroid pair (, )(or (, ), or (, ));
*If , and , then the triplet () must be either a solution or a S-solution of the P3P problem. *
Proof**.**
From the derivation process of the Grunert’s quartic equation (3) in [5], the first part can be derived directly. The details are omitted;
If , then by Eq.(1), and , hence . That is, the optical center should lie on a curve on one of the toroids (, ). Similarly when (or ), the optical center should lie on (, )( or (, ));
As shown in Section 2.4, if the triplet () satisfies the constraint system (1), and , and , then either all the three elements in () are positive, in this case it is a solution of the P3P problem, or one element is negative and the other two are positive, in this case, it is a S-solution of the P3P problem.
Proof of Theorem 1
Proof**.**
As shown in Section 2.4, given a P3P problem, its Grunert’s quartic equation can have either two distinct real roots + a pair of complex roots or 4 real roots, hence when the optical center is outside of , by (2) of Lemma 3, , furthermore, by (1) of Lemma 3, the sum of the number of solutions and S-solutions (including repeated solution) of the P3P problem can only be 2 or 4. Then By Lemma 2, S-solution is impossible, hence the number of the solutions of the P3P problem must be either 2 or 4. That is, a unique solution is impossible.
Remark 1 A direct consequence of Theorem 1 is that from a statistic point of view, the probability of a P3P problem having a unique solution is zero. This is because by removing the scale factor, the 3 control points of any P3P problem can be considered lying on a unit circle. Given 3 control points on the unit circle, by Theorem 1, the unique solution can only occur when the optical center is inside of or on . Since the 3D space within is a fixed one, and the space outside of is infinitely large, the probability of the P3P problem having a unique solution must be zero.
Theorem 2**.**
*If the optical center O is outside of , under the Grunert’s derivation, each positive root of the quartic equation must correspond to a solution of the P3P problem. *
Proof**.**
When the optical center O is outside of , by (2) of Lemma 3, none of the 3 elements is zero in the triplet (). By (3) of Lemma 3, this non-zero triplet () should be either a solution of the P3P problem, or a S-solution of the P3P problem. By Lemma 2, when the optical center is outside of , it cannot be a S-solution, hence it must be a solution of the P3P problem.
Remark 2
- (1)
Theorem 2 provides an explicit relation between a solution of the P3P problem and a positive root of the resulting quartic equation. To our knowledge, our result is the first in the literature to establish such a relation;
- (2)
Theorem 2 indicates that when the optical center is outside of , a simple relationship exists between a positive root of the quartic equation and a solution of the P3P problem.
3.2 When the optical center passes through one of the 3 toroids ()
In the following, we investigate the possible changes of the number of the solutions in the P3P problem when the optical center passes through one of the 3 toroids (). We have the following result:
Theorem 3**.**
*When the optical center passes through toroid except possibly for two concentric circles on it, the number of the solutions of the corresponding P3P problem must change exactly by 1, either increased by 1 or decreased by 1. *
Here, we only give a proof for the case of the optical center passing through the toroid , the other two can be similarly proved. At first, we introduce the following 5 lemmas:
Lemma 4**.**
*In a small neighborhood of point (or ), the toroid could approach infinitesimally to the right circular cone (or ) with the point ( or ) as the apex point, line the axis, and the half-angle under any norm. In other words, , if , we have *
Proof**.**
As shown in Fig.4, is generated by rotating the arc around cord , is generated by rotating the tangent line of the circle at point around cord . Without loss of generality, let us only consider the plane in Fig.4a: Given a small circular neighborhood at point , say , the outer border of intersects the arc at point , and intersects the tangent line at point , then we have:
[TABLE]
where is the radius of the circle . (8) is meant that the toroid approach infinitesimally to the circular cone . A geometric illustration for the situation is shown in Fig.4b.
Lemma 5**.**
As shown in Fig.5, is a point on the circular arc generated by the fixed inscribed angle of with respect to the cord , the radius of is , the tangent line at , then given a small circular neighborhood at , , the outer border of intersects with at point . Define the distance from to as , and the distance between and as , then we have
[TABLE]
Proof**.**
When , we have
[TABLE]
Hence,
[TABLE]
Now let denote a point which is inside of the toroid with the larger inscribed angle than , and a point which is outside of the toroid with the smaller inscribed angle than .
Lemma 6**.**
*As shown in Fig.6, and such that and for the toroids and within the neighborhood of point . In addition, denote () as the included angle between the outer normal at point , with the segment , where is an intersecting point between the toroid () with the outer border of , then for any given , if (), we have (). *
Proof**.**
By Lemma 5, we know that if is sufficiently small, the intersecting point of the outer border with the toroid must be within the two parallel planes and , where both and are orthogonal to the outer normal at point , and their distance is a higher order infinitesimal of . Similarly if is sufficiently small, () should be within the two parallel planes and ( and ) with and ( and ) both being orthogonal to and their distance also being a higher order infinitesimal of . Since all the 3 distances between and , and and and are of higher order infinitesimal of , then for any given , if (), we have ().
Lemma 7**.**
*As shown in Fig.7, is a point on the toroid , is the subtended angle of to the chord , and the subtended angle of to the chord . By lemma 4 at a small neighborhood of point , the toroid and can be infinitesimally approximated as the and , then these two cones must intersect at two rays from point . *
Proof**.**
Since is the half angle of , and the half angle of , and since by definition, then depending on the relationship among the three angles and , , the necessary and sufficient condition for the two cones to intersect is:
[TABLE]
The geometrical meaning is shown as Fig.8.
The above 4 cases can be equivalently expressed as:
[TABLE]
The constraints in (9) can be geometrically interpreted in Fig.9. The left is for , and The right is for . Then for both the two cases in Fig.9, the constraints in (9) can be simplified as:
[TABLE]
(10) can be further expressed as:
[TABLE]
Since is obtained by rotating a point on the circular arc around , suppose is the rotated point of around by , then we have
[TABLE]
Since ,, by substituting and into (11) and by some manipulations, we have:
[TABLE]
When is fixed, are constant, and are also constant. Since only the rotated angle of around is under change, the only varying entity in (LABEL:equivelent2) is . Considering as the variable, then (LABEL:equivelent2) is a quadratic equation in . The coefficient of is:
[TABLE]
Since , then (LABEL:equivelent2) is an upward parabola. In addition, since increases monotonically when rotating to around by for , the maximum of (LABEL:equivelent2) must occur at or .However since at both or and (LABEL:equivelent2) is equal to zero, hence for any , (LABEL:equivelent2) always holds. In other words, at a small neighborhood of point , and always intersect at two rays from point .
Proof of Theorem 3
Proof**.**
As shown in Fig.10, is an arbitrary point on the toroid , and are two points within a small neighborhood of : , with being outside of and inside of . In the next we show that if is sufficiently small, then there always exists a pair of optical center locations, say () in a small neighborhood of point , such that: Either is a solution of the P3P problem and a S-solution of the P3P problem ; Or is a S-solution of the P3P problem and a solution of the P3P problem . Hence if is very small, or the optical center passes through from to ( or from to ) , the solution number of the corresponding P3P problem must change exactly by 1, either increased by 1 or decreased by 1. Since is on , is outside of , and inside of , we have , and . Then is on the toroid , is on the toroid . Suppose , , , , , , since , , and are continuously differentiable with respect to the three coordinates of the optical center, if is sufficiently small, ,,, and should also be very small. In other words, , if , and . By Lemma 4, at a small neighborhood of point , , can approach infinitesimally to the cone , to cone , and by Lemma 7, the intersecting line of the two toroids and can approach infinitesimally to the two intersecting rays of these two cones, above the plane (the control point plane), and below . Similarly for and , we have their two intersecting rays and , and for and . As shown in the above, since and , and should be within the cone with point being its apex, its axis, and its half angle. Since , and can approach infinitesimally to each other. Denote the included angle of and by . In the next, we show that depending on whether or , there always exists a pair of optical center locations () in a small neighborhood of point such that either is a solution of the P3P problem and a S-solution of the P3P problem , or is a S-solution of the P3P problem and a solution of the P3P problem .
(1) When
If is small enough, then for each point , the included angle between its corresponding ray and must satisfy: . By Lemma 6, if and are small enough, then the included angle, , between and the segment connecting point with an arbitrary intersecting point between and the outer border of must satisfy: , which indicates that must intersect with at a point in , then is a solution of the P3P problem . At the same time, cannot intersect with in . Denote the intersecting curve between and by , then can be infinitesimally approximated by which is the opposite ray of . Similarly, can be infinitesimally approximated by which is the opposite ray of . By the same reasoning as in the above, we can prove in this case that cannot intersect with in , but must intersect with at a point in , and is a S-solution of the P3P problem . In sum, if , then when the optical center passes through the toroid from to , either a solution becomes a S-solution, or a S-solution becomes a solution for the corresponding P3P problem, hence the number of the solutions must change by 1.
(2) When
The conclusion can be similarly obtained.
(3) When
We can prove that if and , always holds. Otherwise implies that the optical center must lie on two concentric coplanar circles with the orthogonal line AB passing through their common center. In this case, the solution changes depend on also on the specific passing direction, merely specifying from inside to outside is not sufficient. Combining the above (1), (2) and (3), Theorem 3 is proved.
Before ending this section, we have additionally the following two results:
Theorem 4**.**
*When the optical center passes through the outer surface of from outside to inside, the number of the solutions of the corresponding P3P problem must decrease by 1. *
Theorem 5**.**
*When the optical center passes through toroid except possibly for two concentric coplanar circles on it, the number of the solutions of the corresponding P3P problem does not change, but its S-solution changes from one to another. *
4 Conclusion
In this work, some new insights of the multi-solution phenomenon of the P3P problem are obtained. We show that given 3 control points, if the optical center is outside of the 6 toroids defined by the 3 control points, the corresponding P3P problem cannot have a unique solution, and a one-to-one root-solution correspondence does exist. In addition we show that three of the 6 toroids must act as some of the critical surfaces, or when the optical center passes through any one of these three toroids except possibly for some special circular curves, the solution number of the corresponding P3P problem must change exactly by one. In addition if the toroid is part of the outer surface of the union of the 6 toroids, the number of the solutions must decrease by one if the passing of the optical center is from the outside to inside, and increase by one if the passing is in the opposite direction. These new findings, in addition to their academic values, could also act as some theoretical guidance for P3P practitioners.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] J. A.Grunert. Das pothenotische problem in erweiterter gestalt nebst uber seine anwendungen in der geodasie. in Grunerts Archiv fur Mathematik und Physik , 1:238–248, 1841.
- 2[2] M. A. Fischler and R. C. Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automatic cartography. in Graphics and Image Processing , 24(6):381–395, 1981.
- 3[3] X. S. Gao, X. R. Hou, J. Tang, and H. F. Cheng. Complete solution classification for the perspective-three-point problem. in PAMI , 25(8):930–943, 2003.
- 4[4] X. S. Gao and J. L. Tang. On the probability of the number of solutions for the p 4p problem. in JMIV , 25(1):79–86, 2006.
- 5[5] R. M. Haralick, C. N. Lee, and K. Ottenberg. Review and analysis of solutions of the three point perspective pose estimation problem. in IJCV , 13(3):331–356, 1994.
- 6[6] Q. Jia, P. Zheng, and H. Sun. The study of positioning with high-precision by single camera based on p 3p algorithm. IEEE International Conference on Industrial Informatics , pages 1385–1388, 2007.
- 7[7] L. Kneip, D. Scaramuzza, and R. Siegwart. A novel parametrization of the perspective-three-point problem for a direct computation of absolute camera position and orientation. In Computer Vision and Pattern Recognition , pages 2969–2976, 2011.
- 8[8] S. LI and C. XU. A stable direct solution of perspective-three-point problem. in PAMI , 25(05):627–642, 2011.
