Version: 2.4.1 (using KDE 4.5.5) OS: Linux When I try to use a radius less than 1 with the Unsharp mask method in the digiKam Image Editor, the image becomes noticeably brighter and shows channel clipping in bright areas. I do not know the math involved but the GIMP does not share this behavior -- it simply sharpens the image as requested. I am using digiKam 2.4.1 but this bug was also evident in 1.9.0. Reproducible: Always Steps to Reproduce: 1. Select an image in the lighttable and press F4 to open the Image Editor 2. Go to Enhance > Sharpen... 3. Set the following parameters, for example: radius 0.3 amount 0.8 threshold 0.00 4. Click OK and compare the before and after images. Actual Results: The image becomes noticeably brighter. Expected Results: The image should become sharper on a fine scale, but not noticeably brighter. OS: Linux (i686) release 2.6.32.41-smp Compiler: gcc
Created attachment 67358 [details] Image before sharpening
Created attachment 67359 [details] Image after unsharp mask in digiKam 2.4.1, radius 0.3, amount 0.8, threshold 0
Created attachment 67360 [details] Image after unsharp mask in GIMP 2.6.11, radius 0.3, amount 0.8, threshold 0
*** Bug 225491 has been marked as a duplicate of this bug. ***
The bug applies for any radius < 1. Reason is simple: The settings allow to specify a Double, while the BlurFilter only takes an Int for radius, so radius<1 is rounded to 0, which (not unexpectedly) fails. The story goes beyond: We have two blur algorithms, a true Gaussian kernel and a much faster Canny-Deriche based blur from CImg, the latter used by default. CImg accepts a floating-point radius, our gaussian blur does not. The gimp implementation http://git.gnome.org/browse/gimp/plain/plug-ins/common/unsharp-mask.c?h=gimp-2-8 uses true gaussian blur for radius < 10, and has a gaussian blur which accepts floating-point radius. So a solution for this bug may entail - having a look at the Gaussian matrix creation in comparison to the Gimp code: use floating point radius? - define the blurring algorithm situation: currently it is decided based on platform issues. At should IMO be possible to request true Gaussian, and the algorithm should be stored in the FilterAction history - decide if we want true Gaussian blur for small radius as Gimp does, or if the Canny-deriche approximation is ok - fix the trivial double-to-int bug
Git commit 9454b520434618f0f323960d3aece2af9cbe9ef7 by Gilles Caulier. Committed on 02/09/2014 at 13:51. Pushed by cgilles into branch 'master'. do not permit null value with raduis parameter from UnsharpMask tool FIXED-IN: 4.3.0 M +1 -1 libs/dimg/filters/sharp/sharpsettings.cpp http://commits.kde.org/digikam/9454b520434618f0f323960d3aece2af9cbe9ef7