How do i do a gaussi smoothing in the 3th dimension?
I have this detection pyramid, votes accumulated at four scales. Objects are found at each peak.

I already smoothed each of them in 2d, and reading in my papers that i need to filter the third dimension with a \sigma = 1, which i havent tried before, i am not even sure what it means.
I Figured out how to do it in Matlab, and need something simular in opencv/c++.
Matlab Raw Values:

Matlab Smoothen with M0 = smooth3(M0,’gaussian’); :

Long ago (in 2008-2009) I have developed a small C++ template lib to apply some simple transformations and convolution filters. The library’s source can be found in the Linderdaum Engine – it has nothing to do with the rest of the engine and does not use any of the engine’s features. The license is MIT, so do whatever you want with it.
Take a look into the Linderdaum’s source code (http://www.linderdaum.com) at Src/Linderdaum/Images/VolumeLib.*
The function to prepare the kernel is PrepareGaussianFilter() and MakeScalarVolumeConvolution() applies the filter. It is easy to adapt the library for the different data sources because the I/O is implemented using callback functions.