OpenCV3: where has cv::cuda::Stream::enqueueUpload() gone?

给你一囗甜甜゛ 提交于 2019-12-19 10:26:09

问题


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:


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);


来源:https://stackoverflow.com/questions/36104433/opencv3-where-has-cvcudastreamenqueueupload-gone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!