To smooth my data, I use gaussian function to convolve with my data in MATLAB. But there's a detail which can't be ignored. For instance, my original data is "DATA",the smoothed data is "SM_DATA", a simple matlab code will be:
gauss=gausswin(100);
gauss_normalize=gauss/sum(gauss);
SM_DATA=conv(DATA,gauss,'same');
The image will be like this:
However, if I delete the 2nd line "gauss_normalize=gauss/sum(gauss);" the image will have very strong DC, see
Can anybody help to explain why I should use gauss_normalize to do convolution using plain but professional language? Also, it isn't a typical normalization, right? because a typical normalization would divide by the maximum value rather than the sum of the series so that the data is from 0 to 1.


1and you apply the kernel, you expect to be all1. To make sure that happens, you need to make sure that the kernel, when applied to data of all1, returns1. The straightforward way of doing it is normalizing the kernel. - Ander Biguri