ImageMagick Resize Filter Re-development

Announcements pertaining to ImageMagick, or ImageMagick related software. This list is moderated. No discussions here, instead post to the users group instead.
Post Reply
User avatar
anthony
Posts: 8869
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

ImageMagick Resize Filter Re-development

Post by anthony » 2007-12-11T19:31:01-07:00

After a long process (many months) of research, re-development, and documenting, I have finally finished a overhaul of the IM resize filters.
For a full summery and documentation of the new filters and controls see
http://imagemagick.org/Usage/resize/#filter

What is a resize filter? Well it is the method by which IM merges pixels together when resizing and or distorting an image. It is vital to image processing to prevent the resulting images from having bad looking 'artifacts', such as bluriness, blocking, or morié patterns.

Why was it overhauled? While the original IM filter set was one of the most versatile available for just about any freely available Image Processing packages, it also had a few basic problems.
Some of the filters were not correctly defined, specifically Blackman, Hanning, and Hamming (they were being used as filter weighting functions, rather than windowing functions for Sinc). The Gaussian filter showed some distinct ringing effects. Also the old -support option was mis-leading as it really was a filter 'blurring' setting (it has been replaced).

These are now correctly defined and produce a good result similar to the 'Lanczos' filter.

Also the internally to the Core Library, the filters were not accessible from other areas of IM. Specifically the unscaled interpolation methods could not use them (another area that is ripe for an overhaul). They were also not accessable from the new General distortion Operator and the underlying 'elliptical resampling' methods, that improves the resulting images at all distorted scales, as well as allow you to View Distant Horizons

How does this effect you? In most cases it shouldn't. The default resize filter has not changed, and in most existing filters also has not changed.
What has changed is that for people with just a little more expert knowledge, or a willingness to experiment, now have access to huge number of filter controls. For example you can now generate Sinc-Windowed filters at larger 'support' (in its correct meaning) sizes. Also while 4 'cubic' filters are pre-defined, there are expert controls to essentially create any type of 'cubic' filter, especially 'Keys' Cubic Filters.
Also a large number of extra filters, including Lagrange, Parzen, Bartlett, Kaiser, and indirectly, Keys filters, plus you can use raw Sinc and Bessel (Jinc) filters (not just the Backman windowed pre-defined versions).
It also opens the way for future developments such as the posibility of defining cylindrical convolution kernals based on the filters.

I would especially like to thank Fred Weinhaus for his support and input during the re-development. Without him it may never have been completed.

I will now be attempting to get back to the underlying Image Distortion operator, to improve the image results using the new filters, and then perhaps I can add more distortion operators.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
http://www.imagemagick.org/Usage/

Post Reply