Ask Your Question

darioc85's profile - activity

2020-04-30 10:49:51 -0600 received badge  Notable Question (source)
2019-12-11 22:32:00 -0600 received badge  Popular Question (source)
2018-07-15 14:15:40 -0600 marked best answer CUDA and OpenCV performance

Hello,

I have a quite big project with several image processing parts implemented with OpenCV 3. In general, I am noticing that the CPU seems to be faster in terms of speed then the part programmed with cv::cuda functions. For example, considering the two portions of code:

    cv::GaussianBlur( image, image, cv::Size(3,3), 0,0);

and

cv::cuda::GpuMat cuda_image;
cuda_image.upload(image);
cv::Ptr<cv::cuda::Filter> filter = cv::cuda::createGaussianFilter(cuda_image.type(),
     cuda_image.type(), cv::Size(3,3), 0, 0);
filter->apply(cuda_image, cuda_image);
image = cv::Mat(cuda_image);

it happens that the second one is much slower. Please note that I put this portion in a long loop before taking average time (ignoring the first iteration, even slower).

I understand that in this particular case the overhead in communication could be bigger than the effective computation time (image in this example is 1280X720), but it happens, in general, for each function cv::cuda that I use, even things like solvePnPRansac that does not process directly images. Note that I tested the solution in a workstation with Quadro M1200 (with a powerful CPU), but the same occurs with a Tegra TX2, where CPU capabilities are very limited. Until now, the big improvement has been obtained by using OpenMP (of course, mostly on the workstation).

Considering these results, I am having some doubt about how OpenCV compiled with CUDA support works. Could it be possible that since I compiled OpenCV with CUDA support, calling methods like cv::GaussianBlur automatically imply calling the GPU, in a more efficient way than my second portion of code posted? In this case, which are the guidelines and best practices? Or should I consider this just an overhead problem?

Thank you

2018-07-15 14:15:40 -0600 received badge  Scholar (source)
2018-07-12 02:23:27 -0600 commented question CUDA and OpenCV performance

Yes, it would be great to receive such information. An automatic call to OpenCL or CUDA implementation in that case woul

2018-07-11 03:57:56 -0600 commented question CUDA and OpenCV performance

I understand, it is as I suspected. Unfortunately many other operations are not concerning pure image processing. Focusi

2018-07-11 03:57:17 -0600 commented question CUDA and OpenCV performance

I understand, it is as I suspected. Unfortunately many other operations are not concerning pure image processing. Focusi

2018-07-11 03:56:25 -0600 commented question CUDA and OpenCV performance

I understand, it is as I suspected. Unfortunately many other operation are not concerning pure image processing. About i

2018-07-11 03:25:06 -0600 answered a question KNN OCR Confidence

Hi, if the numbers are 0,1,..., 9, what do you think about considering the number of digits detected with the rectangl

2018-07-11 03:16:42 -0600 answered a question [problem]:Using OpenCV with gcc and CMake

It seems like a linker problem. Do you see OpenCV if you do pkg-config --libs opencv ? Moreover, you are on VirtualEnv o

2018-07-11 03:10:26 -0600 edited question CUDA and OpenCV performance

CUDA and OpenCV performance Hello, I have a quite big project with several image processing parts implemented with Open

2018-07-11 03:10:14 -0600 received badge  Editor (source)
2018-07-11 03:10:14 -0600 edited question CUDA and OpenCV performance

CUDA and OpenCV performance Hello, I have a quite big project with several image processing parts implemented with Open

2018-07-11 03:04:41 -0600 asked a question CUDA and OpenCV performance

CUDA and OpenCV performance Hello, I have a quite big project with several image processing parts implemented with Open

2018-06-29 11:10:11 -0600 received badge  Enthusiast
2018-06-28 14:35:21 -0600 asked a question cv::cuda::solvePnPRansac VS cv::solvePnPRansac

cv::cuda::solvePnPRansac VS cv::solvePnPRansac Hi, I have a doubt about the different results that cv::solvePnPRansac a

2018-06-24 10:57:12 -0600 answered a question cv::goodFeaturesToTrack on a contour

I still have to manually use an algorithm to find, for each corner output of goodFeaturesToTrack, the closest point on t

2018-02-01 09:53:36 -0600 commented question cv::goodFeaturesToTrack on a contour

Yes, but considering the small size of the objects (few blobs representing chars in a page), I am not having any problem

2018-02-01 09:53:27 -0600 commented question cv::goodFeaturesToTrack on a contour

Yes, but considering the small size of the object (few blobs representing chars in a page), I am not having any problem

2018-02-01 09:23:35 -0600 answered a question Adaptive parameter for Canny Edge

Hi, try with this code: https://github.com/eokeeffe/AutoCanny

2018-02-01 08:31:24 -0600 asked a question cv::goodFeaturesToTrack on a contour

cv::goodFeaturesToTrack on a contour Hi, I am trying to solve the following problem: given a contour found on a binary b