# Difference between revisions of "PanoTools Anti Aliasing Filters"

Erik Krause (talk | contribs) m (typo) |
Erik Krause (talk | contribs) m (Prepared for new glossary template) |
||

Line 1: | Line 1: | ||

− | Since version 2.7.10 the [[PanoTools]] library contains several [[interpolation]] filter that avoid [[aliasing]]. Those filters use a dynamic kernel size where the size of the filter kernel is calculated for each pixel. | + | {{Glossary|Since version 2.7.10 the [[PanoTools]] library contains several [[interpolation]] filter that avoid [[aliasing]].|1}} Those filters use a dynamic kernel size where the size of the filter kernel is calculated for each pixel. |

There are two theoretical types of kernels that have an equal right for existence. Kernels based on the [[wikipedia:Normal distribution|Gaussian distribution]] and kernels based on the [[wikipedia:Sinc function|Sinc function]]. Both kernels have an infinite width so a windowing function is used to limit the kernel size for practical reasons. Gaussian based kernels do not contain negative values, sinc based do. | There are two theoretical types of kernels that have an equal right for existence. Kernels based on the [[wikipedia:Normal distribution|Gaussian distribution]] and kernels based on the [[wikipedia:Sinc function|Sinc function]]. Both kernels have an infinite width so a windowing function is used to limit the kernel size for practical reasons. Gaussian based kernels do not contain negative values, sinc based do. |

## Revision as of 15:36, 18 November 2007

Since version 2.7.10 the PanoTools library contains several interpolation filter that avoid aliasing. Those filters use a dynamic kernel size where the size of the filter kernel is calculated for each pixel.

There are two theoretical types of kernels that have an equal right for existence. Kernels based on the Gaussian distribution and kernels based on the Sinc function. Both kernels have an infinite width so a windowing function is used to limit the kernel size for practical reasons. Gaussian based kernels do not contain negative values, sinc based do.

The values in the plot describe the contribution of a pixel depending on the distance from the center. A wider kernel in the center means a more blurry image but if it is to narrow it tends to produce aliasing. If the kernel contains negative values the images also gets sharpened. Some examples: If you look at the plots you can see that a *Hamming Filter* produces blurrier image then the *Blackmann Filter*. The *Lanczos2 Filter* introduces more sharpening then the *Mitchell Filter* because of the larger negative areas.

short | ID | Name | f(x) | Kernel size (radius) |
Comment |
---|---|---|---|---|---|

aabox | 8 | Box Filter | 0.5 | sometimes called nearest neighbor
| |

aatriangle | 9 | Bartlett/Triangle Filter | 1.0 | sometimes called bilinear
| |

aahermite | 10 | Hermite Filter | 1.0 | ||

aahanning | 11 | Hanning Filter | 1.0 | ||

aahamming | 12 | Hamming Filter | 1.0 | ||

aablackman | 13 | Blackmann Filter | 1.0 | ||

aagaussian | 14 | Gaussian 1/sqrt(2) Filter (blury) | 1.25 | ||

aagaussian2 | 15 | Gaussian 1/2 Filter (sharper) | 1.0 | ||

aaquadratic | 16 | Quadratic Filter | 1.5 | ||

aacubic | 17 | Cubic Filter | 2.0 | default filter in Photoshop | |

aacatrom | 18 | Catmull-Rom Filter | 2.0 | ||

aamitchell | 19 | Mitchell Filter | 2.0 | ||

aalanczos2 | 20 | Lanczos2 Filter | 2.0 | ||

aalanczos3 | 21 | Lanczos3 Filter | 3.0 | ||

aablackmanbessel | 22 | Blackman/Bessel Filter | 3.2383 | ||

aablackmansinc | 23 | Blackman/sinc Filter | 4.0 |

Some examples.