mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
Replaced DECOMP_SVD with DECOMP_NORMAL|DECOMP_LU for speed (videostab)
This commit is contained in:
parent
e49ea39a1f
commit
ae8d377561
@ -136,7 +136,7 @@ static Mat estimateGlobMotionLeastSquaresTranslationAndScale(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Mat_<float> sol;
|
Mat_<float> sol;
|
||||||
solve(A, b, sol, DECOMP_SVD);
|
solve(A, b, sol, DECOMP_NORMAL | DECOMP_LU);
|
||||||
|
|
||||||
if (rmse)
|
if (rmse)
|
||||||
*rmse = static_cast<float>(norm(A*sol, b, NORM_L2) / sqrt(static_cast<double>(npoints)));
|
*rmse = static_cast<float>(norm(A*sol, b, NORM_L2) / sqrt(static_cast<double>(npoints)));
|
||||||
@ -173,7 +173,7 @@ static Mat estimateGlobMotionLeastSquaresSimilarity(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Mat_<float> sol;
|
Mat_<float> sol;
|
||||||
solve(A, b, sol, DECOMP_SVD);
|
solve(A, b, sol, DECOMP_NORMAL | DECOMP_LU);
|
||||||
|
|
||||||
if (rmse)
|
if (rmse)
|
||||||
*rmse = static_cast<float>(norm(A*sol, b, NORM_L2) / sqrt(static_cast<double>(npoints)));
|
*rmse = static_cast<float>(norm(A*sol, b, NORM_L2) / sqrt(static_cast<double>(npoints)));
|
||||||
@ -212,7 +212,7 @@ static Mat estimateGlobMotionLeastSquaresAffine(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Mat_<float> sol;
|
Mat_<float> sol;
|
||||||
solve(A, b, sol, DECOMP_SVD);
|
solve(A, b, sol, DECOMP_NORMAL | DECOMP_LU);
|
||||||
|
|
||||||
if (rmse)
|
if (rmse)
|
||||||
*rmse = static_cast<float>(norm(A*sol, b, NORM_L2) / sqrt(static_cast<double>(npoints)));
|
*rmse = static_cast<float>(norm(A*sol, b, NORM_L2) / sqrt(static_cast<double>(npoints)));
|
||||||
|
Loading…
Reference in New Issue
Block a user