![]() |
NDEVR
API Documentation
|
Solves the Perspective-n-Point problem using the MLPnP algorithm with RANSAC. More...
Public Types | |
| typedef Eigen::Vector3< g_type > | bearingVector_t |
| A 3-vector of unit length used to describe landmark observations/bearings in camera frames (always expressed in camera frames). | |
| typedef Buffer< bearingVector_t > | bearingVectors_t |
| An array of bearing-vectors. | |
| typedef Eigen::Matrix2< g_type > | cov2_mat_t |
| A 2-matrix containing the 2D covariance information of a bearing Buffer. | |
| typedef Eigen::Matrix3< g_type > | cov3_mat_t |
| A 3-matrix containing the 3D covariance information of a bearing Buffer. | |
| typedef Buffer< cov3_mat_t > | cov3_mats_t |
| An array of 3D covariance matrices. | |
| typedef Eigen::Vector4< g_type > | point4_t |
| A homogeneous 3-vector describing a point in 3D-space. | |
| typedef Eigen::Vector3< g_type > | point_t |
| A 3-vector describing a point in 3D-space. | |
| typedef Buffer< point4_t > | points4_t |
| An array of homogeneous 3D-points. | |
| typedef Buffer< point_t > | points_t |
| An array of 3D-points. | |
| typedef Eigen::Vector3< g_type > | rodrigues_t |
| A 3-vector containing the rodrigues parameters of a rotation matrix. | |
| typedef Eigen::Matrix3< g_type > | rotation_t |
| A rotation matrix. | |
| typedef Eigen::Matrix< g_type, 3, 4 > | transformation_t |
A 3x4 transformation matrix containing rotation and translation as follows: . | |
| typedef Eigen::Vector3< g_type > | translation_t |
| A 3-vector describing a translation/camera position. | |
Public Member Functions | |
| MLPnPsolver (const Frame &F, const Buffer< MapPoint * > &vpMapPointMatches) | |
| Constructs the solver from a frame and map point matches. | |
| bool | iterate (uint04 nIterations, bool &bNoMore, Buffer< bool > &vbInliers, uint04 &nInliers, Eigen::Matrix4f &Tout) |
| Runs RANSAC iterations to estimate the camera pose. | |
| void | SetRansacParameters (g_type probability=0.99, uint04 minInliers=8, uint04 maxIterations=300, uint04 minSet=6, float epsilon=0.4, float th2=5.991f) |
| Sets RANSAC parameters. | |
Solves the Perspective-n-Point problem using the MLPnP algorithm with RANSAC.
Given 2D-3D correspondences (bearing vectors and 3D points), estimates the camera pose using a maximum-likelihood formulation of PnP.
Definition at line 15 of file MLPnPsolver.h.
Constructs the solver from a frame and map point matches.
| [in] | F | The frame containing 2D observations. |
| [in] | vpMapPointMatches | Matched map points (nullptr for unmatched). |
| bool MLPnPsolver::iterate | ( | uint04 | nIterations, |
| bool & | bNoMore, | ||
| Buffer< bool > & | vbInliers, | ||
| uint04 & | nInliers, | ||
| Eigen::Matrix4f & | Tout ) |
Runs RANSAC iterations to estimate the camera pose.
| [in] | nIterations | Number of iterations to run. |
| [out] | bNoMore | True if all iterations have been exhausted. |
| [out] | vbInliers | Inlier flags per correspondence. |
| [out] | nInliers | Number of inliers found. |
| [out] | Tout | The estimated 4x4 transformation matrix. |
| void MLPnPsolver::SetRansacParameters | ( | g_type | probability = 0.99, |
| uint04 | minInliers = 8, | ||
| uint04 | maxIterations = 300, | ||
| uint04 | minSet = 6, | ||
| float | epsilon = 0.4, | ||
| float | th2 = 5.991f ) |
Sets RANSAC parameters.
| [in] | probability | Success probability. |
| [in] | minInliers | Minimum inlier count. |
| [in] | maxIterations | Maximum RANSAC iterations. |
| [in] | minSet | Minimum sample set size. |
| [in] | epsilon | Expected inlier ratio. |
| [in] | th2 | Chi-squared threshold for inlier classification. |