OpenCV 3.0上的GPU功能在哪里? [英] Where are the GPU functions on OpenCV 3.0?
问题描述
我知道在OpenCV 3.0中,模块GPU已经被模块CUDA取代,或者更好的是已经被分成几个模块。
因此 cv :: gpu :: GpuMat
已被 cv :: cuda :: GpuMat
取代。
但是函数怎么办?
其中例如有以下内容移动到:
cv :: gpu :: GaussianBlurr?
cv :: gpu ::流流;
stream.enqueueConvert(...)
显然他们不是cuda模块。no cv :: cuda :: GaussianBlurr
)。
所有CUDA加速过滤器(Blur,GaussianBlur,Sobel等)位于 cudafilters
模块中: https://github.com/Itseez/opencv/blob/master/modules/cudafilters/include/opencv2/cudafilters.hpp
新API使用基于Algorthim的方法:
cv :: Ptr< cv :: cuda :: Filter& filter = cv :: cuda :: createGaussianFilter(src.type(),dst.type(),ksize,sigma);
filter-> apply(src,dst);
新方法有助于减少内部缓冲区的内存分配并减少过滤器初始化阶段的开销。 p>
I understood that in OpenCV 3.0 the module GPU has been replaced by module CUDA, or better it has been split into several modules.
So cv::gpu::GpuMat
has been replaced by cv::cuda::GpuMat
, fine.
But what about the functions?
Where for example have the following moved to:
cv::gpu::GaussianBlurr ?
cv::gpu::Stream stream;
stream.enqueueConvert(...)
Apparently they are not under cuda module (eg. no cv::cuda::GaussianBlurr
). Where can this functionality be found in OpenCV 3.0?
All CUDA-accelerated filters (Blur, GaussianBlur, Sobel, etc.) are located in cudafilters
module: https://github.com/Itseez/opencv/blob/master/modules/cudafilters/include/opencv2/cudafilters.hpp
New API uses Algorthim-base approach:
cv::Ptr<cv::cuda::Filter> filter = cv::cuda::createGaussianFilter(src.type(), dst.type(), ksize, sigma);
filter->apply(src, dst);
The new approach helps to reduce memory allocations for internal buffers and reduce overhead from filter initialization stage.
这篇关于OpenCV 3.0上的GPU功能在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!