In some implementations of the Canny operator, the following two-dimensional function is used instead of the usual two-dimensional Gauss function:

enter image description here

That is, it turns out that only its part with the exponent is taken from the Gauss function. Also in the original Canny manuscript such a function was used, but on the Internet there are quite a lot of implementations and articles (including on Habré and in good books) with full function.

Question : what function will be the right to use and what, in fact, the difference between their use?

PS I noticed that when using the usual Gauss function, the image of the magnitude of the gradient of the vector is strongly darkened and the contours are almost not distinguished. And with the other, everything is fine.

  • I do not understand, but put a plus)) - Nick Volynkin
  • Can you clarify the details of the question? What answer do you want? What programming language? - Suvitruf
  • @Suvitruf, programming language does not matter. What answer do I want? I would like to know what is happening (in a good way) in the heads of people who use the standard two-dimensional Gauss function instead of the one in the picture in the Canny Operator algorithm. And then, really, I get lost: on some authoritative sources one function is used, on very few others and in the original manuscript another one. - GenElCon
  • 2
    The answer was found: "It’s not a problem." It seems to me that it was the normalization factor. A convolution with the un-scaled gaussian will be in proportion with the normalized gaussian. - GenElCon
  • 2
    The difference will be in mathematical precision, which can lead to a change in the gradient in the drawing, as you wrote. You would not ask this question if you understood how this function works from a mathematical approach, and then applied it correctly. By the way there will be a very small difference in values. - Shwarz Andrei

1 answer 1

The variant you presented is a two-dimensional Gauss distribution function. Two-dimensional Gaussian distribution function ,

for which it is assumed that the distribution functions in x and y are equal, and the integral of the function is 1. That is, the distribution coefficient σx = σy and normalized with respect to 1/sqrt(2*pi) .