mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Replace pow with std::pow
The C pow casts to double while std::pow has overloads that can be optimized by the compiler. Also replace pow(*, 1./3) by cbrt.
This commit is contained in:
@@ -156,7 +156,7 @@ bool calibrateRotatingCamera(const std::vector<Mat> &Hs, Mat &K)
|
||||
for (int i = 0; i < m; ++i)
|
||||
{
|
||||
CV_Assert(Hs[i].size() == Size(3, 3) && Hs[i].type() == CV_64F);
|
||||
Hs_[i] = Hs[i] / std::pow(determinant(Hs[i]), 1./3.);
|
||||
Hs_[i] = Hs[i] / std::cbrt(determinant(Hs[i]));
|
||||
}
|
||||
|
||||
const int idx_map[3][3] = {{0, 1, 2}, {1, 3, 4}, {2, 4, 5}};
|
||||
|
||||
Reference in New Issue
Block a user