#include <epnp.h>
Public Member Functions | |
void | add_correspondence (const double X, const double Y, const double Z, const double u, const double v) |
double | compute_pose (double R[3][3], double T[3]) |
epnp (void) | |
void | print_pose (const double R[3][3], const double t[3]) |
void | relative_error (double &rot_err, double &transl_err, const double Rtrue[3][3], const double ttrue[3], const double Rest[3][3], const double test[3]) |
double | reprojection_error (const double R[3][3], const double t[3]) |
void | reset_correspondences (void) |
void | set_internal_parameters (const double uc, const double vc, const double fu, const double fv) |
void | set_maximum_number_of_correspondences (const int n) |
~epnp () | |
Private Member Functions | |
void | choose_control_points (void) |
void | compute_A_and_b_gauss_newton (const double *l_6x10, const double *rho, double cb[4], CvMat *A, CvMat *b) |
void | compute_barycentric_coordinates (void) |
void | compute_ccs (const double *betas, const double *ut) |
void | compute_L_6x10 (const double *ut, double *l_6x10) |
void | compute_pcs (void) |
double | compute_R_and_t (const double *ut, const double *betas, double R[3][3], double t[3]) |
void | compute_rho (double *rho) |
void | copy_R_and_t (const double R_dst[3][3], const double t_dst[3], double R_src[3][3], double t_src[3]) |
double | dist2 (const double *p1, const double *p2) |
double | dot (const double *v1, const double *v2) |
void | estimate_R_and_t (double R[3][3], double t[3]) |
void | fill_M (CvMat *M, const int row, const double *alphas, const double u, const double v) |
void | find_betas_approx_1 (const CvMat *L_6x10, const CvMat *Rho, double *betas) |
void | find_betas_approx_2 (const CvMat *L_6x10, const CvMat *Rho, double *betas) |
void | find_betas_approx_3 (const CvMat *L_6x10, const CvMat *Rho, double *betas) |
void | gauss_newton (const CvMat *L_6x10, const CvMat *Rho, double current_betas[4]) |
void | mat_to_quat (const double R[3][3], double q[4]) |
void | qr_solve (CvMat *A, CvMat *b, CvMat *X) |
void | solve_for_sign (void) |
Private Attributes | |
double * | alphas |
double | ccs [4][3] |
double | cws [4][3] |
double | cws_determinant |
double | fu |
double | fv |
int | maximum_number_of_correspondences |
int | number_of_correspondences |
double * | pcs |
double * | pws |
double | uc |
double * | us |
double | vc |
epnp::epnp | ( | void | ) |
epnp::~epnp | ( | ) |
void epnp::add_correspondence | ( | const double | X, |
const double | Y, | ||
const double | Z, | ||
const double | u, | ||
const double | v | ||
) |
void epnp::choose_control_points | ( | void | ) | [private] |
void epnp::compute_A_and_b_gauss_newton | ( | const double * | l_6x10, |
const double * | rho, | ||
double | cb[4], | ||
CvMat * | A, | ||
CvMat * | b | ||
) | [private] |
void epnp::compute_barycentric_coordinates | ( | void | ) | [private] |
void epnp::compute_ccs | ( | const double * | betas, |
const double * | ut | ||
) | [private] |
void epnp::compute_L_6x10 | ( | const double * | ut, |
double * | l_6x10 | ||
) | [private] |
void epnp::compute_pcs | ( | void | ) | [private] |
double epnp::compute_pose | ( | double | R[3][3], |
double | T[3] | ||
) |
double epnp::compute_R_and_t | ( | const double * | ut, |
const double * | betas, | ||
double | R[3][3], | ||
double | t[3] | ||
) | [private] |
void epnp::compute_rho | ( | double * | rho | ) | [private] |
void epnp::copy_R_and_t | ( | const double | R_dst[3][3], |
const double | t_dst[3], | ||
double | R_src[3][3], | ||
double | t_src[3] | ||
) | [private] |
double epnp::dist2 | ( | const double * | p1, |
const double * | p2 | ||
) | [private] |
double epnp::dot | ( | const double * | v1, |
const double * | v2 | ||
) | [private] |
void epnp::estimate_R_and_t | ( | double | R[3][3], |
double | t[3] | ||
) | [private] |
void epnp::fill_M | ( | CvMat * | M, |
const int | row, | ||
const double * | alphas, | ||
const double | u, | ||
const double | v | ||
) | [private] |
void epnp::find_betas_approx_1 | ( | const CvMat * | L_6x10, |
const CvMat * | Rho, | ||
double * | betas | ||
) | [private] |
void epnp::find_betas_approx_2 | ( | const CvMat * | L_6x10, |
const CvMat * | Rho, | ||
double * | betas | ||
) | [private] |
void epnp::find_betas_approx_3 | ( | const CvMat * | L_6x10, |
const CvMat * | Rho, | ||
double * | betas | ||
) | [private] |
void epnp::gauss_newton | ( | const CvMat * | L_6x10, |
const CvMat * | Rho, | ||
double | current_betas[4] | ||
) | [private] |
void epnp::mat_to_quat | ( | const double | R[3][3], |
double | q[4] | ||
) | [private] |
void epnp::print_pose | ( | const double | R[3][3], |
const double | t[3] | ||
) |
void epnp::qr_solve | ( | CvMat * | A, |
CvMat * | b, | ||
CvMat * | X | ||
) | [private] |
void epnp::relative_error | ( | double & | rot_err, |
double & | transl_err, | ||
const double | Rtrue[3][3], | ||
const double | ttrue[3], | ||
const double | Rest[3][3], | ||
const double | test[3] | ||
) |
double epnp::reprojection_error | ( | const double | R[3][3], |
const double | t[3] | ||
) |
void epnp::reset_correspondences | ( | void | ) |
void epnp::set_internal_parameters | ( | const double | uc, |
const double | vc, | ||
const double | fu, | ||
const double | fv | ||
) |
void epnp::set_maximum_number_of_correspondences | ( | const int | n | ) |
void epnp::solve_for_sign | ( | void | ) | [private] |
double * epnp::alphas [private] |
double epnp::cws_determinant [private] |
int epnp::maximum_number_of_correspondences [private] |
int epnp::number_of_correspondences [private] |