(Vi) PNP

PNP algorithm

 

  In the visual SLAM, we usually have different observations.

 

  Such monocular camera pixel coordinates, we get two images usually only matching, then we can use the epipolar geometry to optimize the relative pose, if we close the feature points are distributed substantially in a plane, then we two frames can be estimated homography matrix ;

 

  If we have RGB-D camera, we can also get matching pixels corresponding depth information, then we get a three-dimensional two match points, then you can by ICP (Iterative Closest Point) to perform motion estimation, ICP divided use SVD decomposition and Bundle Adjustment in two ways, but essentially there is no difference, after all, SVD also build non-linear least squares problem. However, Bundle Adjustment problems can be optimized point and pose the same time.

 

  If we have a set of three-dimensional point matching point, there are several ways to obtain this type of data. Typically may be obtained by RBG-D, we mentioned earlier collected data RGB-D position and orientation may be optimized by ICP, in fact, since the RGB-D camera itself noise, there is a depth value of the estimated error. So usually do in the estimation method PNP in SLAM, PNP is, we want to introduce this learning session, using the depth value with the noise of conduct pose estimation, than with both depth value is more appropriate noisy some. Another channel is monocular get triangulation point map reprojection PNP to issue new frame construction, the same principle. In addition, there are binocular images.

 

  Due to the large number of cattle in history, it provides a variety of strange PNP algorithms, so the size will be a little longer. I worked hard to made it would be, first write out the first few ways, and then enter the subject again:
  1. direct linear transformation (the DLT);
  2. P3P;
  3. EPNP;
  4. UPNP;
  The bundle adjustment (Bundle Adjustment).

 

known conditions

 

  Match $ n $ groups three points - two-dimensional point:
$$P^{r} = \{P_{1}^{r}, P_{2}^{r}, \dots, P_{n}^{r}\}, p^{c} = \{p_{1}^{c}, p_{2}^{c}, \dots, p_{n}^{c}\}$$

 

Wherein, $ P ^ {r} $ represents a three-dimensional point in the reference frame, $ p ^ {c} $ represents the current frame matches the two-dimensional point (pixel coordinates). Data acquisition mode as previously described.

 

problem

 

  Under known conditions, solving the reference frame to the current frame relative pose. (R & lt rotation matrix $ $ $ T $ and the displacement vector)

 

Method a: direct linear transformation (the DLT)

 

  Direct linear transformation described in our previous epipolar geometry is calculated homography matrix is ​​similar, properties are ignored relative pose itself, directly as a matrix of values ​​to optimize the use of certain constraints complete recovery was relatively motion.

 

  Suppose we have a pair of matching: $ P_ {i} ^ {r} = [X, Y, Z, 1] ^ {T} $ and $ p_ {i} ^ {c} = [u, v, 1] ^ {T} $, two coordinates are normalized coordinates. Suppose the relative pose of: $ T = [R | t] $, $ p_ {i} ^ {r} $ depth value of $ s $, then we have:
$$ s \begin{bmatrix} u \\ v \\ 1 \end{bmatrix} = \begin{bmatrix} t_{1} & t_{2} & t_{3} & t_{4} \\ t_{5} & t_{6} & t_{7} & t_{8} \\ t_{9} & t_{10} & t_{11} & t_{12} \end{bmatrix} \begin{bmatrix} X \\ Y \\ Z \\ 1 \end{bmatrix} $$



By letting $ T = \ begin {bmatrix} t_ {1} ^ {T} \\ t_ {2} ^ {T} \\ t_ {3} ^ {T} \ end {bmatrix} $, then the above equation may become to make:
$$ s\begin{bmatrix} u \\ v \\ 1 \end{bmatrix} = \begin{bmatrix} t_{1}^{T} \\ t_{2}^{T} \\ t_{3}^{T} \end{bmatrix} \begin{bmatrix} X \\ Y \\ Z \\ 1 \end{bmatrix} = \begin{bmatrix} t_{1}^{T} \\ t_{2}^{T} \\ t_{3}^{T} \end{bmatrix} P_{i}^{c} $$



You can get:
$$ \begin{aligned} u = \frac{t_{1}^{T}P_{i}^{c}}{t_{3}^{T}P_{i}^{c}} \\ v = \frac{t_{2}^{T}P_{i}^{c}}{t_{3}^{T}P_{i}^{c}} \end{aligned} $$

 

