I'd like to know what the parameters for the two-dimensional gaussian distributions are, which create this (I think) quite common image-processing filter: $$ h_\sigma(x,y)= \left[ \matrix { 1&2&1\\ 2&4&2\\ 1&2&1 } \right] $$ The two-dimensional gaussian equation looks like: $h_\sigma(x,y)= A\cdot e^{-\frac{x^2+y^2}{2\sigma^2}}$, where $A = \frac{1}{{2\pi}\sigma^2}$, but I think $A$ is not important as it is only a factor, isn't it?
With $\sigma=1$ I get: $$h_{\sigma=1}(x,y)= \left[ \matrix { h(-1,-1)=0.3679&h(0,-1)=0.6065&h(1,-1)=0.3679\\ h(-1,0)=0.6065&h(0,0)=1.0&h(1,0)=0.6065\\ h(-1,1)=0.3679&h(0,1)=0.6065&h(1,1)=0.3679 } \right] $$ As you see, I think the entries in the filter-matrix correspond to sampling values of the gaussian function from [-1|-1] to [1|1]. I hope that is at least right.
Multiplied $h_{\sigma=1}(x,y)$ with $4$, and then rounded gives me my desired filter, but I don't think that is the correct way, is it?
$$\mbox{round}(4\cdot h_{\sigma=1}(x,y))= \mbox{round}(4\cdot \left[ \matrix { 0.3679&0.6065&0.3679\\ 0.6065&1.0&0.6065\\ 0.3679&0.6065&0.3679 } \right] )= $$ $$ h_{\sigma=1}(x,y)= \mbox{round}( \left[ \matrix { 1.4716&2.4260&1.4716\\ 2.4260&4.0&2.4260\\ 1.4716&2.4260&1.4716 } \right] )= $$ $$ \left[ \matrix { 1&2&1\\ 2&4&2\\ 1&2&1 } \right] =h_\sigma(x,y) $$
There must be a better solution, or mathematical explanation for creating that matrix? I especially dislike the rounding operation, as the values are all close to $.5$ and not to $.0$ which should results in a huge error...
My question in other words: How do I determine the filter from scratch...