Re: possble replacement(s) for Gimp Lanczos

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

 



Hello Sven and Oyvind:

> Have you already added the plug-ins to the
> GIMP plug-in registry?

I will when I have rewritten the code to my satisfaction.
The current versions are perfectly useable (and bug free), 
but I'd rather release the final versions right of the bat.

> At this point we are concentrating on porting more and
> more of the GIMP core to GEGL.

It is unlikely that I will port EANBQH and IBFNBQH to GEGL,
because programming them so that they can be used analogously
to bilinear, bicubic and lanczos is a substancial programming 
project. 

I have looked around the GEGL code, and it is very likely that 
I will program a novel "co-convex resampling scheme" following 
the lanczos model found there. This will take a while.

One good thing about the co-convex scheme is that the results 
are not overly affected by what I understand is the current GEGL 
"abyss" policy (set pixel values outside of the physical extent 
of the image to 0): only if the sampling point is outside of the 
rectangle defined by the boundary pixels will the value be 
negatively affected.

Quick comment:

If the default GEGL abyss policy was "smear," this would have the 
following general consequence:

Any linear method/filter (blur, resampling...) which is exact on 
constant intensity data will still be exact on constant intensity data 
without special handling within the filter. This does not mean that 
the results are the same as if the filter carefully handles the boundary, 
just that the dirty hack of using "ghost values" and then implementing 
the filter in a boundary independent way will not give absurd results.

This has two consequences:

  Implementing filters can be done in two passes: first, ignore boundary issues; 
  build in boundary handling into the filter, using the x, y, width and height 
  information to determine the position relative to the boundary and perform 
  appropriate branching.

  If speed/more compact code is desired, ignore boundary branching, confident that
  the results are still reasonable.

This being said, changing to "smear" will not make the results with 
the co-monotone method any different, which is why I don't particularly care. 
The co-monotone method is not linear.

I suspect that for some filters it is impossible to define an abyss policy which
is equivalent to careful handling of the boundary within the filter. The ImageMagick
trick of masking and normalizing the coefficients is another way of getting 
reasonable results (and preserving the "exact on constants" property), but again
it only approximates careful boundary handling for most schemes. If I was to choose, 
I'd rather (approximately) fix things with a smear abyss policy (even though, in the
particular case of my next pet scheme, it makes no difference). 

Thank you all for your comments,

Nicolas Robidoux
Laurentian University/Universite Laurentienne
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux