Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6742 Discussions

## IPP Gaussian function

Beginner
753 Views

I'm trying to implement C version of  function as 1D convolution filters. With the help of Intel IPP document, I got to know the 5x5 2D kernel coefficients with sigma/standard deviation used for this function is

2/571 7/571 12/571 7/571 2/571
7/571 31/571 52/571 31/571 7/571
12/571 52/571 127/571 52/571 12/571
7/571 31/571 52/571 31/571 7/571
2/571 7/571 12/571 7/571 2/571

I tried generating and using various 1D kernel coefficients with same sigma (1.0) value. But still the outputs are differing. I would like to know the 1D kernel coefficients for the above 2D kernel.

Please let me know how to generate it.

2 Replies
Employee
753 Views

Hi Sujitha,

you can use Matlab for this purpose, or calculate coefficients manually:

sigma = 1;
sz = 5;    % length of gaussian Filter vector
x = linspace(-sz / 2, sz / 2, sz);
gFilter = exp(-x .^ 2 / (2 * sigma ^ 2));
gFilter = gFilter / sum (gFilter); % normalization

regards, Igor

Beginner
753 Views

Thanks Igor.

I could generate 1D kernel coefficients for gaussian with the above formula and it matches with ippi output. But in the ippi doc, the formula to generate 1D gaussian seperable filter kernel looks different.