mirror of
https://github.com/opencv/opencv.git
synced 2024-12-03 16:35:09 +08:00
fixed problem in solvePnPRansac with TBB
This commit is contained in:
parent
61c7c441b9
commit
6c308dac10
@ -29,10 +29,18 @@ epnp::epnp(const cv::Mat& cameraMatrix, const cv::Mat& opoints, const cv::Mat& i
|
|||||||
|
|
||||||
alphas.resize(4 * number_of_correspondences);
|
alphas.resize(4 * number_of_correspondences);
|
||||||
pcs.resize(3 * number_of_correspondences);
|
pcs.resize(3 * number_of_correspondences);
|
||||||
|
|
||||||
|
max_nr = 0;
|
||||||
|
A1 = NULL;
|
||||||
|
A2 = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
epnp::~epnp()
|
epnp::~epnp()
|
||||||
{
|
{
|
||||||
|
if (A1)
|
||||||
|
delete[] A1;
|
||||||
|
if (A2)
|
||||||
|
delete[] A2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void epnp::choose_control_points(void)
|
void epnp::choose_control_points(void)
|
||||||
@ -513,9 +521,6 @@ void epnp::gauss_newton(const CvMat * L_6x10, const CvMat * Rho,
|
|||||||
|
|
||||||
void epnp::qr_solve(CvMat * A, CvMat * b, CvMat * X)
|
void epnp::qr_solve(CvMat * A, CvMat * b, CvMat * X)
|
||||||
{
|
{
|
||||||
static int max_nr = 0;
|
|
||||||
static double * A1, * A2;
|
|
||||||
|
|
||||||
const int nr = A->rows;
|
const int nr = A->rows;
|
||||||
const int nc = A->cols;
|
const int nc = A->cols;
|
||||||
|
|
||||||
|
@ -74,6 +74,8 @@ class epnp {
|
|||||||
|
|
||||||
double cws[4][3], ccs[4][3];
|
double cws[4][3], ccs[4][3];
|
||||||
double cws_determinant;
|
double cws_determinant;
|
||||||
|
int max_nr;
|
||||||
|
double * A1, * A2;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user