diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-01 12:56:04 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-01 12:56:04 +0400 |
commit | 1a7ab1da099a7e3bd1de03d721f049909963f105 (patch) | |
tree | 7bb582acf4b678daf9ad650a65efcb2d18da08c0 /extern | |
parent | a2027237edc49d5b7926f5de6df855d163edcf8e (diff) |
Hrm, gcc became broken after recent commit.
Hope now gcc and 32bit msvc would both work.
Diffstat (limited to 'extern')
-rw-r--r-- | extern/libmv/libmv/simple_pipeline/modal_solver.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/extern/libmv/libmv/simple_pipeline/modal_solver.cc b/extern/libmv/libmv/simple_pipeline/modal_solver.cc index e14f1db272b..169c53bb601 100644 --- a/extern/libmv/libmv/simple_pipeline/modal_solver.cc +++ b/extern/libmv/libmv/simple_pipeline/modal_solver.cc @@ -56,8 +56,8 @@ void ModalSolverLogProress(ProgressUpdateCallback *update_callback, } struct ModalReprojectionError { - ModalReprojectionError(Vec2 &marker, Vec3 &bundle) - : marker(marker), bundle(bundle) { } + ModalReprojectionError(double observed_x, double observed_y, Vec3 &bundle) + : observed_x(observed_x), observed_y(observed_y), bundle(bundle) { } template <typename T> bool operator()(const T* quaternion, // Rotation quaternion @@ -84,13 +84,14 @@ struct ModalReprojectionError { // The error is the difference between reprojected // and observed marker position. - residuals[0] = xn - T(marker(0)); - residuals[1] = yn - T(marker(1)); + residuals[0] = xn - T(observed_x); + residuals[1] = yn - T(observed_y); return true; } - Vec2 marker; + double observed_x; + double observed_y; Vec3 bundle; }; } // namespace @@ -183,7 +184,7 @@ void ModalSolver(Tracks &tracks, problem.AddResidualBlock(new ceres::AutoDiffCostFunction< ModalReprojectionError, 2, /* num_residuals */ - 4>(new ModalReprojectionError(Vec2(marker.x, marker.y), + 4>(new ModalReprojectionError(marker.x, marker.y, point->X)), NULL, &quaternion(0)); |