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 623850 - Colors -> Retinex creates halos
Colors -> Retinex creates halos
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.6.9
Other All
: Normal major
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2010-07-08 15:47 UTC by Francisco Jimenez
Modified: 2010-09-16 19:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Retinex results (744.47 KB, application/x-compressed-tar)
2010-07-08 15:47 UTC, Francisco Jimenez
  Details
Proposed patch (696 bytes, patch)
2010-07-10 10:14 UTC, Massimo
committed Details | Review

Description Francisco Jimenez 2010-07-08 15:47:46 UTC
Created attachment 165490 [details]
Retinex results

The current implementation of the Retinex plugin is not working properly when the Guassian Filter is applied. It seems that the filter shifts three columns the whole image and when the difference between original image and filtered image is computed then a halo appears in the rigth side of every object in the image.

We proposed in first place shift three columns to the left when the difference is computed, but it still without working well when hight values in the 'Scale division' params are used. A clever solution was using another version of Gaussian filter and it seems it is working much better. Our implementation at this moment it is written in java using the ImageJ API.

We attach some pictures to illustrate the bug.

Best Wishes.
Francisco J.

Acknowledgment: Gabriel Landini, School of Dentistry, University of Birmingham
Comment 1 Massimo 2010-07-10 10:14:49 UTC
Created attachment 165616 [details] [review]
Proposed patch

You are right. In function gausssmooth the forward pass
computes its intermediate values in w1 from 3 to size + 3

In the backward pass w2 is correctly padded with w1[size+3],
but in the loop are used the elements of w1 decreasing from 
size to 0.


The attached patch should fix the problem.
Comment 2 Sven Neumann 2010-07-10 19:37:02 UTC
Please specify what version(s) you are seeing this problem with.
Comment 3 Francisco Jimenez 2010-07-14 00:40:39 UTC
(In reply to comment #2)
> Please specify what version(s) you are seeing this problem with.

Hello, the version I'm using now is 2.6.9 for Windows but I've seen this bug in Linux versions too e.g. 2.6.6.
Comment 4 Martin Nordholts 2010-09-16 17:48:01 UTC
Well, I can confirm that the ugly halos are removed with the patch, and your reasoning seems reasonable Massimo, and you usually know what you're doing, so I've commited the patch to master and gimp-2-6:

commit 2643107912f4ca078c77640dc42875f5edb0ad56
Author: Massimo Valentini <sixtysix@inwind.it>
Date:   Thu Sep 16 19:47:37 2010 +0200

    Bug 623850 - (Paco) Recursive Gaussian Filter error
Comment 5 Martin Nordholts 2010-09-16 17:55:56 UTC
Adjusting bug title, better late than never...
Comment 6 Martin Nordholts 2010-09-16 18:12:17 UTC
Review of attachment 165616 [details] [review]:

committed
Comment 7 Francisco Jimenez 2010-09-16 19:21:54 UTC
The patch works perfectly for me in both Linux and Windows versions.

Thanks to Massimo and Martin N.