Re: Blackman interpolation instead of linear or cubic
- From: Kaba <none@xxxxxxxx>
- Date: Sun, 27 Jan 2008 12:34:33 +0200
That means that for a very little more power, we can replace linear
interpolation with Blackman interpolation, which is arguably one of
the best interpolations for images around. It would thus surely be
faster than cubic spline interpolation and also yield nicer looking
results.
So here's what I'm wondering, since it takes so little to improve upon
linear interpolation in order to get to that, and that it's barely
more resource hungry, why is it so seldom used? Is it out of
ignorance? Or is there some caveat in my thinking?
Linear interpolation is cheap so it is used in real-time rendering.
The Fourier interpretation of frequencies does not quite correspond to
what we would like to see when filtering or reconstructing images.
Here's an example. You can do _perfect_ low pass filtering in the
Fourier sense by taking the discrete fourier transform, then multiplying
by a box mask and taking the inverse discrete fourier transform. This
corresponds to convoluting with a sinc filter with an infinite support.
Let's do that.
Here's the input image:
http://kaba.hilvi.org/project/cga/input.png
Here's a perfect low pass filtering:
http://kaba.hilvi.org/project/cga/result1.png
Here's another with less detail removed:
http://kaba.hilvi.org/project/cga/result2.png
What you see in the filtered images is a lot of ringing. The rings are
echoes of neighbouring pixels: every pixel affects every other pixel.
Finite support filters can avoid the ringing.
Btw. The Blackman function is not meant as a filter in itself. It is a
windowing function for the sinc filter, making it a finite support
filter. The Fourier transforms are better suited for analysing sound.
Here's the matlab code I used to produce these images (change the
percent between [0, 0.5[ to get different degrees of blurring):
http://kaba.hilvi.org/project/cga/perfectblur.m
--
http://kaba.hilvi.org
.
- Follow-Ups:
- Re: Blackman interpolation instead of linear or cubic
- From: Michel Rouzic
- Re: Blackman interpolation instead of linear or cubic
- From: hoffmann
- Re: Blackman interpolation instead of linear or cubic
- References:
- Blackman interpolation instead of linear or cubic
- From: Michel Rouzic
- Blackman interpolation instead of linear or cubic
- Prev by Date: Re: Random small rotation
- Next by Date: Re: Blob detection / marching square and lookup table
- Previous by thread: Blackman interpolation instead of linear or cubic
- Next by thread: Re: Blackman interpolation instead of linear or cubic
- Index(es):
Relevant Pages
|