MRPT  2.0.4
List of all members | Public Member Functions | Private Attributes
mrpt::vision::pnp::rpnp Class Reference

Detailed Description

Author
Chandra Mangipudi
Date
10/08/16

Definition at line 27 of file rpnp.h.

#include <pnp/rpnp.h>

Public Member Functions

 rpnp (Eigen::MatrixXd obj_pts_, Eigen::MatrixXd img_pts_, Eigen::MatrixXd cam_, int n0)
 Number of 2D/3D correspondences. More...
 
bool compute_pose (Eigen::Ref< Eigen::Matrix3d > R_, Eigen::Ref< Eigen::Vector3d > t_)
 Function to compute pose. More...
 
Eigen::VectorXd getp3p (double l1, double l2, double A5, double C1, double C2, double D1, double D2, double D3)
 Function to compute pose using P3P. More...
 
Eigen::VectorXd getpoly7 (const Eigen::VectorXd &vin)
 Get Polynomial from input vector. More...
 
void calcampose (Eigen::MatrixXd &XXc, Eigen::MatrixXd &XXw, Eigen::Matrix3d &R2, Eigen::Vector3d &t2)
 Function to calculate final pose. More...
 

Private Attributes

Eigen::MatrixXd obj_pts
 
Eigen::MatrixXd img_pts
 Object Points (n X 3) in Camera Co-ordinate system. More...
 
Eigen::MatrixXd cam_intrinsic
 Image Points (n X 3) in Camera Co-ordinate system. More...
 
Eigen::MatrixXd P
 Camera Intrinsic Matrix. More...
 
Eigen::MatrixXd Q
 Transposed Object Points (3 X n) for computations. More...
 
Eigen::Matrix3d R
 Transposed Image Points (3 X n) for computations. More...
 
Eigen::Vector3d t
 Rotation matrix. More...
 
int n
 Translation vector. More...
 

Constructor & Destructor Documentation

◆ rpnp()

mrpt::vision::pnp::rpnp::rpnp ( Eigen::MatrixXd  obj_pts_,
Eigen::MatrixXd  img_pts_,
Eigen::MatrixXd  cam_,
int  n0 
)

Number of 2D/3D correspondences.

Constructor for rpnp class

Definition at line 24 of file rpnp.cpp.

References cam_intrinsic, img_pts, n, obj_pts, P, Q, R, and t.

Member Function Documentation

◆ calcampose()

void mrpt::vision::pnp::rpnp::calcampose ( Eigen::MatrixXd &  XXc,
Eigen::MatrixXd &  XXw,
Eigen::Matrix3d &  R2,
Eigen::Vector3d &  t2 
)

Function to calculate final pose.

Parameters
XXcObject points
XXwImage Points
R2Final Rotation matrix
t2Final Translation vector

Definition at line 318 of file rpnp.cpp.

References mrpt::math::mean(), and mrpt::math::norm().

Here is the call graph for this function:

◆ compute_pose()

bool mrpt::vision::pnp::rpnp::compute_pose ( Eigen::Ref< Eigen::Matrix3d >  R_,
Eigen::Ref< Eigen::Vector3d >  t_ 
)

Function to compute pose.

Parameters
[out]R_Rotaiton matrix
[out]t_Translation vector
Returns
Success flag

Definition at line 43 of file rpnp.cpp.

References mrpt::math::norm(), and R.

Referenced by mrpt::vision::pnp::CPnP::rpnp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getp3p()

Eigen::VectorXd mrpt::vision::pnp::rpnp::getp3p ( double  l1,
double  l2,
double  A5,
double  C1,
double  C2,
double  D1,
double  D2,
double  D3 
)

Function to compute pose using P3P.

Parameters
[in]l1Internal parameter for P3P computation
[in]l2Internal parameter for P3P computation
[in]A5Internal parameter for P3P computation
[in]C1Internal parameter for P3P computation
[in]C2Internal parameter for P3P computation
[in]D1Internal parameter for P3P computation
[in]D2Internal parameter for P3P computation
[in]D3Internal parameter for P3P computation
Returns
Output vector

Definition at line 367 of file rpnp.cpp.

References mrpt::obs::gnss::A1.

◆ getpoly7()

Eigen::VectorXd mrpt::vision::pnp::rpnp::getpoly7 ( const Eigen::VectorXd &  vin)

Get Polynomial from input vector.

Parameters
vinInput vector
Returns
Output Polynomial co-efficients

Definition at line 355 of file rpnp.cpp.

Member Data Documentation

◆ cam_intrinsic

Eigen::MatrixXd mrpt::vision::pnp::rpnp::cam_intrinsic
private

Image Points (n X 3) in Camera Co-ordinate system.

Definition at line 33 of file rpnp.h.

Referenced by rpnp().

◆ img_pts

Eigen::MatrixXd mrpt::vision::pnp::rpnp::img_pts
private

Object Points (n X 3) in Camera Co-ordinate system.

Definition at line 32 of file rpnp.h.

Referenced by rpnp().

◆ n

int mrpt::vision::pnp::rpnp::n
private

Translation vector.

Definition at line 39 of file rpnp.h.

Referenced by rpnp().

◆ obj_pts

Eigen::MatrixXd mrpt::vision::pnp::rpnp::obj_pts
private

Definition at line 30 of file rpnp.h.

Referenced by rpnp().

◆ P

Eigen::MatrixXd mrpt::vision::pnp::rpnp::P
private

Camera Intrinsic Matrix.

Definition at line 34 of file rpnp.h.

Referenced by rpnp().

◆ Q

Eigen::MatrixXd mrpt::vision::pnp::rpnp::Q
private

Transposed Object Points (3 X n) for computations.

Definition at line 35 of file rpnp.h.

Referenced by rpnp().

◆ R

Eigen::Matrix3d mrpt::vision::pnp::rpnp::R
private

Transposed Image Points (3 X n) for computations.

Definition at line 37 of file rpnp.h.

Referenced by rpnp().

◆ t

Eigen::Vector3d mrpt::vision::pnp::rpnp::t
private

Rotation matrix.

Definition at line 38 of file rpnp.h.

Referenced by rpnp().




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