![](https://secure.gravatar.com/avatar/aa47598f9ea6538a36947943ec71b1cd.jpg?s=120&d=mm&r=g)
Hi. I think I found a bug in gaussian_filter1d. roughly the function creates a 1d kernel and then calls correlate1d. The problem I see is that the kernel should be mirrored prior to calling correlate1d since we want to convolve, not correlate. as a result: the sign of coefficients) Or did I get that wrong? alex.
![](https://secure.gravatar.com/avatar/ba366a43ea0322ddb4cf2462f8ad2596.jpg?s=120&d=mm&r=g)
I think you are correct: The result of a gaussian filter of order one should be a derivative operator. Thus the response to an array created with arange() should be close to one (barring edge effects). Currently we have:
So the sign is wrong, that can be fixed by mirroring the gaussian kernels. I have done so in CVS. The same holds true for the Sobel and Prewitt filters, they were also defined 'incorrectly' according to this criterion. I also changed those. That may be a bit more controversial since a quick look on the web seemed to indicate that often it is defined the other around. If anybody thinks my changes are no good, please let me know. Cheers, Peter On 22 Sep, 2005, at 17:41, Alexandre Guimond wrote:
![](https://secure.gravatar.com/avatar/ba366a43ea0322ddb4cf2462f8ad2596.jpg?s=120&d=mm&r=g)
I think you are correct: The result of a gaussian filter of order one should be a derivative operator. Thus the response to an array created with arange() should be close to one (barring edge effects). Currently we have:
So the sign is wrong, that can be fixed by mirroring the gaussian kernels. I have done so in CVS. The same holds true for the Sobel and Prewitt filters, they were also defined 'incorrectly' according to this criterion. I also changed those. That may be a bit more controversial since a quick look on the web seemed to indicate that often it is defined the other around. If anybody thinks my changes are no good, please let me know. Cheers, Peter On 22 Sep, 2005, at 17:41, Alexandre Guimond wrote:
participants (2)
-
Alexandre Guimond
-
Peter Verveer