GNOME Bugzilla – Bug 306874
Strange results of Laplace filter
Last modified: 2008-01-15 12:55:39 UTC
Please describe the problem: for some images, Laplace produces artifacts Steps to reproduce: 1. run Laplace on the first attached image 2. you will get the second image, with strange dots 3. make any small stroke with the paintbrush anywhere in the first image and run Laplace again 4. only eges around the stroke are detected, strange dots are not produced Actual results: Expected results: probably shouldnt find any edges in the first image Does this happen every time? yes Other information:
Created attachment 47430 [details] test image
Created attachment 47431 [details] problematic result of Laplace
This is not a bug, I think, but rather a consequence of the fact that the Laplace filter normalizes its result. If you run an edge-detect filter on something that doesn't have any edges and then normalize the result, normalizing multiplies a small signal by a large factor and produces a result that is noisy. When you create a stroke, you are adding real edges to the image, so normalizing multiplies by a much smaller factor. To understand this better, you might try running the "Laplace" option of the "Edge" filter (which does not normalize), and then doing Layer->Colors->Auto->Normalize on the result. Playing around with the Difference of Gaussians filter, which has a preview and allows you to turn normalization on and off, might also be helpful. So I am inclined to resolve this as NOTABUG, bug will leave it open for the moment, on the grounds that somebody might say that normalization should be an explicit option for the filter, instead of happening silently.
It clearly looks like a bug to me.
Well, there are three things that could be done about it. (1) Remove the normalization. This would be trivial to do, but would of course alter the results of any scripts out in user-land that might use the plug-in. (2) Make the plug-in pop a dialog -- it now runs silently -- and ask whether to normalize. (3) Get rid of this plug-in, on the grounds that it is redundant because "edge" has a Laplace option that does nearly the same thing.
Okay, I changed the code in HEAD so that it no longer normalizes the result. I would argue that this sort of change (in code that is doing what it was designed to do) should not be made in the stable branch. 2005-06-20 Bill Skaggs <weskaggs@primate.ucdavis.edu> * plug-ins/common/laplace.c: don't normalize the result. Fixes bug #306874? Can this be considered FIXED now?
No complaints, so I'll call it FIXED.