在不“跳舞”的情况下对图像进行下采样像素

发布于 2024-11-19 00:32:09 字数 232 浏览 5 评论 0原文

假设我想实时将图像 (1280x720) 缩减采样到非常小的比例 (16x16),并且在图像移动时不会遭受“跳舞”像素的影响,我会使用哪种技术?

这将使用 Xbox360/PS3 GPU。

请注意,16x16 图像只需要包含原始图像的非常“概括”的表示 - 几乎就像颜色的粗略估计。

进行直接下采样会导致像素进入/退出采样,因此当图像移动时您会得到舞蹈/迪斯科效果。

感谢您的任何帮助。

Say I wanted to downsample an image in realtime (1280x720) to a very small scale (16x16) and not suffer from "dancing" pixels when the image moves, which technique would I use?

This would be using XBox360/PS3 GPUs.

Note that the 16x16 image only needs to contain a very "generalised" representation of the original image - almost like a rough-estimate of colour.

Doing a direct downsample results in pixels coming in/out of the sampling so you get a dancing/disco effect when the image moves.

Thanks for any help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

青衫负雪 2024-11-26 00:32:10

您需要使用平均而不是下采样。例如,将每个像素设置为 80x45 像素块的平均值将从 1280x720 图像中得到 16x16 图像。请注意,这会改变纵横比...

我应该澄清的是,您不一定必须对整个块进行平均 - 您可以对其中的每个其他像素或任何您想要的进行平均。但考虑的像素越多,该值就越准确。您还可以使用其他统计度量——跨渠道的众数或中值也可以起作用。

You'll want to use averaging instead of downsampling. For instance, setting each pixel to the average value of an 80x45 pixel block will give you a 16x16 image from a 1280x720 image. Note that that would alter the aspect ratio though...

I should clarify that you don't necessarily have to average the entire block -- you could average every other pixel in it or whatever you want. But the more pixels you account for, the more accurate the value would be. You could also use other statistical measures -- the mode or median values across channels could also work.

披肩女神 2024-11-26 00:32:10

提供最佳质量的下采样滤波器是进行 2D 傅里叶变换,仅选择低频并对低分辨率图像进行傅里叶逆变换。

显然,这不是最快的方法,并且在缩放和处理颜色通道方面可能存在小问题。

The downsampling filter that will give the best quality is to do a 2D Fourier transform, select only the low frequencies and do an inverse Fourier transform into the low resolution image.

Obviously this won't be the fastest method and there may be minor issues with scaling and handling the color channels.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文