0
votes

I implement my own gaussian filter by C++ and neon.

Pseudo codeļ¼š

oneDimensionBlur(src, temp1, width, height)    //implement by C++
transposeMatrix(temp1, temp2, width, height)   //implement by neon
oneDimensionBlur(temp2, temp1, height, width)
transposeMatrix(temp1, dst, height, width)

But the cv::GaussianBlur() is almost 8 times faster than my implementation! I almost desperate for the profiling result. So I want to ask if opencv use any acceleration technology on gaussian blur? I try to track the opencv source code but failed.

1

1 Answers

0
votes

OpenCV can definetly use parallelism techniques for accelerating cv::GaussianBlur. Look here for its implementation. As you can see, there are in that file at least 3 parallelized versions of the function, using OpenCL, IPP or OpenVX.

There is some functionality to disable optimizations, such as setUseOptimized or setUseOpenCL. See functions at the bottom of this page for more ways to control the multithreading.

In the end, it might be the easier to build OpenCV from source, disable all things like OpenCL, and run it on a single thread (use setNumThreads).