My honors task for this project was to correctly implement several different image resampling filters and then determine their optimal radius. I have provided a breif analysis of each filter with examples of images that are downscaled and upscaled using each filter with a radius that is optimal, too small and too large. The filters that I have implemented are the Dirac Delta, box, tent, B-spline, Gaussian and Lanczos.

The original image that I used for all of the examples is the chessboard image from Yoh Suzuki. I chose this image in particular because it has both some curves and some sharp lines. Also, the letters, numbers and checkerboard squares were helpful in determining the optimal radius of each filter. It was easy to see in most cases, especially around the edges of the squares whether or not the filter was large enough to optimally reduce aliasing and small enough not to cause excessive blurring.

The original chessboard test image provided by Yoh. |

The Dirac Delta filter is different from all the other filters in that the integral anywhere equals 1. Therefore, it is really only point sampling, and so, even with an optimal radius, results from downscaling or upscaling with this filter are quite "blocky".

Scale | Radius |
---|---|

1/4 | 2.5 |

1/2 | 1.5 |

3/4 | 1.1667 |

5/4 | 0.9 |

3/2 | 0.833333 |

7/4 | 0.78571 |

2 | 0.75 |

The box filter represents the simplest approximation to the optimal filter. The box filter is theoretically optimal with a radius of 0.5, but that does not turn out to be the best radius in practice. The optimal radius for the box filter follows the same distribution of the Dirac Delta filter. It seems that the box filter doesn't handle resampling much better than the delta filter and it results in a lot of aliasing.

A box filter with radius of 0.5 results in nearest-neighbor interpolation.

Scale | Radius |
---|---|

1/4 | 2.5 |

1/2 | 1.5 |

3/4 | 1.1667 |

5/4 | 0.9 |

3/2 | 0.833333 |

7/4 | 0.78571 |

2 | 0.75 |

The optimal radius of the tent filter, and the b-spline, were the easiest to figure out. Whenever upsampling, a radius of 1 is optimal. When downsampling the optimal radius is equal to 1 divided by the average of the scales in each direction.

A tent filter with radius of 1 results in standard bi-linear interpolation.

Scale | Radius |
---|---|

1/4 | 4 |

1/2 | 2 |

3/4 | 1.3 |

5/4 | 1 |

3/2 | 1 |

7/4 | 1 |

2 | 1 |

The B-Spline filter is the convolution of the box filter with itself 4 times. It has continuity through the second derivative, making it more smooth than than the tent filter. The optimal radius for a B-spline happens to follow the same formula as the tent filter.

Scale | Radius |
---|---|

1/4 | 4 |

1/2 | 2 |

3/4 | 1.3 |

5/4 | 1 |

3/2 | 1 |

7/4 | 1 |

2 | 1 |

The Gaussian filter is a close approximation to the optimal filter, but it can produce somewhat blurry results. Upsampling with the filter generally produces smoother images than with the b-spline, sometimes again with a little more aliasing. The optimal radius for the Gaussian filter follows the same distribution as the delta and box filter.

Scale | Radius |
---|---|

1/4 | 2.5 |

1/2 | 1.5 |

3/4 | 1.1667 |

5/4 | 0.9 |

3/2 | 0.833333 |

7/4 | 0.78571 |

2 | 0.75 |

The Lanczos filter is the most unique of the filters that I implemented. It seems to produce very smooth results with little aliasing. A smaller than optimal radius results in an image very close to an image produced by the optimal radius. A larger than optimal radius doesn't produce much additional aliasing like the other filters until it is much larger than the optimal. Instead, with the checkboard image, it produced black or white "splats" as aliasing. Also, the optimal radius did not follow any of the other filters.

The optimal radius for the Lanczos filter was the hardest to determine. I am not sure if there is a closed formula for the optimal radius based on the scale factor.

Scale | Radius |
---|---|

1/4 | 1.52338 |

1/2 | 1.515468 |

3/4 | 1.188732 |

5/4 | 1.131861 |

3/2 | 1.188732 |

7/4 | 1.113 |

2 | 1.267990 |

I found that the many of the filters have the same optimal radius. The Dirac Delta, box and Gaussian filters all have the same optimal radius, and the tent and B-Spline filters have the same optimal radius. The only "odd" one of the filters that I implemented was the Lanczos filter.