class mrpt::vision::pnp::posit

#include </home/jlblanco/mrpt/libs/vision/src/pnp/posit.h>

class posit
{
public:
    // construction

    posit(
        Eigen::MatrixXd obj_pts_,
        Eigen::MatrixXd img_pts_,
        Eigen::MatrixXd camera_intrinsic_,
        int n
        );

    //
methods

    void POS();
    bool compute_pose(Eigen::Ref<Eigen::Matrix3d> R_, Eigen::Ref<Eigen::Vector3d> t_);
    long get_img_diff();
};

Construction

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

Methods

void POS()

Function used to compute pose from orthogonality.

bool 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.

123-141, 1995.

Parameters:

R_

t_

Returns:

true on success

long get_img_diff()

Function to check for convergence.

Returns:

Representative value of error