I am looking for a fast C
(or C++
) code that does 3D convolution with small kernels. What I have found online so far are based on FFT
and require the use of other libraries. However, as pointed out by many, these FFT
-based convolution codes are not suitable for small kernels (in my case they are mainly 3×3×3
or 5×5×5
). Is there a C/C++
code that directly implements 3D convolution algorithm? I can implement a 3D convolution in a code according to its definition. However, what I write will not be the most efficient and fast implementation. I am actually looking for a code that has been verified in this aspect.
Asked
Active
Viewed 1,660 times
0

afp_2008
- 1,940
- 1
- 19
- 46
-
Convolution is just multiplying and adding. What's the problem? – Oliver Charlesworth Nov 20 '14 at 09:02
-
1Not sure if it is what you are looking for. http://www.programming-techniques.com/2013/02/calculating-convolution-of-image-with-c_2.html – SSC Nov 20 '14 at 09:02
-
@OliverCharlesworth: I know how to implement a 3D convolution. For sure, what I write is not the most efficient and fast implementation. I am actually looking for a code that has been verified in this aspect. – afp_2008 Nov 20 '14 at 09:05
-
@A2009 that is so vague to me ... define target complexity instead so we are clear what you want. Something faster then `O(N^3)` perhaps? where `N` is the size of square array? from your duplicate question is `N` around `200`. btw do not make duplicate questions instead improve the current ones. PS for FFT you do not need a lib you can code it yourself it is not that hard – Spektre Nov 21 '14 at 12:07
-
@A2009 here another almost the same question http://stackoverflow.com/q/20554666/2521214 – Spektre Nov 21 '14 at 12:11