By the above equation, we went to the constraints in addition to the scale factor. Further simplify, we get two constraints:
$$ \begin{aligned} -t_{3}^{T} u P_{i}^{c} + t_{1}^{T}P_{i}^{c} = 0 \Rightarrow \begin{bmatrix}P_{i}^{c} & 0 & -uP_{i}^{c} \end{bmatrix} \begin{bmatrix} t_{1}^{T} \\ t_{2}^{T} \\ t_{3}^{T} \end{bmatrix} \\ -t_{3}^{T} v P_{i}^{c} + t_{2}^{T}P_{i}^{c} = 0 \Rightarrow \begin{bmatrix}0 & P_{i}^{c} & -vP_{i}^{c} \end{bmatrix} \begin{bmatrix} t_{1}^{T} \\ t_{2}^{T} \\ t_{3}^{T} \end{bmatrix} \\ \end{aligned} $$

 

Due to the relative position and orientation of Total $ 12 $ unknown, and therefore we need at least six sets of matching points, to provide $ 12 $ a constraint to solve this problem. So, we constructed a homogeneous equation:
$$AT = 0$$

 

Matrix $ A $ is a constraint multiple sets of matching dots, if only six group match point, then we can obtain directly meet the requirements of the solution. If more than six groups of points, then we need to build a non-linear equation solving. This and our previous introduction of epipolar geometry, such as consistent use of homography method SVD solved. By the SVD, we got $ 12 $-dimensional $ T $ matrix.

 

  Using direct linear transformation (DLT) estimate is a projective transformation, because for the problems we constructed above, it only needs to meet certain spatial transformation relationship, and for the matrix $ T $ and no more constraints. In fact, since $ T = [R | t] $, rotation matrix properties need to meet certain constraints, and thus a further analysis of the solution, such as QR decomposition, SVDf decomposition, the result re-projected from the matrix to the space $ SE (3 ) $ upper manifold, is converted into rotation and translation in two parts.

 

  Many Bowen basically this point there is no follow-up, we will default, but in fact most of the readers or look ignorant force, and even others, and that's it. In fact, subsequent to solve the basic know how to do, the author is the case previously. By looking for information, to find a know almost answered: [PnP] DLT PnP solution of the problem , to better explain this to solve the problem. Simply record it.



By SVD decomposition, we get the numerical solution of $ T $, this solution is without scales. "Rotation matrix" as:
$$\hat{R} = \begin{bmatrix} t_{1} & t_{2} & t_{3} \\ t_{5} & t_{6} & t_{7} \\ t_{9} & t_{10} & t_{11} \end{bmatrix}$$

 

Similarly, SVD decomposition:
$$\begin{bmatrix} U & \Sigma & V \end{bmatrix} = SVD(\hat{R})$$

 

So we can get a rotation matrix:
$$ \begin{aligned} R_{1} = UV^{T} \\ R_{2} = -UV^{T} \end{aligned} $$

 

Theoretically, $ \ $ Sigma diagonal should be very close, taking the mean, the scale factor $ \ $ Beta can be obtained by the following formula:
$$\beta = \pm 1 / (tr(\Sigma) / 3)$$

 

Thus, we can calculate the translation vector:
$$ \begin{aligned} t_{1} = \beta_{1} \begin{bmatrix} t_{4} & t_{8} & t_{12} \end{bmatrix} \\ t_{2} = \beta_{2} \begin{bmatrix} t_{4} & t_{8} & t_{12} \end{bmatrix} \end{aligned} $$

 

  Through the above calculation, we get four solution, a solution when it comes to four groups, we are not reminded of the operating pole geometry? Yes, we still use the same point must be in front of the camera, that is, the depth value of such a constraint must be a positive solution for the four groups to verify, find the correct solution.



Method Two: P3P

 

  Next, I want to introduce another method PNP: P3P, only three sets of 3D-2D matching point plus one for verification, require less data.

 

  P3P relatively simple thinking, the point is to use the relationship between the spatial distribution of the camera remains unchanged under different coordinate systems, and the principle of similar triangles calculated three-dimensional frame of reference point $ P_ {i} ^ {c} $ three-dimensional point corresponding to the reference frame $ P_ {i} ^ {r} $ (in fact, only a two-dimensional reference frame point $ p_ {i} ^ {r} $, hence the need for operator three points). With the three-dimensional reference point spatial point and three-dimensional frame of the current frame matches, we can construct a pair of electrode geometry similar to general constraints, such as $ AE = b $, then four sets of decomposed solution, using the verification group selected correct solution.



  FIG initially introduced a:
              

 

  

  Depicts the spatial point above $ A_ {w}, B_ {w}, C_ {w} $ the corresponding point in the current coordinate system of the camera, the corresponding pixel coordinates are $ u, v, w $. Set the current camera optical center is $ O $, can be obtained three similar triangles:
