Skip to content

Relax accuracy requirement on OpenCL MinEigenVal corner kernel test.#19793

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
aarongreig:aaron/imgproc/relaxCornerEigenValTest
Mar 29, 2021
Merged

Relax accuracy requirement on OpenCL MinEigenVal corner kernel test.#19793
opencv-pushbot merged 1 commit intoopencv:3.4from
aarongreig:aaron/imgproc/relaxCornerEigenValTest

Conversation

@aarongreig
Copy link
Copy Markdown
Contributor

The MinEigenVal path through the corner.cl kernel makes use of native_sqrt,
a math builtin function which has implementation defined accuracy.

Partially addresses issue #9821

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 other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to 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

OCL_ON(cv::cornerMinEigenVal(usrc_roi, udst_roi, blockSize, apertureSize, borderType));

Near(1e-5, true);
Near(0.1, true);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add here some check to detect your platform / OpenCL device?
I would prefer to keep original check threshold for x86 platform.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking to base the tests on the OpenCL spec rather than a specific implementation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about what do you mean.

Does this work for you?

if (ocl::Device::getDefault().isIntel())
    Near(1e-5, true);
else
    Near(0.1, true);  // using native_* OpenCV functions may loose accuracy

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that works, I'll change it to be like that

The MinEigenVal path through the corner.cl kernel makes use of native_sqrt,
a math builtin function which has implementation defined accuracy.

Partially addresses issue opencv#9821
@aarongreig aarongreig force-pushed the aaron/imgproc/relaxCornerEigenValTest branch from 94a0cfa to 53652a6 Compare March 29, 2021 11:07
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

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.

3 participants