Hi all,
Now I am writing a short code as follows:
int f_size = 64 * 64 * sizeof(float);
float *d_input, *d_output, *d_xmap, *d_ymap;
int value;
cudaMalloc((void **)&d_input, f_size);
cudaMalloc((void **)&d_output, f_size);
cudaMalloc((void **)&d_xmap, f_size);
cudaMalloc((void **)&d_ymap, f_size);
After that,
d_input, d_xmap, d_ymap
are assigned the correct data. And then, I have converted them into GpuMat format:
cv::gpu::GpuMat gpu_input(64, 64, CV_32FC1, d_input);
cv::gpu::GpuMat gpu_output(64, 64, CV_32FC1, d_output);
cv::gpu::GpuMat gpu_xmap(64, 64, CV_32FC1, d_xmap);
cv::gpu::GpuMat gpu_ymap(64, 64, CV_32FC1, d_ymap);
Finally, remap() function is applied:
cv::gpu::remap(gpu_input, gpu_output, gpu_xmap, gpu_ymap, cv::INTER_CUBIC, cv::BORDER_CONSTANT, value);
I have used this funtion on OpenCV lib ver-3.4.0 (cv::cuda::remap()) and it have correctly operated. However, with OpenCV < ver-3.4.0, I have reach an error as shown in the figure below:
External Media
Please help me fix this bug of input parameters of cv::gpu::remap() function.
Thank all so much!