After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 306874 - Strange results of Laplace filter
Strange results of Laplace filter
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.2.x
Other All
: Normal normal
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-06-08 12:29 UTC by Jakub Friedl
Modified: 2008-01-15 12:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test image (3.98 KB, image/png)
2005-06-08 12:31 UTC, Jakub Friedl
Details
problematic result of Laplace (234 bytes, image/png)
2005-06-08 12:31 UTC, Jakub Friedl
Details

Description Jakub Friedl 2005-06-08 12:29:41 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:
Comment 1 Jakub Friedl 2005-06-08 12:31:03 UTC
Created attachment 47430 [details]
test image
Comment 2 Jakub Friedl 2005-06-08 12:31:42 UTC
Created attachment 47431 [details]
problematic result of Laplace
Comment 3 weskaggs 2005-06-08 18:14:39 UTC
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.

Comment 4 Sven Neumann 2005-06-09 16:46:59 UTC
It clearly looks like a bug to me.
Comment 5 weskaggs 2005-06-09 17:59:56 UTC
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.
Comment 6 weskaggs 2005-06-20 21:06:16 UTC
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?
Comment 7 weskaggs 2005-06-21 16:28:53 UTC
No complaints, so I'll call it FIXED.