$$ \ Delta ear pl \ sim \ Delta OAB, \ Delta ouw \ sim \ Delta OAC, \ Delta OVW \ sim \ Delta OBC $$

 

Using the law of cosines can get:
$$ \begin{aligned} OA^{2} + OB^{2} - 2OA\cdot OB \cdot cos<ou, ov> = AB^{2} \\ OA^{2} + OC^{2} - 2OA\cdot OC \cdot cos<ou, ow> = AC^{2} \\ OB^{2} + OC^{2} - 2OB\cdot OC \cdot cos<ov, ow> = BC^{2} \end{aligned} $$

 

All the above equation divided by $ OC ^ {2} $, and let $ x = \ frac {OA} {OC}, y = \ frac {OB} {OC} $, can be obtained:
$$ \begin{aligned} x^{2} + y^{2} - 2x\cdot y \cdot cos<ou, ov> = \frac{AB^{2}}{OC^{2}} \\ x^{2} + 1 - 2x\cdot cos<ou, ow> = \frac{AC^{2}}{OC^{2}} \\ y^{2} + 1 - 2y\cdot cos<ov, ow> = \frac{BC^{2}}{OC^{2}} \end{aligned} $$

 

The above formula, since the pixel coordinates are known, it is clear cosine values ​​can be evaluated, and the right formula, the spatial relationship between the $ A, B, C $ is also known, but we do not know $ OA, OB, OC $ it is unknown, the first two are seeking to be the last item we need to eliminate him, then we make by: $ a = \ frac {AB ^ {2}} {OC ^ {2}}, ab = \ frac { AC ^ {2}} {OC ^ {2}}, ac = \ frac {BC ^ {2}} {OC ^ {2}} $, obtained $ b = \ frac {AC ^ {2}} {AB ^ {2}}, c = \ frac {BC ^ {2}} {AB ^ {2}} $, we can first equation into the other two formulas, thereby erasing $ $ OA, which is:
$$ \begin{aligned} (1 - b)x^{2} -by^{2} + 1 - 2x\cdot cos<ou, ow> + 2b\cdot x\cdot y\cdot cos<ou, ov> = 0 \\ -cx^{2} + (1 - c)\cdot y^{2} + 1 - 2y\cdot cos<ov, ow> + 2b\cdot x\cdot y\cdot cos<ou, ov> = 0 \end{aligned} $$

 

  Finally, we got two binary quadratic equations, the equation is more complex, it requires some special solution method, visual SLAM recommendation XIV is the use of talking about Wu elimination method. The specific operation, I searched for a blog post [camera pose problems to solve --P3P] (https://www.cnblogs.com/mafuqiang/p/8302663.html) provides a solution method. Get $ x, the y $, we will be generations back to the original formula, it can be calculated $ OA, OB, OC $. But we need a coordinate point is required, not just the length, and therefore also a need to take the unit direction vector. (I believe that this may be calculated by the unit vector with the coordinates of the pixel coordinates normalized plane).

 

  The OK, by the above method, we get three points, so we use epipolar geometry based method of calculating the four solutions, a set point may provide three constraints, three points just to meet the constraint requirements. So we use the fourth set point for authentication, select the correct solution. At this point, P3P way we introduce finished.



  It is worth noting that, only the P3P algorithm for calculating a set of points in claim 3, a set of points for authentication, data can not take more. Obviously, if we choose too much data on the presence of noise or even wrong, it will directly affect the final result. So, in fact, P3P is not a good thing, but also so difficult to calculate. We also recommend everyone to provide an article: Complete solution classification for the perspective-three-point problem. Honestly, I glanced about, he could not stand up. If the case is not necessarily used in the future, I certainly will not go touch it up.



Method three: EPNP

 

  In front of us a P3P, then we introduce EPNP. I EPNP part of the two main reference blog, one is deeply EPnP algorithm , the other is PNP (pespective-n-point) algorithm study notes . The second version of the blog is to collect the first blog, ah, I like this version almost added to his own understanding.



   EPNP compared P3P on the model slightly more complicated, we first need to select the control points $ 4 $ a non-coplanar in the reference frame $ [c_ {1} ^ {r}, c_ {2} ^ {r}, c_ {3} ^ {r}, c_ {4} ^ {r}] $, the reference frame is assumed that there is a point $ P_ {i} ^ {r} $, then the control point can be selected point our previous linear Expressing:
$$P_{i}^{r} = \sum_{j=1}^{4}(\alpha_{ij}\cdot c_{j}^{r})$$



Satisfying $ \ sum_ {j = 1} ^ {4} \ alpha_ {ij} = 1 $, $ \ alpha_ {ij} $ is homogeneous barycentric coordinates. Similarly, in the current frame coordinate system is also satisfied:
$$P_{i}^{c} = \sum_{j=1}^{4}(\alpha_{ij}\cdot c_{j}^{c})$$



The space between the reference point and the current frame satisfy the constraint relation:
$$P_{j}^{c} = \begin{bmatrix}R & t\end{bmatrix} \begin{bmatrix}P_{j}^{r} \\ 1\end{bmatrix} \Rightarrow \sum_{j=1}^{4}\alpha_{ij}c_{j}^{c} = \sum_{j=1}^{4}\alpha_{ij}\begin{bmatrix}R & t\end{bmatrix} \begin{bmatrix}c_{j}^{r} \\ 1\end{bmatrix}$$



In order to obtain exact solutions, instead of the least squares curve fitting, so we need to introduce $ 4 $ set of control points. To see more intuitive relationship between the spatial points and control points we have chosen:
$$\begin{bmatrix}P_{i}^{r} \\ 1 \end{bmatrix} = C \begin{bmatrix}\alpha_{i1} \\ \alpha_{i2} \\ \alpha_{i3} \\ \alpha_{i4} \end{bmatrix} = \begin{bmatrix}c_{1}^{r} & c_{2}^{r} & c_{3}^{r} & c_{4}^{r} \\ 1 & 1 & 1 & 1 \end{bmatrix} \begin{bmatrix}\alpha_{i1} \\ \alpha_{i2} \\ \alpha_{i3} \\ \alpha_{i4} \end{bmatrix}$$



OK, get further analysis:
$$\begin{bmatrix}\alpha_{i1} \\ \alpha_{i2} \\ \alpha_{i3} \\ \alpha_{i4} \end{bmatrix} = C^{-1}\begin{bmatrix}P_{i}^{r} \\ 1 \end{bmatrix}$$



Focus here! So before we go down, we first analyze all of the data currently available. Known data is a reference frame in three-dimensional spatial point stack of $ P ^ {r} $ current frame and a corresponding matching pixel coordinates $ p ^ {c} $, did not seem ...? ? um, yes. But we can assume, such as the above known part of what we do?



  First, four control points of the reference frame $ c_ {i} ^ {r} $ we can choose, it can be regarded as known. Then we know that the control point, knows the spatial points in the reference frame, it is clear that we can find the barycentric coordinates, i.e. $ [\ alpha_ {i1}, \ alpha_ {i2}, \ alpha_ {i3}, \ alpha_ {i4} ] ^ {T} $. So many things known, did not it? This is really gone. And we also need to use these amounts to calculate the four control points $ [c_ {i1} ^ {c}, c_ {i2} ^ {c}, c_ {i3} ^ {c} in the current frame of the camera coordinate system, c_ {i4} ^ {c}] $.



We know that pinhole camera projection model:
$$s_{i}p_{i}^{c} = KP_{i}^{r} \Rightarrow s_{i}\begin{bmatrix}u_{i} \\ v_{i} \\ 1 \end{bmatrix} = \begin{bmatrix}f_{x} & 0 & c_{x} \\ 0 & f_{y} & c_{y} \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix}X_{i}^{r} \\ Y_{i}^{r} \\ Z_{i}^{r} \end{bmatrix}$$

 

