Info about Resampling algorithms
Moderators: XnTriq, helmut, xnview
-
- Posts: 118
- Joined: Sat Jul 30, 2005 10:26 am
Info about Resampling algorithms
When I change the size of an image, in XnView there are serveral possibilities (algorithms) to do that:
*next neigbour
*bilinear
*gauss
*hermite
*bell
*bspline
*michell
*lanczos
I wonder when to use which and how they act!
There is a discussion in the german wikipedia goning on at http://de.wikipedia.org/wiki/Wikipedia_ ... ochrechnen about this. Can anybody help?
Thomas
*next neigbour
*bilinear
*gauss
*hermite
*bell
*bspline
*michell
*lanczos
I wonder when to use which and how they act!
There is a discussion in the german wikipedia goning on at http://de.wikipedia.org/wiki/Wikipedia_ ... ochrechnen about this. Can anybody help?
Thomas
-
- Author of XnView
- Posts: 44917
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: info about algorithms
It's only different interpolation method between 2 pixels.thire wrote:When I change the size of an image, in XnView there are serveral possibilities (algorithms) to do that:
*next neigbour
*bilinear
*gauss
*hermite
*bell
*bspline
*michell
*lanczos
I wonder when to use which and how they act!
There is a discussion in the german wikipedia goning on at http://de.wikipedia.org/wiki/Wikipedia_ ... ochrechnen about this. Can anybody help?
Pierre.
-
- Posts: 118
- Joined: Sat Jul 30, 2005 10:26 am
-
- XnThusiast
- Posts: 1423
- Joined: Thu Dec 23, 2004 7:17 pm
- Location: Paris, France
Have a look at this PDF file, with explanations and illustrations for some of them.
Some more advanced techniques are compared here: http://www.americaswonderlands.com/digi ... lation.htm
Usually:
- when speed is an issue, bilinear gives good results (nearest neighbour is the fastest, but really ugly for most uses)
- for quality work, lanczos and bicubic are often recommended
Olivier
Some more advanced techniques are compared here: http://www.americaswonderlands.com/digi ... lation.htm
Usually:
- when speed is an issue, bilinear gives good results (nearest neighbour is the fastest, but really ugly for most uses)
- for quality work, lanczos and bicubic are often recommended
Olivier
-
- Posts: 118
- Joined: Sat Jul 30, 2005 10:26 am
-
- Posts: 884
- Joined: Sun Apr 10, 2005 4:29 pm
Take a fairly small image and increase it's size by 300% using each of the different methods, compare the results. That is the only real way to get an understanding of the differences between the algorithms. You will find 3 main differences between the results: speed, detail, blurriness. In general, the closer they are to the top of the list, the faster and uglier they will be. The closer they are to the bottom of the list, the slower, better, but blurrier they will be. (Note that blurry isn't always bad. You will often find that if you use a blurrier algorithm and then sharpen the result, you will have a better image than if you used a less blurry algorithm.)
Some rules of thumb:
Mitchell is generally the best one to use, I find that it gives the best results in most cases, and rarely needs sharpening afterward.
Lanzcos will usually result in slightly better quality than mitchell, but will be quite blurry and will look bad unless you sharpen it quite a bit.
If you have a slow computer, bilinear is probably your best choice.
If you're resizing a GIF file, use next neighbor. Any other filter will change it to a 24bit image, and will wreck any transparency.
While we're on the subject, is there any chance of getting the Wiener filter added to xnview? It's a slow algorithm, but it gets great results on most images.
Some rules of thumb:
Mitchell is generally the best one to use, I find that it gives the best results in most cases, and rarely needs sharpening afterward.
Lanzcos will usually result in slightly better quality than mitchell, but will be quite blurry and will look bad unless you sharpen it quite a bit.
If you have a slow computer, bilinear is probably your best choice.
If you're resizing a GIF file, use next neighbor. Any other filter will change it to a 24bit image, and will wreck any transparency.
While we're on the subject, is there any chance of getting the Wiener filter added to xnview? It's a slow algorithm, but it gets great results on most images.
Last edited by Drahken on Fri Sep 16, 2005 1:15 pm, edited 1 time in total.
-
- Posts: 118
- Joined: Sat Jul 30, 2005 10:26 am
-
- Posts: 8705
- Joined: Sun Oct 12, 2003 6:47 pm
- Location: Frankfurt, Germany
Perhaps worth while writing an FAQ. Forum member "Lasse" has tested the resizing of screenshots using various resampling algorithms of XnView. He provides the results on his webpage.
See also topic FAQ "How to resize images with text (screenshots)".
See also topic FAQ "How to resize images with text (screenshots)".
Image for impress
For quality impression which is the indication.
*next neigbour
*bilinear
*gauss
*hermite
*bell
*bspline
*michell
*lanczos
Thank for the attention.
*next neigbour
*bilinear
*gauss
*hermite
*bell
*bspline
*michell
*lanczos
Thank for the attention.
-
- Posts: 3
- Joined: Sat Mar 17, 2007 1:32 pm
-
- Posts: 698
- Joined: Thu Feb 09, 2006 10:18 am
- Location: Sweden
I wonder if they are all needed? Seriously, how many are using most of the methods? Imo its more confusing than contributing, wouldn't it be a good idea to take some of them away?
For me these would be more than enough (and still more that photoshops three):
- next neighbour
- bilinear
- bspline (or bicubic?)
- mitchell
- lanchos
For me these would be more than enough (and still more that photoshops three):
- next neighbour
- bilinear
- bspline (or bicubic?)
- mitchell
- lanchos
-
- Posts: 394
- Joined: Sat Nov 18, 2006 8:57 am
Mitchell is bicubic.
Agreed that some of the resizers aren't very useful. Could be worse, could be the full list of imagemagick resizers. :p Gauss, bell, and bspline are almost indistiguishable, and often only useful as specialized effects, not generic outputs; in general they're too close to bilinear to even matter. There are a wide range of bsplines but this one doesn't retain much sharpness. Hermite is practically indistiguishable from Mitchell - in fact it's one of the degenerate cases of the Mitchell/Netravali filter, iirc. Those who actually care about these others would probably also care enough to want their tunable parameters as well, or more advanced non-separable resize kernels.
So point, bilinear, bicubic, and lanczos would seem to be enough for anyone using batch resize. If you wanted to emulate photoshop, you could have a bicubic smoother (lower "c") like photoshop, to fill that halfway point in.
Agreed that some of the resizers aren't very useful. Could be worse, could be the full list of imagemagick resizers. :p Gauss, bell, and bspline are almost indistiguishable, and often only useful as specialized effects, not generic outputs; in general they're too close to bilinear to even matter. There are a wide range of bsplines but this one doesn't retain much sharpness. Hermite is practically indistiguishable from Mitchell - in fact it's one of the degenerate cases of the Mitchell/Netravali filter, iirc. Those who actually care about these others would probably also care enough to want their tunable parameters as well, or more advanced non-separable resize kernels.
So point, bilinear, bicubic, and lanczos would seem to be enough for anyone using batch resize. If you wanted to emulate photoshop, you could have a bicubic smoother (lower "c") like photoshop, to fill that halfway point in.
-
- Posts: 698
- Joined: Thu Feb 09, 2006 10:18 am
- Location: Sweden
-
- Posts: 394
- Joined: Sat Nov 18, 2006 8:57 am
-
- Posts: 3
- Joined: Sat Mar 17, 2007 1:32 pm