Also, I believe that I did not make the very best choice for the (de)blur that defines EWA LanczosSharp very many years ago given that the intent was
% 'No-Op' Vertical and Horizontal Line Preservation Condition: Images with
% only vertical or horizontal features are preserved when performing 'no-op'
% with EWA distortion.
https://github.com/ImageMagick/ImageMag ... e/resize.c
For EWA LanczosSharp, I suggest you find the root of
Code: Select all
def rite(r):
return (
(
l(f(r)[0]) +
l(f(r)[2]) +
l(f(r)[5]) +
l(f(r)[8]) +
l(f(r)[12]) +
2 * (
l(f(r)[1]) +
l(f(r)[4]) +
l(f(r)[10]) +
2 * (
l(f(r)[3]) +
l(f(r)[6]) +
l(f(r)[7]) +
l(f(r)[9]) +
l(f(r)[11])
)
)
) / (z + 4 * (
l(f(r)[0]) +
l(f(r)[2]) +
l(f(r)[5]) +
l(f(r)[8]) +
l(f(r)[12]) +
l(f(r)[1]) +
l(f(r)[4]) +
l(f(r)[10]) +
2 * (
l(f(r)[3]) +
l(f(r)[6]) +
l(f(r)[7]) +
l(f(r)[9]) +
l(f(r)[11])
)
)))
instead of the one that's in
https://code.videolan.org/videolan/libp ... quests/569
I expect it to barely change the value, actually pushing it closer to 1. I very much doubt anybody will see a difference, but then the blur (scaling of Jinc-windowed Jinc) gives a filter that has a cleaner defining property: When used with images that are constant along columns (or rows), the blur makes the convolution, under no-op, the closest to the identity in infinity linear operator norm. So it better parallels Lanczos4Sharpest which uses the 2D version of the same principle:
-- Computation of the deblur of the EWA Lanczos (Jinc-windowed
-- Jinckernel that makes the convolution, under no-op, the closest to
-- the identity in infinity linear operator norm. Equivalently, deblur
-- that makes the weight of the center pixel equal to 1. Equivalently,
-- deblur that makes the sum of the weights of the other pixels equal
-- to zero. One may argue that this gives a good approximation of the
-- sharpest resampling Jinc-windowed Jinc kernel.
https://www.imagemagick.org/discourse-s ... 6b#p128587
Back to EWA Lanczos 3, there are various criteria that one can use to determine how to scale (blur) the EWA Lanczos kernels, and they all give, for EWA Lanczos 3, roughly the same answers (between 0.97 and 1). The defining criterion that is currently used by libplacebo and ImageMagick (to my regret) is "if an image only contains vertical (or horizontal) lines then the value along a line does not affect the two closest ones". The two above principles are equivalent if the support of the filter is contained in a (centered) square of "radius" 2 (edge length 4); the Robidoux kernel satisfies both.
(I'm totally happy with the principle I used with Lanczos4Sharpest 10+ years ago. Don't change it and thanks for the extra precision.)