title: Implementing Gaussian Blur - How to calculate convolution matrix (kernel)
body: <p>My question is very close to this question: <a href="https://stackoverflow.com/questions/1696113/how-do-i-gaussian-blur-an-image-without-using-any-in-built-gaussian-functions">How do I gaussian blur an image without using any in-built gaussian functions?</a></p>
  
  <p>The answer to this question is very good, but it doesn't give an example of actually calculating a real Gaussian filter kernel. The answer gives an arbitrary kernel and shows how to apply the filter using that kernel but not how to calculate a real kernel itself. I am trying to implement a Gaussian blur in C++ or Matlab from scratch, so I need to know how to calculate the kernel from scratch.</p>
  
  <p>I'd appreciate it if someone could calculate a real Gaussian filter kernel using any small example image matrix.</p>