MRPT
2.0.4
|
This class is used for Pose estimation from a known landmark using a monocular camera.
The toolkit comprises of state of the art PnP (Perspective n Point) algorithms
The Python Bindings pnp_perf_comp.py can be used to generate performance comparison using standard tests between the different algorithms.
Definition at line 50 of file pnp_algos.h.
#include <mrpt/vision/pnp_algos.h>
Public Member Functions | |
bool | dls (const Eigen::Ref< Eigen::MatrixXd > obj_pts, const Eigen::Ref< Eigen::MatrixXd > img_pts, int n, const Eigen::Ref< Eigen::MatrixXd > cam_intrinsic, Eigen::Ref< Eigen::MatrixXd > pose_mat) |
[4] Direct Least Squares (DLS) - PnP : Algorithm formulates position as a function of rotation. More... | |
bool | epnp (const Eigen::Ref< Eigen::MatrixXd > obj_pts, const Eigen::Ref< Eigen::MatrixXd > img_pts, int n, const Eigen::Ref< Eigen::MatrixXd > cam_intrinsic, Eigen::Ref< Eigen::MatrixXd > pose_mat) |
[9] Efficient-PnP (EPnP) - Algorithm takes 4 control points based on n points and uses the control points to compute the pose More... | |
bool | upnp (const Eigen::Ref< Eigen::MatrixXd > obj_pts, const Eigen::Ref< Eigen::MatrixXd > img_pts, int n, const Eigen::Ref< Eigen::MatrixXd > cam_intrinsic, Eigen::Ref< Eigen::MatrixXd > pose_mat) |
[6] Unified-PnP (UPnP) : Algorithm to compute pose from unknown camera intrinsic matrix More... | |
bool | p3p (const Eigen::Ref< Eigen::MatrixXd > obj_pts, const Eigen::Ref< Eigen::MatrixXd > img_pts, int n, const Eigen::Ref< Eigen::MatrixXd > cam_intrinsic, Eigen::Ref< Eigen::MatrixXd > pose_mat) |
[5] P3P - A closed form solution for n=3, 2D-3D correspondences More... | |
bool | rpnp (const Eigen::Ref< Eigen::MatrixXd > obj_pts, const Eigen::Ref< Eigen::MatrixXd > img_pts, int n, const Eigen::Ref< Eigen::MatrixXd > cam_intrinsic, Eigen::Ref< Eigen::MatrixXd > pose_mat) |
[7] Robust (R-PnP)- A closed form solution with intermediate P3P computations More... | |
bool | ppnp (const Eigen::Ref< Eigen::MatrixXd > obj_pts, const Eigen::Ref< Eigen::MatrixXd > img_pts, int n, const Eigen::Ref< Eigen::MatrixXd > cam_intrinsic, Eigen::Ref< Eigen::MatrixXd > pose_mat) |
[3] Procrustes-PnP(PPnP) Algorithm : Iterative SVD based algorithm More... | |
bool | posit (const Eigen::Ref< Eigen::MatrixXd > obj_pts, const Eigen::Ref< Eigen::MatrixXd > img_pts, int n, const Eigen::Ref< Eigen::MatrixXd > cam_intrinsic, Eigen::Ref< Eigen::MatrixXd > pose_mat) |
[2] Pose from Orthogoanlity and Scaling :Iterative (POSIT) - A Geometric algorithm to compute scale and orthogonality independently More... | |
bool | lhm (const Eigen::Ref< Eigen::MatrixXd > obj_pts, const Eigen::Ref< Eigen::MatrixXd > img_pts, int n, const Eigen::Ref< Eigen::MatrixXd > cam_intrinsic, Eigen::Ref< Eigen::MatrixXd > pose_mat) |
[8] Lu-Hager-Mjolsness(LHM)-PnP algorithm : Iterative algorithm to reduce object space error More... | |
bool mrpt::vision::pnp::CPnP::dls | ( | const Eigen::Ref< Eigen::MatrixXd > | obj_pts, |
const Eigen::Ref< Eigen::MatrixXd > | img_pts, | ||
int | n, | ||
const Eigen::Ref< Eigen::MatrixXd > | cam_intrinsic, | ||
Eigen::Ref< Eigen::MatrixXd > | pose_mat | ||
) |
[4] Direct Least Squares (DLS) - PnP : Algorithm formulates position as a function of rotation.
Use Cayley's rotation theorem to represent the rotation using parameters ($s_1, s_2, s_3$). Solve the rotation using multi-variate polynomial expressions
[in] | obj_pts | Object points in Camera Co-ordinate system {C} nX3 (only 4 points used) array [p_x, p_y, p_z] |
[in] | img_pts | Image points in pixels nX3 (only 4 points used) array containing pixel data from camera [u, v, 1] |
[in] | n | number of 2D-3D correspondences |
[in] | cam_intrinsic | Camera Intrinsic matrix |
[out] | pose_mat | Output pose vector 6X1, pose_mat[0:2]-> Translation, pose_mat[3:5] -> Quaternion vector component |
Definition at line 35 of file pnp_algos.cpp.
References mrpt::vision::pnp::dls::compute_pose().
bool mrpt::vision::pnp::CPnP::epnp | ( | const Eigen::Ref< Eigen::MatrixXd > | obj_pts, |
const Eigen::Ref< Eigen::MatrixXd > | img_pts, | ||
int | n, | ||
const Eigen::Ref< Eigen::MatrixXd > | cam_intrinsic, | ||
Eigen::Ref< Eigen::MatrixXd > | pose_mat | ||
) |
[9] Efficient-PnP (EPnP) - Algorithm takes 4 control points based on n points and uses the control points to compute the pose
[in] | obj_pts | Object points in Camera Co-ordinate system {C} nX3 (only 4 points used) array [p_x, p_y, p_z] |
[in] | img_pts | Image points in pixels nX3 (only 4 points used) array containing pixel data from camera [u, v, 1] |
[in] | n | number of 2D-3D correspondences |
[in] | cam_intrinsic | Camera Intrinsic matrix |
[out] | pose_mat | Output pose vector 6X1, pose_mat[0:2]-> Translation, pose_mat[3:5] -> Quaternion vector component |
Definition at line 118 of file pnp_algos.cpp.
References mrpt::vision::pnp::epnp::compute_pose().
bool mrpt::vision::pnp::CPnP::lhm | ( | const Eigen::Ref< Eigen::MatrixXd > | obj_pts, |
const Eigen::Ref< Eigen::MatrixXd > | img_pts, | ||
int | n, | ||
const Eigen::Ref< Eigen::MatrixXd > | cam_intrinsic, | ||
Eigen::Ref< Eigen::MatrixXd > | pose_mat | ||
) |
[8] Lu-Hager-Mjolsness(LHM)-PnP algorithm : Iterative algorithm to reduce object space error
[in] | obj_pts | Object points in Camera Co-ordinate system {C} nX3 array [p_x p_y p_z] |
[in] | img_pts | Image points in pixels nX3 array containing pixel data from camera [u, v, 1] |
[in] | n | number of 2D-3D correspondences |
[in] | cam_intrinsic | Camera Intrinsic matrix |
[out] | pose_mat | Output pose vector 6X1, pose_mat[0:2]-> Translation, pose_mat[3:5] -> Quaternion vector component |
Definition at line 541 of file pnp_algos.cpp.
References mrpt::vision::pnp::lhm::compute_pose(), and R.
bool mrpt::vision::pnp::CPnP::p3p | ( | const Eigen::Ref< Eigen::MatrixXd > | obj_pts, |
const Eigen::Ref< Eigen::MatrixXd > | img_pts, | ||
int | n, | ||
const Eigen::Ref< Eigen::MatrixXd > | cam_intrinsic, | ||
Eigen::Ref< Eigen::MatrixXd > | pose_mat | ||
) |
[5] P3P - A closed form solution for n=3, 2D-3D correspondences
[in] | obj_pts | Object points in Camera Co-ordinate system {C} nX3 (only 4 points used) array [p_x, p_y, p_z] |
[in] | img_pts | Image points in pixels nX3 (only 4 points used) array containing pixel data from camera [u, v, 1] |
[in] | n | number of 2D-3D correspondences |
[in] | cam_intrinsic | Camera Intrinsic matrix |
[out] | pose_mat | Output pose vector 6X1, pose_mat[0:2]-> Translation, pose_mat[3:5] -> Quaternion vector component |
Definition at line 283 of file pnp_algos.cpp.
References R, and mrpt::vision::pnp::p3p::solve().
bool mrpt::vision::pnp::CPnP::posit | ( | const Eigen::Ref< Eigen::MatrixXd > | obj_pts, |
const Eigen::Ref< Eigen::MatrixXd > | img_pts, | ||
int | n, | ||
const Eigen::Ref< Eigen::MatrixXd > | cam_intrinsic, | ||
Eigen::Ref< Eigen::MatrixXd > | pose_mat | ||
) |
[2] Pose from Orthogoanlity and Scaling :Iterative (POSIT) - A Geometric algorithm to compute scale and orthogonality independently
[in] | obj_pts | Object points in Camera Co-ordinate system {C} nX3 array [p_x, p_y, p_z] |
[in] | img_pts | Image points in pixels nX3 array containing pixel data from camera [u, v, 1] |
[in] | n | number of 2D-3D correspondences |
[in] | cam_intrinsic | Camera Intrinsic matrix |
[out] | pose_mat | Output pose vector 6X1, pose_mat[0:2]-> Translation, pose_mat[3:5] -> Quaternion vector component |
Definition at line 476 of file pnp_algos.cpp.
References mrpt::vision::pnp::posit::compute_pose(), and R.
bool mrpt::vision::pnp::CPnP::ppnp | ( | const Eigen::Ref< Eigen::MatrixXd > | obj_pts, |
const Eigen::Ref< Eigen::MatrixXd > | img_pts, | ||
int | n, | ||
const Eigen::Ref< Eigen::MatrixXd > | cam_intrinsic, | ||
Eigen::Ref< Eigen::MatrixXd > | pose_mat | ||
) |
[3] Procrustes-PnP(PPnP) Algorithm : Iterative SVD based algorithm
[in] | obj_pts | Object points in Camera Co-ordinate system {C} nX3 array [p_x, p_y, p_z] |
[in] | img_pts | Image points in pixels nX3 array containing pixel data from camera [u, v, 1] |
[in] | n | number of 2D-3D correspondences |
[in] | cam_intrinsic | Camera Intrinsic matrix |
[out] | pose_mat | Output pose vector 6X1, pose_mat[0:2]-> Translation, pose_mat[3:5] -> Quaternion vector component |
Definition at line 411 of file pnp_algos.cpp.
References mrpt::vision::pnp::ppnp::compute_pose(), and R.
bool mrpt::vision::pnp::CPnP::rpnp | ( | const Eigen::Ref< Eigen::MatrixXd > | obj_pts, |
const Eigen::Ref< Eigen::MatrixXd > | img_pts, | ||
int | n, | ||
const Eigen::Ref< Eigen::MatrixXd > | cam_intrinsic, | ||
Eigen::Ref< Eigen::MatrixXd > | pose_mat | ||
) |
[7] Robust (R-PnP)- A closed form solution with intermediate P3P computations
[in] | obj_pts | Object points in Camera Co-ordinate system {C} nX3 (only 4 points used) array [p_x, p_y, p_z] |
[in] | img_pts | Image points in pixels nX3 (only 4 points used) array containing pixel data from camera [u, v, 1] |
[in] | n | number of 2D-3D correspondences |
[in] | cam_intrinsic | Camera Intrinsic matrix |
[out] | pose_mat | Output pose vector 6X1, pose_mat[0:2]-> Translation, pose_mat[3:5] -> Quaternion vector component |
Definition at line 347 of file pnp_algos.cpp.
References mrpt::vision::pnp::rpnp::compute_pose(), and R.
bool mrpt::vision::pnp::CPnP::upnp | ( | const Eigen::Ref< Eigen::MatrixXd > | obj_pts, |
const Eigen::Ref< Eigen::MatrixXd > | img_pts, | ||
int | n, | ||
const Eigen::Ref< Eigen::MatrixXd > | cam_intrinsic, | ||
Eigen::Ref< Eigen::MatrixXd > | pose_mat | ||
) |
[6] Unified-PnP (UPnP) : Algorithm to compute pose from unknown camera intrinsic matrix
[in] | obj_pts | Object points in Camera Co-ordinate system {C} nX3 (only 4 points used) array [p_x, p_y, p_z] |
[in] | img_pts | Image points in pixels nX3 (only 4 points used) array containing pixel data from camera [u, v, 1] |
[in] | n | number of 2D-3D correspondences |
[in] | cam_intrinsic | Camera Intrinsic matrix |
[out] | pose_mat | Output pose vector 6X1, pose_mat[0:2]-> Translation, pose_mat[3:5] -> Quaternion vector component |
Definition at line 201 of file pnp_algos.cpp.
References mrpt::vision::pnp::upnp::compute_pose().
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |