Hello,
I manage to convert from GpuMat to Vector<point2f> by following this post. Now I am trying to optimize the code. I found that to reduce the time spent on the cudaMemCpy2D I have to pin the host buffer memory. In the following image you can see how cudaMemCpy2D is using a lot of resources at every frame:
In order to pin the host memory, I found the class:
cv::cuda::HostMem
However, when I do:
cv::Mat mat(1, vec.size(), CV_32FC2, (void*)&vec[0]);
cv::cuda::HostMem h_mat(mat);
and then I run the function upload/download the vec is empty.
Is anyone who can help me with this?
Thank you in advance.