Merge pull request #730 from vpisarev:ba_fix
This commit is contained in:
commit
727a339455
@ -435,7 +435,7 @@ namespace cv
|
|||||||
|
|
||||||
typedef bool (*BundleAdjustCallback)(int iteration, double norm_error, void* user_data);
|
typedef bool (*BundleAdjustCallback)(int iteration, double norm_error, void* user_data);
|
||||||
|
|
||||||
class LevMarqSparse {
|
class CV_EXPORTS LevMarqSparse {
|
||||||
public:
|
public:
|
||||||
LevMarqSparse();
|
LevMarqSparse();
|
||||||
LevMarqSparse(int npoints, // number of points
|
LevMarqSparse(int npoints, // number of points
|
||||||
|
@ -1105,7 +1105,7 @@ void LevMarqSparse::bundleAdjust( vector<Point3d>& points, //positions of points
|
|||||||
Mat rot_vec = Mat(levmar.P).rowRange(i*num_cam_param, i*num_cam_param+3);
|
Mat rot_vec = Mat(levmar.P).rowRange(i*num_cam_param, i*num_cam_param+3);
|
||||||
Rodrigues( rot_vec, R[i] );
|
Rodrigues( rot_vec, R[i] );
|
||||||
//translation
|
//translation
|
||||||
T[i] = Mat(levmar.P).rowRange(i*num_cam_param + 3, i*num_cam_param+6);
|
Mat(levmar.P).rowRange(i*num_cam_param + 3, i*num_cam_param+6).copyTo(T[i]);
|
||||||
|
|
||||||
//intrinsic camera matrix
|
//intrinsic camera matrix
|
||||||
double* intr_data = (double*)cameraMatrix[i].data;
|
double* intr_data = (double*)cameraMatrix[i].data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user