PanoTools Anti Aliasing Filters

From PanoTools.org Wiki
(Difference between revisions)
Jump to: navigation, search
m (wordsmithing)
 
(4 intermediate revisions by 2 users not shown)
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]] filters that avoid [[aliasing]].|1}} Those filters use a dynamic kernel size where the size of the filter kernel is calculated for each pixel. The kernel size in the table refers to the kernel used if there is no resizing (f.e. rotation only). If image size is reduced a larger kernel is needed which increases execution times.
  
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 types of kernels with equal right to exist. Non-sharpening kernels (ID 8 to 17) based on the [[wikipedia:Normal distribution|Gaussian distribution]] and sharpening kernels (ID 18 to 23) based on the [[wikipedia:Sinc function|Sinc function]]. Both kernel types 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.
+
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 too 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.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 11: Line 11:
 
! Name
 
! Name
 
! f(x)
 
! f(x)
! Kernel size
+
! Kernel size<br>(radius)
 +
! Comment
 
|-
 
|-
| aabox || 8 || Box Filter || [[Image:plot_s_filter_8.png]] || 0.5  
+
| aabox || 8 || Box Filter || [[Image:plot_s_filter_8.png]] || 0.5 || sometimes called ''nearest neighbor''
 
|-
 
|-
| aatriangle || 9 || Bartlett/Triangle Filter || [[Image:plot_s_filter_9.png]] || 1.0  
+
| aatriangle || 9 || Bartlett/Triangle Filter || [[Image:plot_s_filter_9.png]] || 1.0 || sometimes called ''bilinear''
 
|-
 
|-
 
| aahermite || 10 || Hermite Filter || [[Image:plot_s_filter_10.png]] || 1.0  
 
| aahermite || 10 || Hermite Filter || [[Image:plot_s_filter_10.png]] || 1.0  
Line 29: Line 30:
 
| aagaussian2 || 15 || Gaussian 1/2 Filter (sharper) || [[Image:plot_s_filter_15.png]] || 1.0  
 
| aagaussian2 || 15 || Gaussian 1/2 Filter (sharper) || [[Image:plot_s_filter_15.png]] || 1.0  
 
|-
 
|-
| aaquadratic || 16 || Quadardic Filter || [[Image:plot_s_filter_16.png]] || 1.5  
+
| aaquadratic || 16 || Quadratic Filter || [[Image:plot_s_filter_16.png]] || 1.5  
 
|-
 
|-
| aacubic || 17 || Cubic Filter || [[Image:plot_s_filter_17.png]] || 2.0  
+
| aacubic || 17 || Cubic Filter || [[Image:plot_s_filter_17.png]] || 2.0 || default filter in [[Photoshop]]
 
|-
 
|-
 
| aacatrom || 18 || Catmull-Rom Filter || [[Image:plot_s_filter_18.png]] || 2.0  
 
| aacatrom || 18 || Catmull-Rom Filter || [[Image:plot_s_filter_18.png]] || 2.0  
Line 45: Line 46:
 
| aablackmansinc || 23 || Blackman/sinc Filter || [[Image:plot_s_filter_23.png]] || 4.0  
 
| aablackmansinc || 23 || Blackman/sinc Filter || [[Image:plot_s_filter_23.png]] || 4.0  
 
|}
 
|}
 +
 +
Some [[PanoTools Anti Aliasing Filter Examples|examples]].
  
 
[[Category:Glossary]]
 
[[Category:Glossary]]

Latest revision as of 22:10, 1 November 2008

Since version 2.7.10 the PanoTools library contains several interpolation filters that avoid aliasing. Those filters use a dynamic kernel size where the size of the filter kernel is calculated for each pixel. The kernel size in the table refers to the kernel used if there is no resizing (f.e. rotation only). If image size is reduced a larger kernel is needed which increases execution times.

There are two types of kernels with equal right to exist. Non-sharpening kernels (ID 8 to 17) based on the Gaussian distribution and sharpening kernels (ID 18 to 23) based on the Sinc function. Both kernel types 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 too 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 Plot s filter 8.png 0.5 sometimes called nearest neighbor
aatriangle 9 Bartlett/Triangle Filter Plot s filter 9.png 1.0 sometimes called bilinear
aahermite 10 Hermite Filter Plot s filter 10.png 1.0
aahanning 11 Hanning Filter Plot s filter 11.png 1.0
aahamming 12 Hamming Filter Plot s filter 12.png 1.0
aablackman 13 Blackmann Filter Plot s filter 13.png 1.0
aagaussian 14 Gaussian 1/sqrt(2) Filter (blury) Plot s filter 14.png 1.25
aagaussian2 15 Gaussian 1/2 Filter (sharper) Plot s filter 15.png 1.0
aaquadratic 16 Quadratic Filter Plot s filter 16.png 1.5
aacubic 17 Cubic Filter Plot s filter 17.png 2.0 default filter in Photoshop
aacatrom 18 Catmull-Rom Filter Plot s filter 18.png 2.0
aamitchell 19 Mitchell Filter Plot s filter 19.png 2.0
aalanczos2 20 Lanczos2 Filter Plot s filter 20.png 2.0
aalanczos3 21 Lanczos3 Filter Plot s filter 21.png 3.0
aablackmanbessel 22 Blackman/Bessel Filter Plot s filter 22.png 3.2383
aablackmansinc 23 Blackman/sinc Filter Plot s filter 23.png 4.0

Some examples.

Personal tools
Namespaces

Variants
Actions
Navigation
tools
Tools