Summary: | Unsharp mask with radius less than 1.0 burns images | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Tap |
Component: | Plugin-Editor-Sharpen | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles, droebbel.melta |
Priority: | NOR | ||
Version: | 2.4.1 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/digikam/9454b520434618f0f323960d3aece2af9cbe9ef7 | Version Fixed In: | 4.3.0 |
Attachments: |
Image before sharpening
Image after unsharp mask in digiKam 2.4.1, radius 0.3, amount 0.8, threshold 0 Image after unsharp mask in GIMP 2.6.11, radius 0.3, amount 0.8, threshold 0 |
Description
Tap
2012-01-02 21:10:36 UTC
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 |