Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are the GPU functions on OpenCV 3.0?

Tags:

c++

opencv

cuda

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?

like image 777
mattobob Avatar asked Nov 13 '14 12:11

mattobob


1 Answers

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.

like image 134
jet47 Avatar answered Oct 13 '22 21:10

jet47