图像下采样算法 [英] Image downsampling algorithms

查看:1001
本文介绍了图像下采样算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是最好的重采样算法,我可以用来将图像分割成原来的一半大小。速度是最重要的,但它不应该降低质量太差。我基本上是试图以生成图像金字塔。

What's the best re-sampling algorithm I can use to divide an image into half its original size. Speed is of primary importance but it shouldn't degrade quality too bad. I'm basically trying to generate an image pyramid.

我本来打算跳过像素。这是最好的方法去?从我读过由像素跳跃产生的图像太尖锐。可能有人谁试图此评论。我的图像包含几分地图数据像<一个href=\"http://www.econguru.com/wp-content/uploads/2009/01/gdp-ppp-per-capita-worldmap-2008-cia-factbook-thumb.png\">this.

I was originally planning to skip pixels. Is this the best way to go? From what I've read the image produced by pixel skipping is too sharp. Could someone who has tried this comment. My images contain map data sort of like this.

推荐答案

跳过的像素会造成混淆,在高频率的变化(如交变亮/暗带)将转换为低频(如恒光或暗)

Skipping pixels will result in aliasing, where high frequency changes (such as alternating light/dark bands) will convert to low frequencies (such as constant light or dark).

缩减一半不走样的最快方法是平均2×2像素为单个像素。更好的结果可以用更复杂的减少内核可以了,但它们会在速度为代价的。

The quickest way to downsize to half without aliasing is to average 2x2 pixels into a single pixel. Better results can be had with more sophisticated reduction kernels, but they will come at the expense of speed.

编辑:这里是到目前为止所讨论的技术的一些例子

Here are some examples of the techniques discussed so far.

跳过每隔一个像素 - 你可以看到的结果是不通过看在左侧的图例非常好。这几乎是不可读:

Skipping every other pixel - you can see that the results aren't very good by looking at the legend on the left side. It's almost unreadable:

平均每个2x2的网格 - 文本现在是尖锐性和可读性:

Averaging every 2x2 grid - The text is now sharp and readable:

高斯模糊,如<建议href=\"http://stackoverflow.com/questions/6133957/image-downsampling-algorithms/6140688#6140688\">R. - 有点较模糊,但更易读到一个点。模糊的量可以调节以得到不同的结果:

Gaussian blur, as suggested by R. - a little blurrier, but more readable up to a point. The amount of blur can be adjusted to give different results:

<一个href=\"http://stackoverflow.com/questions/6133957/image-downsampling-algorithms/6140688#6140688\">R.也是对伽玛曲线影响的结果,但这应该只是在最苛刻的应用可见正确的。无伽马校正完成了我的例子。

R. is also correct about the Gamma curve affecting the results, but this should only be visible in the most demanding applications. My examples were done without gamma correction.

这篇关于图像下采样算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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