Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It turns out that it works perfectly with cudaMemcpy2D, as long as you don't make the image contiguous where you expect it to be not contiguous. Oops. So cudaMemcpy2D does exactly what we thought it would do.

You should use the step from GpuMat as the source pitch value. Destination pitch should be the width of the image (because there is no additional spacing in a continuous image). I assume width and height are clear. src can be or gpuMat.ptr(0), as far as I can see.