Skip to content

OpenCL native_sqrt precision  #9821

@EwanC

Description

@EwanC
System information (version)
  • OpenCV => 3.3.0-dev
  • Internal OpenCL 1.2 implementation.
Detailed description

In OpenCL the accuracy of builtin functions with the native_ prefix is implementation defined.
The improc corner.cl file is using native_sqrt in two places, line 219 & 211.

Because of this I'm seeing fails with an internal OpenCL implementation of the OCL_Imgproc/CornerMinEigenVal.Mat subtests in the opencv_test_imgproc unit tests due to not precise enough results. Changing native_sqrt to sqrt resolves this issue.

If there is a hard precision requirement here we shouldn't be using native builtins as it's not portable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions