Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think the way to go now works the following way:

//allocate page locked memory
cv::cuda::HostMem memory(rows, cols, type, cv::cuda::HostMem::PAGE_LOCKED);
//now copy something to the memory or fill it with sth. For example:
cv::Mat image = cv::imread(...);
image.copyTo(memory);

//now upload to gpu mat
cv::cuda::GpuMat gpuImage;
cv::cuda::Stream stream;
//this should replace Stream::enqueueUpload
gpuImage.upload(memory, stream);

I think the way to go now works the following way:

//allocate page locked memory
cv::cuda::HostMem memory(rows, cols, type, cv::cuda::HostMem::PAGE_LOCKED);
//now copy something to the memory or fill it with sth. For example:
cv::Mat image = cv::imread(...);
image.copyTo(memory);

//now upload to gpu mat
cv::cuda::GpuMat gpuImage;
cv::cuda::Stream stream;
//this should replace Stream::enqueueUpload
gpuImage.upload(memory, stream);