Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find width of (1D discrete) Gaussian Kernel for a certain sigma?

Is there a rule of thumb or mathematical equation that tells me how wide my (1D discrete) Gaussian Kernel should be for a certain sigma?

Lets say, I choose a sigma of 1.87, should my kernel be 5 values/steps/pixels wide, 7 oder rather 25 in order to perform standardized image smoothing? Thank you.

like image 921
Tom Avatar asked Nov 04 '22 00:11

Tom


1 Answers

Pick a threshold that you consider ignorable, like T = 0.01. Then solve exp(-x^2/(2s^2)) / sqrt(2pi s^2) < T:

|x| < s sqrt(-2 ln(sqrt(2pi s^2) T))

The right hand side gives you the width. For s = 1.87 and T = 0.01, this gives you a width of 4 pixels.

like image 158
ebsddd Avatar answered Dec 20 '22 02:12

ebsddd