When I use cv::cuda::warpAffine function and the GpuMat is created by cv::cuda::createContinuous function, the code throws error:
OpenCV(4.5.0) D:/opencv-4.5.0/modules/core/include\opencv2/core/cuda/common.hpp:102 error: (-217:Gpu API call) invalid argument in function ‘cv::cuda::device::bindTexture’
The code as follows:
cuda::GpuMat imgGpu = cuda::createContinuous(img.size(), img.type());
imgGpu.upload(img);
cuda::GpuMat dstGpu = cuda::createContinuous(img.size(), img.type());
warpAffine(imgGpu, dstGpu, rot_mat, imgGpu.size(), INTER_LINEAR);