I write my own gaussian filter but it is really slow.
OpenCV’s Gaussian algorithm is much faster, 20 times than my gaussian filter.
I want to rewrite OpenCV’s Gaussian algorithm in my project, and I don’t want to include opencv in my project.
However,
Can anyone give me the algorithm description, opencv’s source code
seems too hard to understand?
The Gaussian filter has a property that makes it very easy to speed up: the filter can be applied in both dimensions independently. You define a one-dimensional filter that operates vertically, and another that operates horizontally, and apply them both; this produces the same effect as a single filter applied in two dimensions.
Beyond that, you’ll probably need to look at the SIMD instructions e.g. SSE3 available for your processor.