GNOME Bugzilla – Bug 312800
Selective gaussian blur should be able to read delta and blur from different sources
Last modified: 2015-11-29 22:54:15 UTC
I really like the selective gaussian blur filter, and it would be really nice if one were able to specify a different source for reading the delta values than the layer being blurred. This would allow you, for example, to take two shots of a dark scene--one with flash, and one without--and smooth out the noise from the non-flash photo based on the less-noisy flash photo. See http://research.microsoft.com/projects/FlashNoFlash/ for lots more information on this technique (I'd also like to see the rest of the techniques in this paper implemented as filters or scripts)
A patch would very much improve the likelihood of these changes to happen.
Confirming this request and adding the gnome-love keyword. The change should be pretty much straight-forward and it could be a nice introduction to GIMP hacking. So if anyone wants to tackle this, let us know so that we can offer some advice.
Created attachment 54023 [details] [review] diff of my patch sven, as commented in the mail list I've been working around this bug for 3 days. it is my first patch for gimp so it would be normal to be miserable and full of errors. please tell me about any mistakes, that's why I chosed a gnome-love tagged bug. the preview update part is unfinished because I want to check the rest is good first. cheers, luis de bethencourt guimera
That patch looks nice actually (haven't tried it). Setting to 2.4 so it isn't forgotten.
Looks good to me as well (though I also haven't tried it). I think it is going to fail for noninteractive usage, though, because it still requires the number of arguments to be 5, even though delta_id is the sixth argument. Actually, for backwards compatibility with any existing scripts that might use this plug-in, it would be best if the plug-in worked with either 5 or 6 arguments, setting delta_id equal to drawable_id if there are only 5.
This doesn't seem to be working for me. When I hit "okay", I get (sel_gauss:29177): LibGimp-CRITICAL **: gimp_pixel_rgn_init: assertion `drawable != NULL' failed (sel_gauss:29177): LibGimp-CRITICAL **: gimp_pixel_rgn_get_rect: assertion `y >= 0 && y + height <= pr->drawable->height' failed and the whole image comes out equally blurred. Also I think it would be good if the default (the thing that appears the first time the plug-in is used) is to use the layer that is being blurred as the delta layer.
Bumping target to Future because this is not a blocker for 2.4.
Created attachment 203589 [details] [review] intermediate patch. mmx to be done.
Sorry I missed commenting on the patch when uploading. -- This looks like long overdue. I took the patch given earlier by Luis de* and made the changes suggested above along with code for updating preview. Attaching the patch. This currently does not work on mmx since we totally ignore the delta layer when calling mmx routine. Working on mmx code changes... --
Created attachment 203892 [details] [review] Final patch mmx code also uses the delta layer now. - KayT(watashi) Looks like I can't change my nick.
Very nice, any volunteers to check this patch? Setting milestone to 2.10.
Just checked ! Works as expected, very nice job !
Mitch, just saw this old bug laying around. This patch obviously does not use GEGL at all, but I see that the selective gaussian blur filter has not been ported at all yet anyway. Would it make sense to test and push this patch if it works well and indeed improve the filter? This way, when someone will port the filter to GEGL, they will work from an improved version at least. Unless someone would make the operation from scratch, but I guess that's good to have an old-style base as reference.
Comment on attachment 203892 [details] [review] Final patch This patch is now obsolete because the plug-in has been replaced by a GEGL op in master.
Thomas Manni wrote a GEGL op to replace this plug-in, these commits add it to GIMP: commit 16a042189407125bab5d0c0a67b5efbe373774a3 Author: Michael Natterer <mitch@gimp.org> Date: Sun Nov 29 22:01:53 2015 +0100 plug-ins, pdb: remove the blur-gauss-selective plug-in, add a PDB compat proc commit 71e566fde7fc946cf2c690a65a81d20126fe5362 Author: Michael Natterer <mitch@gimp.org> Date: Thu Nov 26 11:20:44 2015 +0100 app: add gegl:gaussian-blur-selective to Filters -> Blur