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



On 12/03/2013 02:10 PM, Teo Mazars wrote:

The way GEGL currently exposes each numerical parameters is as follow:

1) A nominal range, say [a, b], which represents the range where the operation is expected to work
2) An UI range, [a', b'] included in [a, b], representing the area of interest of the parameter.
3) An exponent, (like a gamma correction), to make the slider not behave linearly on the [a', b'] range.

Currently, GIMP's sliders "show" only [a', b'], but allows values in [a, b]. The exponent is the way GEGL handles the 
"mutli-scale" problem and it allows to have more precision on small value. Those values are all in GEGL, look for eg 
gegl_chant_double_ui in /operations/common/*.c

I will let others comment on what is the optimal UI range for those two operations. But changing [a', b'] would be really easy, 
and it should change the "unit" as well. I am not sure about making that range "user configurable", it makes 
sense imho.

In the GEGL Gaussian blur, parameters are the std_dev along x and y, describing mathematically the Gaussian curve used 
as kernel. Though, I have to read the code to know where the infinite curve is clipped to have a 
"only-one-pixel" actual radius. Which is not obvious...

I experimented a bit and settled on the following values:


In operations/common/gaussian-blur.c:

gegl_chant_double_ui (std_dev_x, _("Size X"),
                      0.0, 250.0, 4.0, 0.0, 100.0, 1.5,
                      /* 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, 250.0, 4.0, 0.0, 100.0, 1.5,
                      /* 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)"))

This Gaussian blur slider range doesn't really allow slider selection of small, precise values less than 1, so typing in values is still necessary. A logarithm-type scale might be better than a linear scale as the useful range for blur necessarily is large, and the larger the image, the larger the useful range.


In operations/common/unsharp-mask.c:

gegl_chant_double_ui (std_dev, _("Std. Dev."),
                      0.0, 10.0, 1.0, 0.0, 10.0, 1.5,
                      /* 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, 10.0, 1.0, 0.0, 10.0, 1.5,
                      /* was: 0.0, 500.0, 1.0, 0.0, 200.0, 1.5, */
                      _("Scale, strength of effect"))

These USM slider values work well for me. I don't need to type in "little more/little less" values as I can move the slider precisely enough to set a value within 0.01 of what I want.

The other gegl_chant_double_ui values are pretty obvious. What does the value "1.5" do?

A way to type in values without risking accidentally causing a very large radius operation would be very welcome. But the revised slider ranges make typing necessary a lot less often, for me anyway.

I wonder what values other people might find useful for Gaussian blur and USM? I have a 10MP camera. Someone with a 30 or 40MP camera probably would need a larger range, which is one reason why user-settable ranges might be a nice feature. Different styles of processing would be another.

Elle






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