Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (anonymous):

How does one calculate the entries for a 3x3 2D Gauss-filter?

OpenStudy (anonymous):

given formula: \[g(x,y)=1/2πσ^2∗e^{−(x^2+y^2)/2σ^2 }\], how does one calculate the entries so that they are like the following: |dw:1359657074878:dw|

OpenStudy (anonymous):

It's for my Image Processing course (computer science).

OpenStudy (konradzuse):

sorry, just looked it up... Looks interesting. So you want to solve the matrix?

OpenStudy (konradzuse):

I'm not really sure what it all means completely. I know you can set up that matrix for x,y, and even z(doesn't seem needed)? not too sure what σ is for... if you are doing matrix multiplication you can do 1/16 * every entry.

OpenStudy (anonymous):

Maybe I should restate my question: I am given the 2D Gauss function (see equation above), the question is: what are the values in a 3x3 Gauss filter. I found the above matrix in one of the slides but have no clue how they came up with that from the Gauss equation.

OpenStudy (konradzuse):

checking the web quickly, and normal assumptions would say it's a random eq....

OpenStudy (konradzuse):

oic σ is standard dev hmm....

OpenStudy (anonymous):

yes, take for example \[\sigma = 1\]

OpenStudy (konradzuse):

I would check out this site. http://homepages.inf.ed.ac.uk/rbf/HIPR2/kernel.htm http://homepages.inf.ed.ac.uk/rbf/HIPR2/gsmooth.htm I found it interesting, however I don't want to do your work for you, and I have some of my own work to do... interesting learn tho.

OpenStudy (anonymous):

thx for the help ;)

OpenStudy (konradzuse):

:D np, goodluck! I'm not too sure what you have learned, but that first link about "kernal" shows the matrix, to which they talk about it a lot in the second link. It seems to be what you need, so only you will know :).

OpenStudy (anonymous):

Some observations from your image and from Figure 3 in KonradZuse's second link: it appears the highest number is always in the centre. That the (x,y) combination for which the exponent is largest (which is (0,0), but please check that yourself). Going further from that and the fact that the exponent is symmetric (because of x^2+y^2), I'd say that your kernel is built up like this: \[\left|\begin{matrix}g(-1,-1) & g(-1,0) & g(-1,1) \\ g(0,-1) & g(0,0) & g(0,1) \\ g(1,-1) & g(1,0) & g(1,1)\end{matrix}\right| = \left|\begin{matrix}g(1,1) & g(1,0) & g(1,1) \\ g(1,0) & g(0,0) & g(1,0) \\ g(1,1) & g(1,0) & g(1,1)\end{matrix}\right|\] Some quick testing shows that this is correct, apart from some rounding errors. Now, how do you get the entries in the kernel you gave? It's by chaning sigma, but what value does sigma have there? Start with the middle. g(0,0) should have a value of 4/16 = 1/4. Since the exponent equals 1, we know that: \[\frac{1}{2\pi\sigma^2} = \frac{1}{4}\] \[2\pi\sigma^2= 4 \] \[\sigma^2= \frac{4}{2\pi} \] For this sigma, g(1,1) = 0.832 / 16, g(1,0) = 1.824 / 16, g(0,0) = 4 / 16, which, if you round the fractions to the nearest integers, give the kernel you gave.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!