The relationship between the control points into the above equation, and erasing depth value $ s_ {i} $, we can get two constraint equations. But it is worth noting that we need to solve four control points in the current frame camera coordinate system, totaling $ 12 $ unknown. So we use the old method, these unknowns pull into strips, the numerical solution of the equation. Finally, the use of space constraints have to point out the transformation parameters, without changing the spatial relationship of nonlinear optimization to obtain the final binding of the control point coordinates.



Finally, we get the current frame and the reference frame are each four control points, and may use the spatial reference point to calculate the barycentric coordinates of the frame, then clearly we can use:
$$P_{i}^{c} = \sum_{j=1}^{4}(\alpha_{ij}\cdot c_{j}^{c})$$

 

To obtain spatial matching point in the current frame. Consequently, we have a three-dimensional coordinate reference frame $ P ^ {r} $ as well as three-dimensional coordinates of the current frame matching $ P ^ {c} $, then go from ICP! At this point, we EPNP the problem is solved. ICP 's content before we introduced, and not go into here.



  Another point, in fact, four control points in a coordinate system as long as a reference frame on the line are not coplanar, but Bowen also provides another method of selecting the control points, with particular reference to two posts mentioned above.

 


Method four: UPNP

 

  UPNP is actually very similar with EPNP, the only difference is that the UPNP not need to know the focal length of the camera. Where we need to use the camera in EPNP internal reference is:
