Skip to content
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

ocl_resize: use resizeLN integer path for 16U #21199

Closed
wants to merge 1 commit into from

Conversation

JoeHowse
Copy link
Contributor

@JoeHowse JoeHowse commented Dec 5, 2021

As described in #21198, the resizeLN kernel without INTER_LINEAR_INTEGER gives invalid results for CV_16U depth.

This pull request works around the issue by enabling the INTER_LINEAR_INTEGER path for CV_16U.

Pull Request Readiness Checklist

  • 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

* for 16U, avoid resizeLN non-integer path because it gives bad results
@alalek
Copy link
Member

alalek commented Dec 9, 2021

This patch doesn't fix the problem caused by code from the issue.

Please prepare C++ regression test for the mentioned case.

@alalek
Copy link
Member

alalek commented Dec 9, 2021

Please check this patch: #21228

@JoeHowse
Copy link
Contributor Author

JoeHowse commented Dec 9, 2021

@alalek Your patch works for me, thanks! If you merge your patch, I will close mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug category: imgproc category: ocl pr: needs test New functionality requires minimal tests set
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenCL: resizeLN (without INTER_LINEAR_INTEGER) gives invalid results for CV_16U
2 participants