Question

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)

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top