[Digikam-devel] [digikam] [Bug 342513] New: [PATCH] Add support for fractional radius in blur and unsharp mask filters

pochini at shiny.it pochini at shiny.it
Mon Jan 5 14:13:35 GMT 2015


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

            Bug ID: 342513
           Summary: [PATCH] Add support for fractional radius in blur and
                    unsharp mask filters
           Product: digikam
           Version: 4.5.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: Image Editor
          Assignee: digikam-devel at kde.org
          Reporter: pochini at shiny.it

Currently the blur filter accepts and interger value for the radius parameter.
This unfortunate because it does not allow the user to blur an image slightly.
The blur filter is also used by the unsharp mask filter, so it has the same
problem, too.
The attached patch adds support for fractional radius to the blur filter and,
consequently, to the unsharp mask filter.
Just like the current version the blur kernel is a square. I was about to write
a generic convolution filter, but it would have resulted in a much slower code
for (probably) only a small advantage in quality.

* NOTES:
- Beta and RFC: please ignore debug code.
- It's slower than the current version.
- The effective radius is d->radius/10, which I don't like a lot. I'd prefer to
make d->radius a float and to make the code pass the actual radius in place of
10*r. Both the blur and umask GUI code have to be changed.
- 8-bits images are converted to 16 bits in order to avoid rounding issues.

* Known bugs:
- It does not take into account sRGB colorspace non-linearity (e.g.: averaging
a black (0) and white (255) pixel should result in a middle gray (187) value,
but it returns 127 instead).
- The approximation bug of the radius value has yet to be addressed (sometimes
1.0 is passed as 9). It's actually a GUI bug and I'll file another report
later.


Reproducible: Always

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



More information about the Digikam-devel mailing list