-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
cuda::remap - illegal memory access #18224
Copy link
Copy link
Closed
Labels
bugcategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contrib
Milestone
Description
System information (version)
- OpenCV => 4.4.0
- Operating System / Platform => Windows 64 Bit / ubuntu 18.04 amd64
- Compiler => Visual Studio 2019 / gcc 7.5.0
Detailed description
For some specific data, the cpu version remap works fine, but the cuda version remap can not work. The error message is as follows:
OpenCV(4.4.0) Error: Gpu API call (an illegal memory access was encountered) in cv::cuda::device::imgproc::RemapDispatcherNonStream<Filter, B, T>::call, file D:/programming/ opencv_contrib-4.4.0/modules/cudawarping/src/cuda/remap.cu, line 107
Steps to reproduce
map data to reproduce: map.zip
```test.cpp
// C++ code example
#include <opencv2/opencv.hpp>
#include <opencv2/cudawarping.hpp>
using namespace cv;
using namespace cv::cuda;
int main(int argc, const char** argv)
{
FileStorage fs("D:/map.yml", FileStorage::READ);
Mat map1, map2;
fs["map1"] >> map1;
fs["map2"] >> map2;
fs.release();
Mat src, dst;
src = Mat(640, 640, CV_8UC3, Scalar(255,255,255));
cv::remap(src, dst, map1, map2, INTER_LINEAR);
imshow("dst", dst);
waitKey();
GpuMat gsrc, gdst, gmap1, gmap2;
gmap1.upload(map1);
gmap2.upload(map2);
gsrc.upload(src);
cuda::remap(gsrc, gdst, gmap1, gmap2, INTER_LINEAR);
gdst.download(dst);
imshow("gdst", dst);
waitKey();
return 0;
}
```
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugcategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contrib