OpenCV3: where has cv::cuda::Stream::enqueueUpload

2019-02-19 08:28发布

In former versions of OpenCV there was the function Stream::enqueueUpload that could be used to upload data to the GPU asynchronously together with CudaMem (compare: how to use gpu::Stream in OpenCV?). However, this function does no longer exist in OpenCV 3. The CudaMem class is also gone but seems to have been replaced by the HostMem class.

Can anyone tell me how to perform an asynchronous upload in OpenCV 3?

1条回答
霸刀☆藐视天下
2楼-- · 2019-02-19 09:09

It can be done now via void GpuMat::upload(InputArray arr, Stream& stream) method:

cv::cuda::GpuMat d_mat;
cv::cuda::HostMem h_mat;
cv::cuda::Stream stream;
d_mat.upload(h_mat, stream);
查看更多
登录 后发表回答