@@ -534,10 +534,10 @@ where N is the number of points. vector\<Point2f\> can be also passed here.
534
534
\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])\f$ of
535
535
4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are
536
536
assumed.
537
- @param rvec Output rotation vector (see Rodrigues ) that, together with tvec , brings points from
537
+ @param rvec Output rotation vector (see @ref Rodrigues ) that, together with tvec , brings points from
538
538
the model coordinate system to the camera coordinate system.
539
539
@param tvec Output translation vector.
540
- @param useExtrinsicGuess Parameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses
540
+ @param useExtrinsicGuess Parameter used for # SOLVEPNP_ITERATIVE. If true (1), the function uses
541
541
the provided rvec and tvec values as initial approximations of the rotation and translation
542
542
vectors, respectively, and further optimizes them.
543
543
@param flags Method for solving a PnP problem:
@@ -546,15 +546,18 @@ this case the function finds such a pose that minimizes reprojection error, that
546
546
of squared distances between the observed projections imagePoints and the projected (using
547
547
projectPoints ) objectPoints .
548
548
- **SOLVEPNP_P3P** Method is based on the paper of X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang
549
- "Complete Solution Classification for the Perspective-Three-Point Problem". In this case the
550
- function requires exactly four object and image points.
549
+ "Complete Solution Classification for the Perspective-Three-Point Problem" (@cite gao2003complete).
550
+ In this case the function requires exactly four object and image points.
551
+ - **SOLVEPNP_AP3P** Method is based on the paper of T. Ke, S. Roumeliotis
552
+ "An Efficient Algebraic Solution to the Perspective-Three-Point Problem" (@cite Ke17).
553
+ In this case the function requires exactly four object and image points.
551
554
- **SOLVEPNP_EPNP** Method has been introduced by F.Moreno-Noguer, V.Lepetit and P.Fua in the
552
- paper "EPnP: Efficient Perspective-n-Point Camera Pose Estimation".
555
+ paper "EPnP: Efficient Perspective-n-Point Camera Pose Estimation" (@cite lepetit2009epnp) .
553
556
- **SOLVEPNP_DLS** Method is based on the paper of Joel A. Hesch and Stergios I. Roumeliotis.
554
- "A Direct Least-Squares (DLS) Method for PnP".
557
+ "A Direct Least-Squares (DLS) Method for PnP" (@cite hesch2011direct) .
555
558
- **SOLVEPNP_UPNP** Method is based on the paper of A.Penate-Sanchez, J.Andrade-Cetto,
556
559
F.Moreno-Noguer. "Exhaustive Linearization for Robust Camera Pose and Focal Length
557
- Estimation". In this case the function also estimates the parameters \f$f_x\f$ and \f$f_y\f$
560
+ Estimation" (@cite penate2013exhaustive) . In this case the function also estimates the parameters \f$f_x\f$ and \f$f_y\f$
558
561
assuming that both have the same value. Then the cameraMatrix is updated with the estimated
559
562
focal length.
560
563
@@ -575,8 +578,11 @@ projections, as well as the camera matrix and the distortion coefficients.
575
578
it as, e.g., imagePoints, one must effectively copy it into a new array: imagePoints =
576
579
np.ascontiguousarray(D[:,:2]).reshape((N,1,2))
577
580
- The methods **SOLVEPNP_DLS** and **SOLVEPNP_UPNP** cannot be used as the current implementations are
578
- unstable and sometimes give completly wrong results. If you pass one of these two flags,
579
- **SOLVEPNP_EPNP** method will be used instead.
581
+ unstable and sometimes give completly wrong results. If you pass one of these two
582
+ flags, **SOLVEPNP_EPNP** method will be used instead.
583
+ - The minimum number of points is 4. In the case of **SOLVEPNP_P3P** and **SOLVEPNP_AP3P**
584
+ methods, it is required to use exactly 4 points (the first 3 points are used to estimate all the solutions
585
+ of the P3P problem, the last one is used to retain the best solution that minimizes the reprojection error).
580
586
*/
581
587
CV_EXPORTS_W bool solvePnP ( InputArray objectPoints, InputArray imagePoints,
582
588
InputArray cameraMatrix, InputArray distCoeffs,
0 commit comments