[Digikam-devel] [Bug 290442] Unsharp mask with radius less than 1.0 burns images

Marcel Wiesweg marcel.wiesweg at gmx.de
Mon May 21 17:35:28 BST 2012


https://bugs.kde.org/show_bug.cgi?id=290442

Marcel Wiesweg <marcel.wiesweg at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #5 from Marcel Wiesweg <marcel.wiesweg at gmx.de> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list