Skip to content

Fix calculation of GpuMat::dataend#21555

Merged
opencv-pushbot merged 1 commit intoopencv:4.xfrom
cudawarped:fix_gpumat_dataend_bug
Feb 3, 2022
Merged

Fix calculation of GpuMat::dataend#21555
opencv-pushbot merged 1 commit intoopencv:4.xfrom
cudawarped:fix_gpumat_dataend_bug

Conversation

@cudawarped
Copy link
Copy Markdown
Contributor

@cudawarped cudawarped commented Feb 2, 2022

GpuMat::dataend() is incorrectly calculated in GpuMat::create() meaning that locateROI(wholeSize,ofs) currently returns the stride in wholeSize instead of the width of the ROI when the GpuMat constructor has to allocate device memory internally.

The test case opencv/opencv_contrib#3168 requres a modification to createMat() to return wholeSize and ofs.

This PR will cause cudafilters test cases to fail until opencv/opencv_contrib#3167 is merged.

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
force_builders=Custom
buildworker:Custom=linux-4,linux-6
build_image:Custom=ubuntu-cuda:18.04

Add output to createMat() to be used by locateROI test cases.
@opencv-pushbot opencv-pushbot merged commit 46e1560 into opencv:4.x Feb 3, 2022
@alalek alalek mentioned this pull request Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug category: gpu/cuda (contrib) OpenCV 4.0+: moved to opencv_contrib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants