OpenCV3:cv :: cuda :: Stream :: enqueueUpload()哪里去了? [英] OpenCV3: where has cv::cuda::Stream::enqueueUpload() gone?
本文介绍了OpenCV3:cv :: cuda :: Stream :: enqueueUpload()哪里去了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在以前的OpenCV版本中,有功能Stream::enqueueUpload
可与CudaMem
一起用于将数据异步上传到GPU(比较:
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.
有人可以告诉我如何在OpenCV 3中执行异步上传吗?
Can anyone tell me how to perform an asynchronous upload in OpenCV 3?
推荐答案
现在可以通过void GpuMat::upload(InputArray arr, Stream& stream)
方法完成
cv::cuda::GpuMat d_mat;
cv::cuda::HostMem h_mat;
cv::cuda::Stream stream;
d_mat.upload(h_mat, stream);
这篇关于OpenCV3:cv :: cuda :: Stream :: enqueueUpload()哪里去了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文