# Parameters of Gaussian Kernel in the Context of Image Convolution

Hi Everyone i am new at image processing. I copy code from this website, I have image $600 \times 480$ gray scale.

• What will be the value of standard deviation or $\sigma$?
• What will be the value of radius?
• What will be the size of kernel?

After I get the kernel how can I use the convolution method? Can use the same like in this website? I know its lot to ask.

When dealing with Gaussian Blur in the Image Processing context the following holds:

• The Standard Deviation, $\sigma$, is sometimes called radius. I think this goes back to Photoshop.
• If you implement this using FIR Filter (Well, Gaussian Kernel is infinite so you approximate it) usually the radius of the filter will be something like ceil(4 * kernelStd). This is because the Kernel almost vanishes after $4 \sigma$.

Some in practice remarks:

• The Gaussian Kernel is Separable hence if implemented as FIR filter it is implemented as 2 1D Convolutions - Along rows and along columns. You may have a look at the Image Convolution GitHub Repository for efficient C Code.
• There are many other way to approximate the Gaussian Blur which are much faster (Though sometimes there is accuracy vs. speed balance, most of the time negligible). You may have a look at Fast Gaussian Blur GitHub Repository for IIR and Box Blur implementations which are insensitive to the radius parameter.

The value of "standard deviation" (SD) defines how much blurring is going to happen, larger SD means more blur.

You also need a larger kernel to encompass larger SDs - it needs to be big enough that the values at the edges of the kernel are "very small". You'll have to experiment with your particular application to decide how to define "very small".

Once you have your kernel, applying it is a standard convolution process, as you said. There are many many places to read about 2d convolution - I quite like this book: http://www.dspguide.com/pdfbook.htm

• I do not understand the part. for 1024 * 768 image size i choose which size of kernel? What mean SDs? – Alex Cerry May 11 '17 at 6:53
• Sorry, SD is an abbreviation for "standard deviation". The image size has no influence over the kernel size – Martin Thompson May 11 '17 at 12:46