Page 2 of 2

Re: search for a decent interpolatory EWA filter

Posted: 2011-12-26T21:45:33-07:00
by NicolasRobidoux
The overall lesson of my numerous attempts (some documented here, some not) at constructing a decent interpolatory EWA filter:

This is a nontrivial problem. (Or else, I'm blind.)

Re: search for a decent interpolatory EWA filter

Posted: 2011-12-27T07:18:23-07:00
by NicolasRobidoux
P.S. It you are going to downsample, or barely upsample, EWA triangle and the Keys one discussed earlier in this thread are probably better choices of interpolatory EWA filters than the "optimal" one.

Re: search for a decent interpolatory EWA filter

Posted: 2011-12-29T12:40:15-07:00
by NicolasRobidoux
Here is a good illustration of this "best so far" interpolatory EWA filter I found (which, once again, is not very good).

Download Image. Now, try this:

Code: Select all

convert sl.png -define filter:blur=.7071067811865475 -define filter:c=.49218815 -define filter:b=2.08817747090797 -filter Cubic -distort Resize 3000% c_optimal_3000percent.png
Neat, eh? Is it clear why I say that it's fine for mild, but not for drastic, upsampling?

Now, before you go "this is complete garbage", compare with

Code: Select all

convert sl.png -filter Triangle -distort Resize 3000% Triangle.png
If you want to compare with non-interpolatory EWA filters:

Code: Select all

convert sl.png -define filter:filter=Jinc -define filter:window=Jinc -define filter:blur=0.88451002338585141 -define filter:lobes=4 -distort Resize 3000% JincJinc4blur0p88451002338585141.png
convert sl.png -define filter:filter=Jinc -define filter:window=Jinc -define filter:blur=0.88549061701764 -define filter:lobes=3 -distort Resize 3000% JincJinc3blur0p88549061701764.png
convert sl.png -filter LanczosSharp -distort Resize 3000% LanczosSharp.png
convert sl.png -filter Robidoux -distort Resize 3000% Robidoux.png
convert sl.png -define filter:c=.3689927438004929 -filter Cubic -distort Resize 3000% RobidouxSharp.png
And this is good old orthogonal (Sinc-windowed Sinc) Lanczos 3:

Code: Select all

convert sl.png -filter Lanczos -resize 3000% orthogonalLanczos3.png
If you compare orthogonalLanczos to, say, RobidouxSharp, you'll get an idea of why I like the latter despite the fact that it is not derived with any consideration of frequency response whatsoever, and why I don't think that orthogonalLanczos is the be all and end all. (A look at the LanczosSharp result will also tell you why I, and others, like it so much.)