Re: [Gimp-developer] Gimp from git Gegl Gaussian Blur and Unsharp Mask useability issues

I spent some time experimenting with 2.8 vs 2.9 and also with various slider values for gaussian blur and USM.

Comparing 2.8 radius and 2.9 gaussian blurs:

I made a test image composed of varying width black and white stripes and checked varying blur values (radius in 2.8, std. dev in 2.9) to see what the 2.9 equivalent (sd) was for various 2.8 blur radius (r) values. I used "difference" blend mode to gage which 2.9 blur values correspond to which 2.8 blur values.

Here's the results:

2.8     2.9     ratio
1r      0.55sd  1.82
2r      0.8sd   2.50
5r      1.7sd   2.94
20r     6.2sd   3.23
40r     12sd    3.33
100r    31sd    3.23
200r    61sd    3.28

Extrapolating, perhaps a 500r 2.8 blur would take a 155sd 2.9 blur. The Gegl Gaussian blur popup says "multiply by ~2 to get radius", but it seems that for all but the smallest values, "multiply by ~3" is closer to the equivalent Gimp 2.8 gaussian blur. Has the definition of "radius" changed? Or something in the GB algorithm?

Do you think the different values and slider labels required to get the same amount of blur (1r vs 0.55sd, 5r vs 1.7sd, etc) might cause a great deal of consternation when Gimp 2.10 is released? gives a nice comparison between Gimp (not from git), Photoshop, Corel Painter regarding the "unit" of blur, which apparently Photoshop uses the diameter and the other editors use the radius.

Very large gaussian blurs:

Quoting Wikipedia:

"Applying multiple, successive gaussian blurs to an image has the same effect as applying a single, larger gaussian blur, whose radius is the square root of the sum of the squares of the blur radii that were actually applied. For example, applying successive gaussian blurs with radii of 6 and 8 gives the same results as applying a single gaussian blur of radius 10."

So it's not too hard to hit whatever target gaussian blur one has in mind, either visually by repeated blurring or by calculating the right successive blur values to use.

As the gaussian blur radius/ gets large compared to the actual size of the image, edge and corner values necessarily start to dominate the result of the blur. Does anyone have a use case for a 6000-radius or even 2000-radius blur?

Slider values:

After some experimentation, these values seem to work nicely. Both sets of ranges allow for reasonably precise setting of low values with the sliders. Both sets of slider settings require that the user figure out that there really is an extended scale. I raised that last ui parameter from 1.5 to 3.0, to make the extended scale not be too long.

Unsharp Mask:

gegl_chant_double_ui (std_dev, _("Std. Dev."),
                      0.2, 200.0, 0.55, 0.2, 10.0, 3.0,
                      /* was 0.0, 500.0, 1.0, 0.0, 200.0, 1.5, */
                      _("Standard deviation (spatial scale factor)"))

gegl_chant_double_ui (scale, _("Scale"),
                      0.0, 200.0, 4.0, 0.0, 10.0, 3.0,
                      /* was 0.0, 500.0, 1.0, 0.0, 200.0, 1.5, */
                      _("Scale, strength of effect"))

* These ranges allow for very precise setting of low values, critical for photographic images. * On the std_dev slider there seems to be a dead spot below 0.2 on the slider, where no matter how high Scale is, nothing happens. So I set the minimum on the upper slider to 0.2. * I set the defaults to a mild (obvious but not over the top) sharpening, one goal being to let the user know that the two sliders really are independent of each other. * Is there an interest in creating two presets, one a mild but obvious sharpening and the other a mild but obvious local contrast enhance, so that new users would have them available as drop-down choices? It seems to me that with the radical change in the slider values/meanings, a couple of provided defaults would help users figure out where to start.

Gaussian blur:

gegl_chant_double_ui (std_dev_x, _("Size X"),
                      0.0, 1500.0, 1.5, 0.0, 100.0, 3.0,
                      /* was 0.0, 10000.0, 4.0, 0.0, 1000.0, 1.5, */
                      _("Standard deviation for the horizontal axis "
                        "(multiply by ~2 to get radius)"))

gegl_chant_double_ui (std_dev_y, _("Size Y"),
                      0.0, 1500.0, 1.5, 0.0, 100.0, 3.0,
                      /* was 0.0, 10000.0, 4.0, 0.0, 1000.0, 1.5, */
                      _("Standard deviation for the vertical axi. "
                        "(multiply by ~2 to get radius)"))

* The Gegl Gaussian blur slider range is the equivalent of 0 to roughly 300px radius plus 0 to roughly 4500px radius for the extended scale. * I changed the default setting to be a visual match to the default Gimp 2.8 "5px blur" setting. * There's a dead spot below around 0.4, below which blur value, nothing seems to happen.

I'll put a patch together later today (or probably tomorrow AM), if these values seem suitable.

A Gegl Gaussian blur bug?

There seems to be a bug in Gimp from git's Gegl Gaussian blur. It produces vertical streaks, noticeable at higher value blurs in larger images, very obvious at 155unit blur of a 2816x2112px image, less obvious when the image is scaled to 1408x1056px before blurring.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]