[Digikam-devel] [Bug 148540] Improvements of adding noise tool

Gilles Caulier caulier.gilles at gmail.com
Wed Mar 24 11:43:55 GMT 2010


--- Comment #53 from Gilles Caulier <caulier gilles gmail com>  2010-03-24 12:43:38 ---

I find the problem. It due to a missing clamp of RGB values computed from YUV
values during YCbCr to RGB color space conversion. All work fine now on my
computers with all photo type (low-key and high-key image included). I will
commit the code today and remove all method to randomize hue, which has not a
sence in photo.

Now about graininess size, i'm not agree with you. If you compute grain in a
separate mask and merge it with original image, you will reproduce the lead
problem of original implementation which decrease lightness of image. Do you
remember ? For details, look how code work in the pass here :


... especially at line 175 and after...

We must still to apply grain to change color channel directly in YUV color

So the solution to change graininess size is to decompose image using a matrix
of points, and to work on these points to take a care of pixels neighbor.
Increasing matrix size will increase graininess size. You scan whole image
using matrix size as step. I see this technic apply in VirtualDub "Add Noise"
plugin available here :



Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the Digikam-devel mailing list