Main MRPT website > C++ reference for MRPT 1.5.9
List of all members | Public Member Functions | Private Attributes
mrpt::vision::pnp::posit Class Reference

Detailed Description

Definition at line 36 of file posit.h.

#include <pnp/posit.h>

Public Member Functions

 posit (Eigen::MatrixXd obj_pts_, Eigen::MatrixXd img_pts_, Eigen::MatrixXd camera_intrinsic_, int n)
 Used to store img_vecs from previous iteration. More...
 
void POS ()
 Function used to compute pose from orthogonality. More...
 
bool compute_pose (Eigen::Ref< Eigen::Matrix3d > R_, Eigen::Ref< Eigen::Vector3d > t_)
 Computes pose using iterative computation of POS() More...
 
long get_img_diff ()
 Function to check for convergence. 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 pixels. More...
 
Eigen::MatrixXd obj_matrix
 Camera Intrinsic matrix. More...
 
double f
 Pseudo-Inverse of Object Points matrix. More...
 
Eigen::VectorXd epsilons
 Focal Length from camera intrinsic matrix. More...
 
int n
 Co-efficients used for scaling. More...
 
Eigen::MatrixXd R
 Number of 2d/3d correspondences. More...
 
Eigen::VectorXd t
 Rotation Matrix. More...
 
Eigen::MatrixXd obj_vecs
 Translation Vector. More...
 
Eigen::MatrixXd img_vecs
 Object Points relative to 1st object point. More...
 
Eigen::MatrixXd img_vecs_old
 Image Points relative to 1st image point. More...
 

Constructor & Destructor Documentation

◆ posit()

mrpt::vision::pnp::posit::posit ( Eigen::MatrixXd  obj_pts_,
Eigen::MatrixXd  img_pts_,
Eigen::MatrixXd  camera_intrinsic_,
int  n 
)

Used to store img_vecs from previous iteration.

Constructor for P-PnP class

Definition at line 19 of file posit.cpp.

References cam_intrinsic, epsilons, f, img_pts, img_vecs, img_vecs_old, mrpt::pbmap::inverse(), n, obj_matrix, obj_pts, obj_vecs, and R.

Member Function Documentation

◆ compute_pose()

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

Computes pose using iterative computation of POS()


Iterate over results obtained by the POS function; see paper "Model-Based Object Pose in 25 Lines of Code", IJCV 15, pp.

Parameters
[out]R_
[out]t_
Returns
true on success

123-141, 1995.

Definition at line 82 of file posit.cpp.

References LOOP_MAX_COUNT, and R.

◆ get_img_diff()

long mrpt::vision::pnp::posit::get_img_diff ( )

Function to check for convergence.

Returns
Representative value of error

Definition at line 139 of file posit.cpp.

◆ POS()

void mrpt::vision::pnp::posit::POS ( )

Function used to compute pose from orthogonality.

Definition at line 43 of file posit.cpp.

References R.

Member Data Documentation

◆ cam_intrinsic

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

Image Points in pixels.

Definition at line 41 of file posit.h.

Referenced by posit().

◆ epsilons

Eigen::VectorXd mrpt::vision::pnp::posit::epsilons
private

Focal Length from camera intrinsic matrix.

Definition at line 45 of file posit.h.

Referenced by posit().

◆ f

double mrpt::vision::pnp::posit::f
private

Pseudo-Inverse of Object Points matrix.

Definition at line 44 of file posit.h.

Referenced by posit().

◆ img_pts

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

Object Points in Camera Co-ordinate system.

Definition at line 40 of file posit.h.

Referenced by posit().

◆ img_vecs

Eigen::MatrixXd mrpt::vision::pnp::posit::img_vecs
private

Object Points relative to 1st object point.

Definition at line 52 of file posit.h.

Referenced by posit().

◆ img_vecs_old

Eigen::MatrixXd mrpt::vision::pnp::posit::img_vecs_old
private

Image Points relative to 1st image point.

Definition at line 53 of file posit.h.

Referenced by posit().

◆ n

int mrpt::vision::pnp::posit::n
private

Co-efficients used for scaling.

Definition at line 46 of file posit.h.

Referenced by posit().

◆ obj_matrix

Eigen::MatrixXd mrpt::vision::pnp::posit::obj_matrix
private

Camera Intrinsic matrix.

Definition at line 42 of file posit.h.

Referenced by posit().

◆ obj_pts

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

Definition at line 39 of file posit.h.

Referenced by posit().

◆ obj_vecs

Eigen::MatrixXd mrpt::vision::pnp::posit::obj_vecs
private

Translation Vector.

Definition at line 51 of file posit.h.

Referenced by posit().

◆ R

Eigen::MatrixXd mrpt::vision::pnp::posit::R
private

Number of 2d/3d correspondences.

Definition at line 48 of file posit.h.

Referenced by posit().

◆ t

Eigen::VectorXd mrpt::vision::pnp::posit::t
private

Rotation Matrix.

Definition at line 49 of file posit.h.




Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020