-
-
Notifications
You must be signed in to change notification settings - Fork 56.3k
Add distort/undistort test for fisheye::undistortPoints() #21841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add distort/undistort test for fisheye::undistortPoints() #21841
Conversation
👍 Tested with Ubuntu 18.04 amd64. |
Lack of test has allowed error described in [opencv#19138] to be unnoticed. In addition to random points, four corners and principal center added to point set
467076b
to
cff2a42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Tested manually with Ubuntu 18.04 amd64.
|
||
using PerfIntType = perf::TestBaseWithParam<std::tuple<int>>; | ||
PERF_TEST_P(PerfIntType, fisheye_undistortPoints, | ||
(testing::Values(1e2, 1e3, 1e4))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test cases with parameters 100/1000 is unstable (result is not measurable - sample is too small against overhead, each dedicated run gives different result values)
PerfIntType
It not a good part of the test name (non-descriptive).
perf::TestBaseWithParam<std::tuple<int>>
Should be perf::TestBaseWithParam<int>
Changed in #22028
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It not a good part of the test name (non-descriptive).
I was guided by this documentation https://github.com/opencv/opencv/wiki/HowToWritePerfTests
Test cases with parameters 100/1000 is unstable (result is not measurable - sample is too small against overhead,
What is a minimal allowable process time? It was pretty stable on my machine.
It was important to me to run with different amout of points to show how computation time depends on it.
…ts-tests Add distort/undistort test for fisheye::undistortPoints() * Add distort/undistort test for fisheye::undistortPoints() Lack of test has allowed error described in 19138 to be unnoticed. In addition to random points, four corners and principal center added to point set * Add random distortion coefficients set * Move undistortPoints test to google test, refactor * Add fisheye::undistortPoints() perf test * Add negative distortion coefficients to undistortPoints test, increase value * Move to theRNG() * Change test check from cvtest::norm(L2) to EXPECT_MAT_NEAR() * Layout fix * Add points number parameters, comments
Lack of test has allowed error described in [#19138] to be unnoticed.
In addition to random points, four corners and principal center
added to point set
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.