2011年1月20日星期四

今天有看到box filter这名词了, ptex的paper中提到用box filter做symmetric reductions of each texture(also use asymmetric reduction for anisotropic filtering), 于是又想回顾一下这些概念.

什么是filter (filter kernel)? hint: a pattern.
什么是convolution? 什么是image filtering?

Box filter这里的box好像是指这个filter的形状shape, 例如3*3, 而像Bicubic filter这filter的shape在一维来看是曲线,二维来看估计是圆形. (可能用box filter来跟bicubic filter来做比较不是十分合适,我的理解中box filter好像是指一类filter,只要它们的shape都是rectangle, 而bicubic filter好像是特地的一种, 但又可能不是,因为bicubic函数系数不一样得到的curve是不一样的?)

Box filter是系数都是positive, 于是起到的是模糊smooth的效果,而Bicubic filter的系数weight中山有negative的,于是能起到a slight sharpening effect.

在GPU中实现时候为了避免bicubic的计算,可以用look-up table的方法(在CPU中建float-precision texture). 具体看[1].
Reference:

下面是对box filter和bilinear filter的感性区别, box filter是求中间11号texel时候用包括自身在内的9个texel做平均(也可以理解为系数固定的线插interpolation), 而bilinear filter是图片放大or缩小or大小不变但是错位时候求自身texel时候对最近的4个做线插, 线插的系数跟自身texel离那4个texels的距离有关, bilinear filter常见于OpenGL (or GPU hardware) interpolation(texture filtering), 例如在magnification情况下一个texel占了多个pixels, 那每一pixel的color就找最近的4个Texels用bilinear interpolation,这类似于把image缩小,小的image的一个texel相当于在大的image的多个texel的线插.

没有评论:

发表评论