本文介绍了缩减时,插值算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试着去理解降尺度。我可以看到插值算法,如双三次和近邻可升频时的时候,以填补空白老,已知点之间(像素,如果图像)。

Im trying to understand downscaling. I can see how interpolation algorithms such as bicubic and nearest neighbour can be used when when upscaling, to "fill in the blanks" between the old, known points (pixels, in case of images).

但缩减?我不能看到任何插值技术可以用来在那里。有没有空白填补!

But downscaling? I cant see how any interpolation technique can be used there. There are no blanks to fill!

我一直坚持这样的远久,给我一个轻推在正确的方向。你怎么插值时,其实,除去已知的数据?

Ive been stuck with this for far to long, give me a nudge in the right direction. How do you interpolate when you, in fact, remove known data?

修改:让我们假设我们有一个一维图像,每点一个颜色通道。一家低档次的算法缩放6到3点按平均像素值如下:1,2,3,4,5,6 =(1 + 2)/ 2,(3 + 4)/ 2,(5 + 6)/ 2我是在正确的轨道吗?这是插在缩减,而不仅仅是丢弃数据?

Edit: Lets assume we have a one dimensional image, with one colour channel per point. A downscale algorithm scaling 6 to 3 points by average pixel value looks like this:1,2,3,4,5,6 = (1+2)/2,(3+4)/2,(5+6)/2Am I on the right track here? Is this interpolation in downscaling rather than just discarding data?

推荐答案

在这里,您有原始图像之上,那么天真的去重算法在中间,和内插一个在底部。

Here you have the original image on top, then a naive removal algorithm in the middle, and an interpolating one at the bottom.

考虑一个大的亮点。在中心的光最亮,并且光在边缘处变深。当你闪耀到较远的地方,你会期望的光束突然失去靠近边缘的黑暗,成为光的坚实轮廓?

Consider a big spotlight. The light at the center is the brightest, and the light at the edges become darker. When you shine it farther away, would you expect the light beam to suddenly lose the darkness near the edges and become a solid outline of light?

没有,同样的事情发生在这里的计算器标志。正如你可以在第一降尺度看,画面已经失去了它的边缘柔软,看起来可怕。第二降尺度已经通过平均像素周围保持平滑的边缘。

No, and the same thing is happening here to the stackoverflow logo. As you can see in the first downscaling, the picture has lost the softness in its edges and looks horrible. The second downscaling has kept the smoothness at the edges by averaging the pixel surroundings.

一个简单的卷积滤镜,您可以尝试是增加像素的RGB值和它周围的所有其他像素,并做了一个简单的平均水平。然后替换该值的像素。然后,您可以弃相邻像素,因为你已经列入中央像素的信息。

A simple convolution filter for you to try is to add the RGB values of the pixel and all other pixels surrounding it, and do a simple average. Then replace the pixel with that value. You can then discard the adjacent pixels since you've already included that information in the central pixel.

这篇关于缩减时,插值算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 14:00