$$s_{i}p_{i}^{c} = KP_{i}^{r} \Rightarrow s_{i}\begin{bmatrix}u_{i} \\ v_{i} \\ 1 \end{bmatrix} = \begin{bmatrix}f_{x} & 0 & c_{x} \\ 0 & f_{y} & c_{y} \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix}X_{i}^{r} \\ Y_{i}^{r} \\ Z_{i}^{r} \end{bmatrix}$$

 

Because under normal circumstances, the focal length of the camera $ f_ {x} = f_ {y} $, it can be directly referred to as $ f $. UPNP by the unknown focal length $ f $ move equations to be solved, the problem has become so the whole operation of the EPNP. By solving the control points in the current coordinate system, and then calculate the three-dimensional coordinates in the current frame coordinates. Thus the reference frame and the current frame relative poses we may be calculated by solving the ICP method.

 

 

Method five: bundle adjustment (Bundle Adjustment)

 

   In front of those theories are too difficult, we have to point simple. After all BA routine is relatively fixed, by constructing a non-linear least squares problem, select the optimization method to optimize the objective function, we can finally get the results we want.

 

  The only obstacle in the BA method should still seek Jacobi. That we still get the problem description about it. The objective function can be written as:
$$f(\xi) = \sum_{i}^{n}|| p_{i}^{c} - K\cdot exp(\xi^{\wedge})\cdot P_{i}^{r} ||^{2} = \sum_{i}^{n}|| e_{i}(\xi) ||^{2} $$

 

Wherein said points are using homogeneous coordinates, the camera internal reference $ K \ in R ^ {3 \ times 4} $, $ exp (\ xi ^ {\ wedge}) $ represented from the reference frame coordinate system to the current frame coordinate system relative transformation. To solve these problems, we need to calculate the objective function Jacobi, first simplify the problem:
$$e(\xi) = p_{i}^{c} - K\cdot exp(\xi^{\wedge})\cdot P_{i}^{r} = p_{i}^{c} - K\cdot P_{i}^{C} = p_{i}^{r} - p_{i}^{c}$$

 

Wherein, $ P_ {i} ^ {C} $ expressed by converting the coordinates of the reference frame points to obtain the coordinates of the current, so we Jacobian may be calculated by the chain rule:
$$\frac{\partial{e}}{\partial{\xi}} = \frac{\partial{e}}{\partial{p_{i}^{c}}} \cdot \frac{\partial{p_{i}^{c}}}{\partial{P_{i}^{C}}} \cdot \frac{\partial{P_{i}^{C}}}{\partial{\xi}}$$



The first solution is $ \ frac {\ partial {e}} {\ partial {P_ {i} ^ {C}}} $, provided $ P_ {i} ^ {C} = [x_ {i} ^ {C} , y_ {i} ^ {C}, z_ {i} ^ {C}, 1] ^ {T} $, pinhole model by projecting the model of the camera, can easily calculate the Jacobian:

 

$$\frac{\partial{e}}{\partial{P_{i}^{C}}} = \frac{\partial{e}}{\partial{p_{i}^{c}}} \cdot \frac{\partial{p_{i}^{c}}}{\partial{P_{i}^{C}}} = (-1) \cdot \begin{bmatrix} x_{i}^{C}f_{x} & 0 & -\frac{x_{i}^{C}\cdot f_{x}}{(z_{i}^{C})^{2}} \\ 0 & y_{i}^{C}f_{y} & -\frac{y_{i}^{C}\cdot f_{y}}{(z_{i}^{C})^{2}} \end{bmatrix}$$



