Main MRPT website > C++ reference for MRPT 1.5.6
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 23 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, and R.

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 306 of file rpnp.cpp.

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

◆ 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 42 of file rpnp.cpp.

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

◆ 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 354 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 340 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 27 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 26 of file rpnp.h.

Referenced by rpnp().

◆ n

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

Translation vector.

Definition at line 33 of file rpnp.h.

Referenced by rpnp().

◆ obj_pts

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

Definition at line 25 of file rpnp.h.

Referenced by rpnp().

◆ P

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

Camera Intrinsic Matrix.

Definition at line 28 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 29 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 31 of file rpnp.h.

Referenced by rpnp().

◆ t

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

Rotation matrix.

Definition at line 32 of file rpnp.h.




Page generated by Doxygen 1.8.14 for MRPT 1.5.6 Git: 4c65e8431 Tue Apr 24 08:18:17 2018 +0200 at lun oct 28 01:35:26 CET 2019