Commit 5736bf5d authored by Alexander Alekhin's avatar Alexander Alekhin

stitching: fix l_gains data type from Eigen solver (float / double)

parent 4f9c1da8
...@@ -180,10 +180,13 @@ void GainCompensator::feed(const std::vector<Point> &corners, const std::vector< ...@@ -180,10 +180,13 @@ void GainCompensator::feed(const std::vector<Point> &corners, const std::vector<
#endif #endif
eigen_x = solver.solve(eigen_b); eigen_x = solver.solve(eigen_b);
eigen2cv(eigen_x, l_gains); Mat_<float> l_gains_float;
eigen2cv(eigen_x, l_gains_float);
l_gains_float.convertTo(l_gains, CV_64FC1);
#else #else
solve(A, b, l_gains); solve(A, b, l_gains);
#endif #endif
CV_CheckTypeEQ(l_gains.type(), CV_64FC1, "");
gains_.create(num_images, 1); gains_.create(num_images, 1);
for (int i = 0, j = 0; i < num_images; ++i) for (int i = 0, j = 0; i < num_images; ++i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment