1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Finalize calib3d module split for fisheye part.

This commit is contained in:
Alexander Smorkalov
2023-07-31 16:35:23 +03:00
parent 47188b7c7e
commit 285108e2e1
16 changed files with 1666 additions and 1613 deletions
+32
View File
@@ -27,4 +27,36 @@ PERF_TEST(Undistort, DISABLED_InitInverseRectificationMap)
SANITY_CHECK_NOTHING();
}
PERF_TEST(Undistort, fisheye_undistortPoints_100k_10iter)
{
const int pointsNumber = 100000;
const Size imageSize(1280, 800);
/* Set camera matrix */
const Matx33d K(558.478087865323, 0, 620.458515360843,
0, 560.506767351568, 381.939424848348,
0, 0, 1);
/* Set distortion coefficients */
const Matx14d D(2.81e-06, 1.31e-06, -4.42e-06, -1.25e-06);
/* Create two-channel points matrix */
Mat xy[2] = {};
xy[0].create(pointsNumber, 1, CV_64F);
theRNG().fill(xy[0], RNG::UNIFORM, 0, imageSize.width); // x
xy[1].create(pointsNumber, 1, CV_64F);
theRNG().fill(xy[1], RNG::UNIFORM, 0, imageSize.height); // y
Mat points;
merge(xy, 2, points);
/* Set fixed iteration number to check only c++ code, not algo convergence */
TermCriteria termCriteria(TermCriteria::MAX_ITER, 10, 0);
Mat undistortedPoints;
TEST_CYCLE() fisheye::undistortPoints(points, undistortedPoints, K, D, noArray(), noArray(), termCriteria);
SANITY_CHECK_NOTHING();
}
} // namespace