class mrpt::vision::pnp::epnp

Overview

Chandra Mangipudi

11/08/16

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

class epnp
{
public:
    // construction

    epnp(const cv::Mat& cameraMatrix, const cv::Mat& opoints, const cv::Mat& ipoints);

    // methods

    void add_correspondence(
        const double X,
        const double Y,
        const double Z,
        const double u,
        const double v
        );

    void compute_pose(cv::Mat& R, cv::Mat& t);
};

Construction

epnp(
    const cv::Mat& cameraMatrix,
    const cv::Mat& opoints,
    const cv::Mat& ipoints
    )

Constructor for EPnP class.

Methods

void add_correspondence(
    const double X,
    const double Y,
    const double Z,
    const double u,
    const double v
    )

Add a 2d/3d correspondence.

Parameters:

X

X coordinate in Camera coordinate system

Y

Y coordinate in Camera coordinate system

Z

Z coordinate in Camera coordinate system

u

Image pixel coordinate u in x axis

v

Image pixel coordinate v in y axis

void compute_pose(cv::Mat& R, cv::Mat& t)

OpenCV wrapper to compute pose.

Parameters:

R

Rotation Matrix

t

Translation Vector