get_2D_gaussian_mask - Constructs a 2D Gaussian mask
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
Output gaussian smoothing mask.
Number of elements per axis.
Standard deviation in bin units.
This routine constructs a 2D Gaussian mask, putting the result into *out_mpp.
If the size of the mask is odd, then the center of the Gaussian is in the
center of the mask. If it is even, the center is as though the mask was one
larger. For example, if your mask size is 6, then the center is the third
pixel, which is the same pixel as it it would be if the mask size was 5.
If you want a have a mask which contains most of the Gaussian (excluded
values are close to zero), then you need to make the mask size at least 6
times sigma. Regardless of the size and sigma, the mask is normalized so that
its sum 1.
If *out_vpp is NULL, then a vector of the appropriate size is created, if
it is the wrong size, then it is resized, and if it is the right size, the
storage is recycled.
NO_ERROR on success, and ERROR on failure, with an appropriate error
message being set.
It seems that the handling of even size masks is due to lazy programming.
We might consider making it so that values for the center pair of pixels
are the same, and the true center value is not represented as it is between
them in real valued coordinates.
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.