Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

victor1234
Copy link
Contributor

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

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov
Copy link
Contributor

👍 Tested with Ubuntu 18.04 amd64.

@victor1234 victor1234 force-pushed the calib3d-undistortPoints-tests branch from 467076b to cff2a42 Compare April 18, 2022 15:23
@victor1234 victor1234 marked this pull request as ready for review April 18, 2022 15:25
@victor1234 victor1234 requested a review from asmorkalov April 18, 2022 15:25
Copy link
Contributor

@asmorkalov asmorkalov left a 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.

@opencv-pushbot opencv-pushbot added this to the 4.6.0 milestone Apr 19, 2022
@opencv-pushbot opencv-pushbot merged commit 5cc1541 into opencv:4.x Apr 19, 2022
@victor1234 victor1234 deleted the calib3d-undistortPoints-tests branch April 19, 2022 20:49
@opencv-pushbot opencv-pushbot mentioned this pull request Apr 23, 2022

using PerfIntType = perf::TestBaseWithParam<std::tuple<int>>;
PERF_TEST_P(PerfIntType, fisheye_undistortPoints,
(testing::Values(1e2, 1e3, 1e4)))
Copy link
Member

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

Copy link
Contributor Author

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.

a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants