|
MRPT
2.0.1
|
#include <pnp/epnp.h>
Public Member Functions | |
| epnp (const cv::Mat &cameraMatrix, const cv::Mat &opoints, const cv::Mat &ipoints) | |
| Constructor for EPnP class. More... | |
| ~epnp () | |
| Destructor for EPnP class. More... | |
| void | add_correspondence (const double X, const double Y, const double Z, const double u, const double v) |
| Add a 2d/3d correspondence. More... | |
| void | compute_pose (cv::Mat &R, cv::Mat &t) |
| OpenCV wrapper to compute pose. More... | |
Private Member Functions | |
| template<typename T > | |
| void | init_camera_parameters (const cv::Mat &cameraMatrix) |
| Initialize Camera Matrix. More... | |
| template<typename OpointType , typename IpointType > | |
| void | init_points (const cv::Mat &opoints, const cv::Mat &ipoints) |
| Convert object points and image points from OpenCV format to STL matrices. More... | |
| double | reprojection_error (const double R[3][3], const double t[3]) |
| Function to compute reprojection error. More... | |
| void | choose_control_points () |
| Function to select 4 control points from n points. More... | |
| void | compute_barycentric_coordinates () |
| Convert from object space to relative object space (Barycentric coordinates) More... | |
| void | fill_M (CvMat *M, const int row, const double *alphas, const double u, const double v) |
| Generate the Matrix M. More... | |
| void | compute_ccs (const double *betas, const double *ut) |
| Internal function. More... | |
| void | compute_pcs () |
| Internal function. More... | |
| void | solve_for_sign () |
| Internal function. More... | |
| void | find_betas_approx_1 (const CvMat *L_6x10, const CvMat *Rho, double *betas) |
| Internal function. More... | |
| void | find_betas_approx_2 (const CvMat *L_6x10, const CvMat *Rho, double *betas) |
| Internal function. More... | |
| void | find_betas_approx_3 (const CvMat *L_6x10, const CvMat *Rho, double *betas) |
| Internal function. More... | |
| void | qr_solve (CvMat *A, CvMat *b, CvMat *X) |
| QR optimization algorithm. More... | |
| double | dot (const double *v1, const double *v2) |
| Dot product of two OpenCV vectors. More... | |
| double | dist2 (const double *p1, const double *p2) |
| Squared distance between two vectors. More... | |
| void | compute_rho (double *rho) |
| Get distances between all object points taken 2 at a time(nC2) More... | |
| void | compute_L_6x10 (const double *ut, double *l_6x10) |
| Internal function. More... | |
| void | gauss_newton (const CvMat *L_6x10, const CvMat *Rho, double current_betas[4]) |
| Gauss Newton iterative algorithm. More... | |
| void | compute_A_and_b_gauss_newton (const double *l_6x10, const double *rho, const double cb[4], CvMat *A, CvMat *b) |
| Internal function. More... | |
| double | compute_R_and_t (const double *ut, const double *betas, double R[3][3], double t[3]) |
| Function to compute pose. More... | |
| void | estimate_R_and_t (double R[3][3], double t[3]) |
| Helper function to compute_R_and_t() More... | |
| void | copy_R_and_t (const double R_dst[3][3], const double t_dst[3], double R_src[3][3], double t_src[3]) |
| Copy function of output result. More... | |
Private Attributes | |
| double | uc |
| double | vc |
| Image center in x-direction. More... | |
| double | fu |
| Image center in y-direction. More... | |
| double | fv |
| Focal length in x-direction. More... | |
| std::vector< double > | pws |
| Focal length in y-direction. More... | |
| std::vector< double > | us |
| std::vector< double > | alphas |
| std::vector< double > | pcs |
| int | number_of_correspondences |
| Internal member variables. More... | |
| double | cws [4][3] |
| Number of 2d/3d correspondences. More... | |
| double | ccs [4][3] |
| double | cws_determinant |
| Internal member variables. More... | |
| int | max_nr |
| Internal member variable. More... | |
| double * | A1 |
| Internal member variable. More... | |
| double * | A2 |
| mrpt::vision::pnp::epnp::epnp | ( | const cv::Mat & | cameraMatrix, |
| const cv::Mat & | opoints, | ||
| const cv::Mat & | ipoints | ||
| ) |
| mrpt::vision::pnp::epnp::~epnp | ( | ) |
| void mrpt::vision::pnp::epnp::add_correspondence | ( | const double | X, |
| const double | Y, | ||
| const double | Z, | ||
| const double | u, | ||
| const double | v | ||
| ) |
Add a 2d/3d correspondence.
| [in] | X | X coordinate in Camera coordinate system |
| [in] | Y | Y coordinate in Camera coordinate system |
| [in] | Z | Z coordinate in Camera coordinate system |
| [in] | u | Image pixel coordinate u in x axis |
| [in] | v | Image pixel coordinate v in y axis |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| void mrpt::vision::pnp::epnp::compute_pose | ( | cv::Mat & | R, |
| cv::Mat & | t | ||
| ) |
OpenCV wrapper to compute pose.
| [out] | R | Rotation Matrix |
| [out] | t | Translation Vector |
Definition at line 161 of file epnp.cpp.
References R.
Referenced by mrpt::vision::pnp::CPnP::epnp().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Helper function to compute_R_and_t()
| R | |
| t |
Definition at line 233 of file epnp.cpp.
References R.
|
private |
|
private |
|
private |
Internal function.
| [out] | L_6x10 | |
| [in] | Rho | |
| [in] | betas |
Definition at line 388 of file epnp.cpp.
References mrpt::obs::gnss::b3.
|
private |
|
private |
|
inlineprivate |
|
inlineprivate |
|
private |
QR optimization algorithm.
| [in] | A | |
| [out] | b | |
| [out] | X |
Definition at line 562 of file epnp.cpp.
References mrpt::obs::gnss::A1, and mrpt::math::sum().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Image center in y-direction.
Definition at line 257 of file epnp.h.
Referenced by init_camera_parameters(), and init_points().
|
private |
Focal length in x-direction.
Definition at line 258 of file epnp.h.
Referenced by init_camera_parameters(), and init_points().
|
private |
|
private |
|
private |
|
private |
Definition at line 255 of file epnp.h.
Referenced by init_camera_parameters(), and init_points().
|
private |
Definition at line 260 of file epnp.h.
Referenced by init_points().
|
private |
Image center in x-direction.
Definition at line 256 of file epnp.h.
Referenced by init_camera_parameters(), and init_points().
| Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020 |