Commit 4c3cad42 authored by Julien Osman's avatar Julien Osman Committed by Thibaut ROMAIN
Browse files

ENH: Avoid setting equation system multiple times

parent e19dcd22
......@@ -148,15 +148,15 @@ void computeCoefficients(const std::vector<PrecisionType> & f,
PrecisionType res = std::numeric_limits<PrecisionType>::max();
VectorType coeffs;
UpdateMatrix(r, x, y ,z ,M);
for (int i =0; i<10; i++)
{
if (res < epsilon)
{
break;
}
auto w2 = weights * weights;
UpdateMatrix(r, x, y ,z ,M);
vnl_svd<PrecisionType> svd(M.transpose()*w2*M);
......@@ -388,4 +388,4 @@ void RPCSolver::Solve(const GCPsContainerType& gcpContainer, PrecisionType& rmsE
rmsError = std::sqrt(rmseAcc/numberOfPoints);
}
}
\ No newline at end of file
}
Supports Markdown
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