54 #include <opencv2/core/core.hpp> 63 PnPsolver(
const Frame &F,
const vector<MapPoint*> &vpMapPointMatches);
67 void SetRansacParameters(
double probability = 0.99,
int minInliers = 8 ,
int maxIterations = 300,
int minSet = 4,
float epsilon = 0.4,
70 cv::Mat
find(vector<bool> &vbInliers,
int &nInliers);
72 cv::Mat
iterate(
int nIterations,
bool &bNoMore, vector<bool> &vbInliers,
int &nInliers);
83 const double u,
const double v);
88 const double Rtrue[3][3],
const double ttrue[3],
89 const double Rest[3][3],
const double test[3]);
91 void print_pose(
const double R[3][3],
const double t[3]);
96 void fill_M(CvMat * M,
const int row,
const double *
alphas,
const double u,
const double v);
97 void compute_ccs(
const double * betas,
const double * ut);
105 void qr_solve(CvMat * A, CvMat * b, CvMat * X);
107 double dot(
const double * v1,
const double * v2);
108 double dist2(
const double * p1,
const double * p2);
113 void gauss_newton(
const CvMat * L_6x10,
const CvMat * Rho,
double current_betas[4]);
115 double cb[4], CvMat * A, CvMat * b);
118 double R[3][3],
double t[3]);
122 void copy_R_and_t(
const double R_dst[3][3],
const double t_dst[3],
123 double R_src[3][3],
double t_src[3]);
125 void mat_to_quat(
const double R[3][3],
double q[4]);
void estimate_R_and_t(double R[3][3], double t[3])
void compute_L_6x10(const double *ut, double *l_6x10)
void find_betas_approx_3(const CvMat *L_6x10, const CvMat *Rho, double *betas)
vector< bool > mvbBestInliers
void print_pose(const double R[3][3], const double t[3])
void compute_rho(double *rho)
double compute_R_and_t(const double *ut, const double *betas, double R[3][3], double t[3])
void gauss_newton(const CvMat *L_6x10, const CvMat *Rho, double current_betas[4])
void compute_barycentric_coordinates(void)
cv::Mat iterate(int nIterations, bool &bNoMore, vector< bool > &vbInliers, int &nInliers)
cv::Mat find(vector< bool > &vbInliers, int &nInliers)
vector< cv::Point2f > mvP2D
void set_maximum_number_of_correspondences(const int n)
double dist2(const double *p1, const double *p2)
int maximum_number_of_correspondences
double compute_pose(double R[3][3], double T[3])
void find_betas_approx_1(const CvMat *L_6x10, const CvMat *Rho, double *betas)
int number_of_correspondences
vector< float > mvMaxError
PnPsolver(const Frame &F, const vector< MapPoint * > &vpMapPointMatches)
double reprojection_error(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])
vector< cv::Point3f > mvP3Dw
void SetRansacParameters(double probability=0.99, int minInliers=8, int maxIterations=300, int minSet=4, float epsilon=0.4, float th2=5.991)
vector< bool > mvbInliersi
void reset_correspondences(void)
double dot(const double *v1, const double *v2)
void compute_A_and_b_gauss_newton(const double *l_6x10, const double *rho, double cb[4], CvMat *A, CvMat *b)
vector< MapPoint * > mvpMapPointMatches
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])
vector< size_t > mvAllIndices
vector< bool > mvbRefinedInliers
void compute_ccs(const double *betas, const double *ut)
void find_betas_approx_2(const CvMat *L_6x10, const CvMat *Rho, double *betas)
void solve_for_sign(void)
void mat_to_quat(const double R[3][3], double q[4])
void add_correspondence(const double X, const double Y, const double Z, const double u, const double v)
void qr_solve(CvMat *A, CvMat *b, CvMat *X)
vector< size_t > mvKeyPointIndices
void choose_control_points(void)
void fill_M(CvMat *M, const int row, const double *alphas, const double u, const double v)