MRPT  1.9.9
mrpt::vision::pnp::lhm Class Reference

Detailed Description

Author
Chandra Mangipudi
Date
10/08/16

Definition at line 38 of file lhm.h.

#include <pnp/lhm.h>

Public Member Functions

 lhm (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 using LHM PnP algorithm. More...
 
void absKernel ()
 Function to compute pose during an iteration. More...
 
void estimate_t ()
 Function to estimate translation given an estimated rotation matrix. More...
 
void xform ()
 Transform object points in Body frame (Landmark Frame) to estimated Camera Frame. More...
 
Eigen::Matrix4d qMatQ (Eigen::VectorXd q)
 Iternal Function of quaternion. More...
 
Eigen::Matrix4d qMatW (Eigen::VectorXd q)
 Iternal Function of quaternion. More...
 

Private Attributes

Eigen::MatrixXd obj_pts
 
Eigen::MatrixXd img_pts
 Object points in Camera Co-ordinate system. More...
 
Eigen::MatrixXd cam_intrinsic
 Image points in pixel co-ordinates. More...
 
Eigen::MatrixXd P
 Camera intrinsic matrix. More...
 
Eigen::MatrixXd Q
 Trnaspose of Object points . More...
 
Eigen::Matrix3d R
 Transpose of Image points . More...
 
Eigen::Matrix3d G
 Matrix for internal computations. More...
 
Eigen::Vector3d t
 Rotation Matrix. More...
 
std::vector< Eigen::Matrix3d > F
 Translation Vector. More...
 
double err
 Storage matrix for each point. More...
 
double err2
 Error variable for convergence selection. More...
 
int n
 Error variable for convergence selection. More...
 

Constructor & Destructor Documentation

◆ lhm()

lhm::lhm ( Eigen::MatrixXd  obj_pts_,
Eigen::MatrixXd  img_pts_,
Eigen::MatrixXd  cam_,
int  n0 
)

Number of 2d/3d correspondences.

Constructor for the LHM class

Definition at line 29 of file lhm.cpp.

References cam_intrinsic, img_pts, obj_pts, P, and Q.

Member Function Documentation

◆ absKernel()

void lhm::absKernel ( )

Function to compute pose during an iteration.

Definition at line 81 of file lhm.cpp.

References err2, estimate_t(), F, n, P, Q, qMatQ(), qMatW(), R, and xform().

Referenced by compute_pose().

◆ compute_pose()

bool lhm::compute_pose ( Eigen::Ref< Eigen::Matrix3d >  R_,
Eigen::Ref< Eigen::Vector3d >  t_ 
)

Function to compute pose using LHM PnP algorithm.

Parameters
R_Rotation matrix
t_Trnaslation Vector
Returns
Success flag

Definition at line 194 of file lhm.cpp.

References absKernel(), EPSILON_LHM, err, err2, F, G, mrpt::pbmap::inverse(), n, P, Q, R, and TOL_LHM.

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

◆ estimate_t()

void lhm::estimate_t ( )

Function to estimate translation given an estimated rotation matrix.

Definition at line 48 of file lhm.cpp.

References F, G, n, P, and R.

Referenced by absKernel().

◆ qMatQ()

Eigen::Matrix4d lhm::qMatQ ( Eigen::VectorXd  q)

Iternal Function of quaternion.

Parameters
qQuaternion
Returns

Definition at line 61 of file lhm.cpp.

Referenced by absKernel().

◆ qMatW()

Eigen::Matrix4d lhm::qMatW ( Eigen::VectorXd  q)

Iternal Function of quaternion.

Parameters
qQuaternion
Returns

Definition at line 71 of file lhm.cpp.

Referenced by absKernel().

◆ xform()

void lhm::xform ( )

Transform object points in Body frame (Landmark Frame) to estimated Camera Frame.

Definition at line 56 of file lhm.cpp.

References n, P, Q, R, and t.

Referenced by absKernel().

Member Data Documentation

◆ cam_intrinsic

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

Image points in pixel co-ordinates.

Definition at line 42 of file lhm.h.

Referenced by lhm().

◆ err

double mrpt::vision::pnp::lhm::err
private

Storage matrix for each point.

Definition at line 51 of file lhm.h.

Referenced by compute_pose().

◆ err2

double mrpt::vision::pnp::lhm::err2
private

Error variable for convergence selection.

Definition at line 52 of file lhm.h.

Referenced by absKernel(), and compute_pose().

◆ F

std::vector<Eigen::Matrix3d> mrpt::vision::pnp::lhm::F
private

Translation Vector.

Definition at line 50 of file lhm.h.

Referenced by absKernel(), compute_pose(), and estimate_t().

◆ G

Eigen::Matrix3d mrpt::vision::pnp::lhm::G
private

Matrix for internal computations.

Definition at line 47 of file lhm.h.

Referenced by compute_pose(), and estimate_t().

◆ img_pts

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

Object points in Camera Co-ordinate system.

Definition at line 41 of file lhm.h.

Referenced by lhm().

◆ n

int mrpt::vision::pnp::lhm::n
private

Error variable for convergence selection.

Definition at line 54 of file lhm.h.

Referenced by absKernel(), compute_pose(), estimate_t(), and xform().

◆ obj_pts

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

Definition at line 40 of file lhm.h.

Referenced by lhm().

◆ P

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

Camera intrinsic matrix.

Definition at line 43 of file lhm.h.

Referenced by absKernel(), compute_pose(), estimate_t(), lhm(), and xform().

◆ Q

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

Trnaspose of Object points .

Definition at line 44 of file lhm.h.

Referenced by absKernel(), compute_pose(), lhm(), and xform().

◆ R

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

Transpose of Image points .

Definition at line 46 of file lhm.h.

Referenced by absKernel(), compute_pose(), estimate_t(), and xform().

◆ t

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

Rotation Matrix.

Definition at line 48 of file lhm.h.

Referenced by xform().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020