Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relation between sigma and radius on the Gaussian blur

I have seen the following relation between sigma and the radius in a gaussian blur (from http://en.wikipedia.org/wiki/Talk%3AGaussian_blur#Radius_again and also from the implementation of some programs, for example http://imagej.nih.gov/ij/source/ij/plugin/filter/GaussianBlur.java line 526)

$$ r = \sigma \sqrt{2 log 255} - 1$$

Where does this relation come from? (I think the 255 has to do with the precision (255 = 2^8-1 => 8 bits images)

like image 774
José D. Avatar asked Feb 24 '14 10:02

José D.


1 Answers

When using a gaussian kernel with sigma as it's parameter you actually using: enter image description here

Now, the minimum value quantized is 1(gray level), the gaussian tail beyond it is irrelevant. Our goal is to stop before we reach the edge of one gray level, let us denote this edge as r, and the we get to solve: enter image description here

the +1 is because we want the radius to be non-inclusive. taking log of the above, and reordering gives us: enter image description here

Which is what you searched for.

like image 183
Mercury Avatar answered Sep 30 '22 04:09

Mercury