什么是最好的图像缩小算法(质量明智)? [英] What is the best image downscaling algorithm (quality-wise)?

查看:336
本文介绍了什么是最好的图像缩小算法(质量明智)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想找出哪种算法,可用于小型化光栅图片是最好的。有了最好的,我指的是一个给最好的拍摄效果。我知道双三次,但有没有更好的东西了吗?例如,我已经听到一些人认为Adobe的Lightroom具有某种propieritary算法,该算法产生比,我用标准的双三次较好的效果。不幸的是,我想利用这个算法,我自己在我的软件,所以Adobe的精心garded商业机密不会做。

I want to find out which algorithm is the best that can be used for downsizing a raster picture. With best I mean the one that gives the nicest-looking results. I know of bicubic, but is there something better yet? For example, I've heard from some people that Adobe Lightroom has some kind of propieritary algorithm which produces better results than standard bicubic that I was using. Unfortunately I would like to use this algorithm myself in my software, so Adobe's carefully garded trade secrets won't do.

补充:

我检查出Paint.NET和我的惊讶,似乎超级采样裁员的图像时,比双三次更好。这使我怀疑插值算法是要走的路都没有。

I checked out Paint.NET and to my surprise it seems that Super Sampling is better than Bicubic when downsizing a picture. That makes me wonder if interpolation algorithms are the way to go at all.

这也让我想起了一个算法我发明自己,但从未付诸实施。我想这也有一个名称(如一些这个简单不可能是我一个人的想法),但我找不到它的中间流行的。超级采样是最接近的。

It also reminded me of an algorithm I had "invented" myself, but never implemented. I suppose it also has a name (as something this trivial cannot be the idea of me alone), but I couldn't find it among the popular ones. Super Sampling was the closest one.

的想法是这样的 - 为在对象图像的每一个像素,计算在那里将是在源图象。它可能会重叠的一个或多个其它像素。那么这将是可以计算这些像素的区域和颜色。然后,为了获得目标像素的颜色,人们会简单地计算这些颜色的平均,加入他们的领域权重。因此,如果目标像素将包括1/3黄源像素,和绿色源像素的1/4,我会得到(1/3 *黄+ 1/4 *绿)/(1/3 + 1/4)。

The idea is this - for every pixel in target picture, calculate where it would be in the source picture. It would probably overlay one or more other pixels. It would then be possible to calculate the areas and colors of these pixels. Then, to get the color of the target pixel, one would simply calculate the average of these colors, adding their areas as "weights". So, if a target pixel would cover 1/3 of a yellow source pixel, and 1/4 of a green source pixel, i'd get (1/3*yellow + 1/4*green)/(1/3+1/4).

此将自然是计算密集的,但它应尽可能接近理想越好,没有?

This would naturally be computationally intensive, but it should be as close to the ideal as possible, no?

有一个名称,这个算法?

Is there a name for this algorithm?

推荐答案

不幸的是,我无法找到一个链接到原始的调查,但作为好莱坞摄影师从胶片到数码影像感动,这个问题就涨了不少,所以有人(也许SMPTE,也许ASC)聚集了一帮专业摄影师和他们展示的画面已被使用大量不同的算法重新调整。结果是,对于这些专业人士看到巨额的动态影像,达成的共识是,米切尔(也称为高品质的Catmull-ROM)是最好的扩大和正弦是最好的缩小。但正弦是熄灭到无限远,因此不能完全实现的理论上的过滤器,所以我不知道他们用正弦实际上的意思。它可能是指正弦的删减版本。 兰克泽斯是正弦的几个实际的变种,试图改善只是截断它,可能是最好的默认选择缩小静止图像之一。但是,像往常一样,这取决于在图像上,你想要什么:缩小一个画线,以preserve线,例如,在那里你可以preFER侧重于preserving边缘,这将是不受欢迎的情况下收缩时花的照片。

Unfortunately, I cannot find a link to the original survey, but as Hollywood cinematographers moved from film to digital images, this question came up a lot, so someone (maybe SMPTE, maybe the ASC) gathered a bunch of professional cinematographers and showed them footage that had been rescaled using a bunch of different algorithms. The results were that for these pros looking at huge motion pictures, the consensus was that Mitchell (also known as a high-quality Catmull-Rom) is the best for scaling up and sinc is the best for scaling down. But sinc is a theoretical filter that goes off to infinity and thus cannot be completely implemented, so I don't know what they actually meant by 'sinc'. It probably refers to a truncated version of sinc. Lanczos is one of several practical variants of sinc that tries to improve on just truncating it and is probably the best default choice for scaling down still images. But as usual, it depends on the image and what you want: shrinking a line drawing to preserve lines is, for example, a case where you might prefer an emphasis on preserving edges that would be unwelcome when shrinking a photo of flowers.

有各种算法的结果在剑桥颜色 。

There is a good example of the results of various algorithms at Cambridge in Color.

在乡亲的 fxguide 的放在一起大量的信息的上缩放算法(沿有很多关于合成等图像处理其他的东西),这是值得考虑一下。它们还包括测试图像,可能在做你自己的测试是有用的。

The folks at fxguide put together a lot of information on scaling algorithms (along with a lot of other stuff about compositing and other image processing) which is worth taking a look at. They also include test images that may be useful in doing your own tests.

现在的ImageMagick有广泛的指南如果你真的想进入它。

Now ImageMagick has an extensive guide on resampling filters if you really want to get into it.

这是一种讽刺的是,有一个关于缩小的形象,这是理论上的东西,可以做很好,因为你只有扔掉的信息,比有一个关于扩大,在那里你试图将信息添加更多的争议不存在。但随着兰克泽斯启动。

It is kind of ironic that there is more controversy about scaling down an image, which is theoretically something that can be done perfectly since you are only throwing away information, than there is about scaling up, where you are trying to add information that doesn't exist. But start with Lanczos.

这篇关于什么是最好的图像缩小算法(质量明智)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