[cairo] Concerns about using filters for downscaling

Bill Spitzak spitzak at gmail.com
Tue Mar 25 16:57:17 PDT 2014


I do not think the bilinear example is "good" for scales less than 1/2.

"good" should use bilinear for scales >= 1, *possibly* use it (depending 
on the speed) for scales between 1 and 1/2, and use something else like 
box for scales below that.

The most important missing detail is that the algorithm must change at 
some scale to get the

The moire patterns seem to vary between the images, in that your lancoz 
filter produces them on some frames the box does not and vice-versa. 
This is unusual, normally if the box does not produce a moire other 
filters will not as well. I would check the weights you are using in the 
lancoz filter.

I'm also still mystified by the "two filters" approach. I have no idea 
what you mean by the sampling and reconstruction filter. I have done a 
lot of image processing, and transformations only use *one* filter, 
called the "sampling filter". This filter changes depending on the scale 
and on the fractional portion of the sample point.

Owen Taylor wrote:
> On Tue, 2014-03-25 at 16:39 -0400, Owen Taylor wrote:
> 
>> The other consideration is things look actually like, of course.
>> I've put up samples of the different downscaling methods on different
>> images at:
>>
>>  http://fishsoup.net/misc/downscaling/samples.html
> 
> Turned out that some box filtering crept into the Mipmap/Trilinear
> samples - I've fixed that now, but if you looked at the images
> immediately after I posted the link and drew any conclusions, you should
> reload the page and look again.
> 
> - Owen
> 
> 


More information about the cairo mailing list