Next is calculated $ \ frac {\ partial {P_ {i} ^ {C}}} {\ partial {\ xi}} $, the rotation matrix does not have an adder closed, by direct derivation, then, despite the BCH approximately It can be used, but will introduce a more complex calculation Jacobi. Therefore, we still prefer to use perturbation model, which is the method most used in the program:
$$ \begin{aligned} \frac{\partial{P_{i}^{C}}}{\partial{\xi}} =& \frac{exp(\delta \xi^{\wedge})exp(\xi^{\wedge})P_{i}^{r} - exp(\xi^{\wedge})P_{i}^{r}}{\delta \xi} \\ \approx & \frac{(1 + \delta \xi^{\wedge})exp(\xi^{\wedge})P_{i}^{r} - exp(\xi^{\wedge})P_{i}^{r}}{\delta \xi} \\ =& \frac{(\delta \xi^{\wedge})exp(\xi^{\wedge})P_{i}^{r}}{\delta \xi} \\ =& \frac{\begin{bmatrix} \delta \phi^{\wedge} & \delta \rho \\ 0^{T} & 0 \end{bmatrix} \begin{bmatrix} RP_{i}^{r} + t \\ 1 \end{bmatrix} }{\delta \xi} \\ =& \frac{\begin{bmatrix} \delta \phi^{\wedge}(RP_{i}^{r} + t) + \delta \rho \\ 0 \end{bmatrix} }{\delta \xi} \\ =& \frac{\begin{bmatrix} -(RP_{i}^{r} + t)^{\wedge}\delta \phi + \delta \rho \\ 0 \end{bmatrix} }{\delta \xi} \\ =& \frac{\begin{bmatrix} -(RP_{i}^{r} + t)^{\wedge}\delta \phi + \delta \rho \\ 0 \end{bmatrix} }{\delta \xi} \\ =& \frac{\begin{bmatrix} -(RP_{i}^{r} + t)^{\wedge} & I \\ 0^{T} & 0^{T} \end{bmatrix} \begin{bmatrix} \delta \phi \\ \delta \rho \end{bmatrix} }{\delta \xi} \\ =& \begin{bmatrix} -(RP_{i}^{r} + t)^{\wedge} & I \\ 0^{T} & 0^{T} \end{bmatrix} \\ =& (TP_{i}^{r})^{\odot} \end{aligned} $$

 

Of these, $ exp (\ xi ^ {\ wedge}) = T = \ begin {bmatrix} R & t \\ 0 ^ {T} & 1 \ end {bmatrix} $, $ \ delta \ xi = \ begin { bmatrix} \ delta \ phi \\ \ delta \ rho \ end {bmatrix} $. Of course, you can also choose to shift the front and back in the rotation, then the order Jacobi would need to adjust.



By the above calculation, we know that $ \ frac {\ partial {e}} {\ partial {\ xi}} $:
$$\frac{\partial{e}}{\partial{\xi}} = - \begin{bmatrix} x_{i}^{C}f_{x} & 0 & -\frac{x_{i}^{C}\cdot f_{x}}{(z_{i}^{C})^{2}} \\ 0 & y_{i}^{C}f_{y} & -\frac{y_{i}^{C}\cdot f_{y}}{(z_{i}^{C})^{2}} \end{bmatrix} (TP_{i}^{r})^{\odot}$$



Specifically it will not start, anyway, so go behalf count on the right. So here we are, even if a bit Jacobi matrix posture. Then the optimization problem is very simple, by the objective function of each residual first-order Taylor expansion, and residual expansion after the first order derivative can be obtained by a normal equation: $ H \ Delta x = b $, specific also nothing to say, nonlinear optimization of content pushed chant that. Specific reference study notes the --P3P with ICP pose estimation algorithm and experiment . OK, then the nonlinear optimization methods are also introduced over.

 

to sum up

 

  In front, we introduced the $ 5 $ kinds of solution method PNP, although some not specific enough, but the author also provides enough references, these references are the author screening at the time of finishing notes fine Hua Bowen, can help readers Province go to a lot of time. We can say that the author of this blog has basically contains most of the PNP algorithm, it can be considered as a painstaking author. A few days before and spent time to read and organize data. Prior to this, I realize two simple PNP function, is based on a solverPnpRansac OpenCV provided to solve the relative position and orientation, the other one is the author of Bundle Adjustment achieve their own version of the PNP. For more information please see my GitHub: PNP .



Reference material

 

8. [visual SLAM fourteen speak]
12. X.-S. Gao, X.-R. Hou, J. Tang, and H.-F. Cheng, “Complete solution classification for the perspective-three-point problem,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 25, pp. 930–943, Aug 2003.

 

Guess you like

Origin www.cnblogs.com/yepeichu/p/12670818.html