From: fdfs tank on
and one more small question: what is the Gaussian Kernel (sigma) of this function? is it equivalent to the window width?
From: ImageAnalyst on
fdfs tank:
I cast it to int16 so that I could divide it by 2 and not get a
fractional number of elements for the half-window width. When you
slide a window along another array, the resulting array will of course
be longer. It will be longer than the "big" vector by the length of
the sliding window. This is called the "edge effect" or "boundary
effect" where the window is just starting to creep into the vector but
is not totally overlapping it yet. This will occur a half-window's
width into the resulting vector. I didn't take just half the entire
output. I just skipped the half-width of the sliding window where it
was only partially overlapping the main vector at the beginning and
end of the resulting vector - basically just cropped out the edge
effects.

The window width and the "spread" of the Gaussian are independent of
each other. You can set up whatever window width you want, and
calculate a Gaussian with whatever variance you want inside that. I
simple used guasswin() because it was a convenient built-in function,
but you could of course make one up yourself.
-ImageAnalyst