GNOME Bugzilla – Bug 623850
Colors -> Retinex creates halos
Last modified: 2010-09-16 19:21:54 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
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.
Please specify what version(s) you are seeing this problem with.
(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.
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
Adjusting bug title, better late than never...
Review of attachment 165616 [details] [review]: committed
The patch works perfectly for me in both Linux and Windows versions. Thanks to Massimo and Martin N.