vtkWindowedSincPolydataFilter 是 VTK Polydata 的很有用的平滑类。但是这个函数使用的数学理论很多,因此专门分析一下这个类。

1. 参考的论文:

“Optimal Surface Smoothing as Filter Design” G. Taubin, T. Zhang and G. Golub. (Zhang and Golub are at Stanford University

2. 论文下载地址:

https://link.springer.com/content/pdf/10.1007/bfb0015544.pdf

3. VTK 中的注释翻译

This report discusses using standard signal processing low-pass filters (in particular windowed sinc functions) to smooth polyhedra. The
transfer functions of the low-pass filters are approximated by Chebyshev polynomials. This facilitates applying the filters in an
iterative diffusion process (as opposed to a kernel convolution). The more smoothing iterations applied, the higher the degree of polynomial approximating the low-pass filter transfer function. Each smoothing iteration, therefore, applies the next higher term of the Chebyshev filter approximation to the polyhedron. This decoupling of the filter into an iteratively applied polynomial is possible since the Chebyshev polynomials are orthogonal, i.e. increasing the order of the approximation to the filter transfer function does not alter the previously calculated coefficients for the low order terms.

本报告讨论使用标准信号处理低通滤波器 (尤其是加窗的sinc函数)平滑多面体。这个低通滤波器的传递函数近似为切比雪夫多项式。这有助于在迭代扩散过程(与核卷积相反)。这个应用的平滑迭代次数越多,多项式次数越高近似低通滤波器传递函数。每次平滑因此,迭代应用切比雪夫函数的下一个较高项多面体的过滤器近似。
滤波器的解耦由于切比雪夫多项式是正交的,也就是说,增加滤波器传递函数的近似阶数不会改变先前计算的低阶项系数,因此可以将其转换为迭代应用的多项式。

Note: Care must be taken to avoid smoothing with too few iterations. A Chebyshev approximation with too few terms is an poor approximation. The first few smoothing iterations represent a severe scaling and translation of the data. Subsequent iterations cause the smoothed polyhedron to converge to the true location and scale of the object.
We have attempted to protect against this by automatically adjusting the filter, effectively widening the pass band. This adjustment is only
possible if the number of iterations is greater than 1. Note that this sacrifices some degree of smoothing for model integrity. For those
interested, the filter is adjusted by searching for a value sigma such that the actual pass band is k_pb + sigma and such that the
filter transfer function evaluates to unity at k_pb, i.e. f(k_pb) = 1

注意:必须小心避免迭代次数太少而导致平滑。项太少的切比雪夫近似是一种较差的近似。前几个平滑迭代表示严重的缩放和数据的翻译。后续迭代会导致平滑多面体以收敛到对象的真实位置和比例。我们试图通过自动调整滤波器,有效地拓宽了通带。此调整仅限于如果迭代次数大于1,则可能。请注意为了模型的完整性,牺牲了一定程度的平滑。对于那些感兴趣的是,通过搜索值sigma来调整过滤器
实际通带为 k_pb+sigma 滤波器传递函数在 k_pb 处计算为单位,即f(k_pb)=1

To improve the numerical stability of the solution and minimize the scaling the translation effects, the algorithm can translate and scale the position coordinates to within the unit cube [-1, 1], perform the smoothing, and translate and scale the position coordinates back to the original coordinate frame. This mode is controlled with the NormalizeCoordinatesOn() / NormalizeCoordinatesOff() methods. For legacy reasons, the default is NormalizeCoordinatesOff.

为了提高解的数值稳定性并最小化平移效果的缩放,该算法可以将位置坐标平移和缩放到单位立方体[-1,1]内,执行平滑,并将位置坐标平移和缩放回原始坐标系。此模式由NormalizeCoordinationson()控制/NormalizeCoordinatesOff()方法。由于遗留原因,默认
是normalizecoordinationsoff。

This implementation is currently limited to using an interpolation kernel based on Hamming windows. Other windows (such as Hann, Blackman, Kaiser, Lanczos, Gaussian, and exponential windows) could be used instead.
此实现目前仅限于使用插值基于Hamming windows的内核。可以使用其他窗口(如Hann、Blackman、Kaiser、Lanczos、Gaussian和指数窗口)。

There are some special instance variables used to control the execution of this filter. (These ivars basically control what vertices can be smoothed, and the creation of the connectivity array.) The BoundarySmoothing ivar enables/disables the smoothing operation on vertices that are on the “boundary” of the mesh. A boundary vertex is one that is surrounded by a semi-cycle of polygons (or used by a single line).

有一些特殊的实例变量用于控制此过滤器的执行。(这些参数基本上控制哪些顶点可以平滑,以及连接数组的创建。)BoundarySmoothing 参数 启用/禁用网格“边界”上顶点的平滑操作。边界顶点是由多边形的半圆形(或由一条直线使用)包围的顶点。

Another important ivar is FeatureEdgeSmoothing. If this ivar is enabled, then interior vertices are classified as either “simple”, “interior edge”, or “fixed”, and smoothed differently. (Interior vertices are manifold vertices surrounded by a cycle of polygons; or used by two line cells.) The classification is based on the number of feature edges attached to v. A feature edge occurs when the angle between the two surface normals of a polygon sharing an edge is greater than the FeatureAngle ivar. Then, vertices used by no feature edges are classified “simple”, vertices used by exactly two feature edges are classified “interior edge”, and all others are “fixed” vertices.

另一个重要的参数是 FeatureEdgeSmoothing。如果启用此参数,则内部顶点将分类为“简单”、“内部边”或“固定”,并以不同方式进行平滑。(内部顶点是由多边形循环包围的多个顶点;或由两个线单元使用。)分类基于附着到v的特征边的数量。当共享边的多边形的两个曲面法线之间的角度大于特征角度参数时,就会出现特征边。然后,将无特征边使用的顶点分类为“简单”,将正好两条特征边使用的顶点分类为“内部边”,其他所有顶点都是“固定”顶点。

Once the classification is known, the vertices are smoothed differently. Corner (i.e., fixed) vertices are not smoothed at all. Simple vertices are smoothed as before . Interior edge vertices are smoothed only along their two connected edges, and only if the angle between the edges is less than the EdgeAngle 参数.
一旦知道分类,顶点将以不同的方式进行平滑。角点(即固定)顶点根本不会平滑。简单顶点会像以前一样平滑。仅当两条连接边之间的角度小于EdgeAngle 参数时,内部边顶点才会沿其两条连接边进行平滑。

The total smoothing can be controlled by using two ivars. The NumberOfIterations determines the maximum number of smoothing passes. The NumberOfIterations corresponds to the degree of the polynomial that is used to approximate the windowed sinc function. Ten or twenty iterations is all the is usually necessary. Contrast this with vtkSmoothPolyDataFilter which usually requires 100 to 200 smoothing iterations. vtkSmoothPolyDataFilter is also not an approximation to an ideal low-pass filter, which can cause the geometry to shrink as the amount of smoothing increases.

可以使用两个IVAR来控制总平滑。这个NumberOfIterations确定平滑过程的最大数量。NumberOfIterations对应于多项式的次数
用于近似窗口sinc函数。十或二十迭代通常是所有必要的。将此与vtkSmoothPolyDataFilter,通常需要100到200平滑
迭代。vtkSmoothPolyDataFilter也不是理想的低通滤波器,随着平滑量增加,几何体会缩小;

The second ivar is the specification of the PassBand for the windowed sinc filter. By design, the PassBand is specified as a doubleing point number between 0 and 2. Lower PassBand values produce more smoothing. A good default value for the PassBand is 0.1 (for those interested, the PassBand (and frequencies) for PolyData are based on the valence of the vertices, this limits all the frequency modes in a polyhedral mesh to between 0 and 2.)

第二个参数是加窗的sinc滤波器的滤波通带。根据设计,滤波通带被指定为一个双精度浮点类型数字介于0和2之间。通带值越低,平滑度越高。通带的良好默认值为0.1(对于感兴趣的人PolyData的通带(和频率)基于顶点,这将多面体网格中的所有频率模式限制为介于0和2之间。)

There are two instance variables that control the generation of error data. If the ivar GenerateErrorScalars is on, then a scalar value indicating the distance of each vertex from its original position is computed. If the ivar GenerateErrorVectors is on, then a vector representing change in position is computed.

有两个实例变量控制错误的生成数据如果启用了参数 GenerateErrorScalars,则标量值指示计算每个顶点与其原始位置的距离。如果GenerateErrorVectors启用,则表示向量的方式表示计算得到的位置变化。

[VTK] vtkWindowedSincPolyDataFilter 源码注释解读相关推荐

  1. socket第三方库 AsyncSocket(源码注释解读.转)

    作者 OneTea 关注 2016.09.19 11:33* 字数 0 阅读 83评论 0喜欢 1 #import <Foundation/Foundation.h> @class Asy ...

  2. vue源码深入解读MVVM(视图模板引擎),你真的了解双向绑定(v-model),数据劫持(observe),发布订阅模式吗?带你手鲁mvvm引擎。源码奉上(详细注释)!

    文章目录 #1.vue的强大之处不必细说,vue的核心v-model的实现原理,网上都有很多.但是真正自己实现双向绑定,mvvm的源码却几乎没见过. #1.2本人根据源码的解读,理解,以及借鉴网上的视 ...

  3. 基于stm32、0.96寸OLED实现的贪吃蛇小游戏(详细源码注释)

    简介:本实验基于stm32最小系统.0.96寸OLED(68*128)和摇杆实现一个经典的贪吃蛇小游戏.项目源码地址:点击下载. 硬件设计: 普通摇杆,0.96寸OLED 单色屏幕(SPI协议通讯), ...

  4. 基于stm32、0.96寸OLED实现的俄罗斯方块小游戏(详细源码注释)

    概述:本实验基于stm32最小系统.0.96寸OLED(68*128)和摇杆实现一个经典的俄罗斯方块小游戏.项目源码地址:点击下载. 硬件要求: 普通摇杆,两个电位器和一个开关组成,左右摇动控制一个电 ...

  5. java-List集合的源码分析(数据结构方面,源码注释方面),迭代器快速失败机制

    List实现了Collection接口,产生三个子类:ArrayList,LinkedList,Vector 文章包含解释方面: 数据结构方面, 源码注释方面&迭代器快速失败机制 方面1-基于 ...

  6. 浅析NameNode/DataNode/SecondaryNameNode源码注释

    NameNode源码注释 /*********************************************************** NameNode serves as both di ...

  7. NeRF 源码分析解读(一)

    NeRF 源码解读(一) 前言 NeRF 是三维视觉中新视图合成任务的启示性工作,最近领域内出现了许多基于 NeRF 的变种工作.本文以pytorch 版 NeRF 作为基础对 NeRF 的代码进行分 ...

  8. ucosiii源码注释

    源码注释看↓ uC/OS-III - 标签 - 飞起的小田 - 博客园https://www.cnblogs.com/tianxxl/tag/uC%2FOS-III/ 自己的一些理解: 1.keil ...

  9. MTCNN源码详细解读(1)- PNet/RNet/ONet的网络结构和损失函数

    代码地址 https://github.com/AITTSMD/MTCNN-Tensorflow 这里我就不在进行MTCNN的介绍了.分析的再清楚都不如从源码的实现去分析. Talk is cheap ...

最新文章

  1. RabbitMQ指南(中)
  2. 谷歌又放大招:视觉效果完胜其他SOTA的风格迁移网络,手机端可达实时4K
  3. 如何在Node.js的httpServer中接收前端发送的arraybuffer数据
  4. 我和计算机比本领教案反思,《比本领》教学设计及反思
  5. Cesium:显示一个3D地球
  6. java velocity js_JavaScript 模板引擎 Velocity.js_js
  7. 解决win7无法共享问题
  8. excel数据透视表之交叉表分组
  9. RT-Thread定时器
  10. java程序控制马达_java控制步进电机
  11. 实现 RecyclerView 上拉加载及自动加载
  12. 利用GitHub Actions每天自动从Pixiv爬虫日推图片并存放到仓库
  13. 速学TypeScript-精简划重点手册-上册
  14. h5/5+APP消息推送神器:Goeasy.js
  15. Python爬虫【如何爬取内容(html)和解析内容】
  16. 什么是SQL注入攻击?SQL注入攻击的危害以及防护
  17. 韦东山:驱动和APP,根本不应该上升到互相鄙视的地步
  18. 计算机在储存波形,安泰示波器维修分享--泰克数字示波器的存储功能详解
  19. JVM(六)---jvm压缩指针
  20. IT项目量化管理:细化、量化与图形化 与 中国IT项目实施困惑

热门文章

  1. matchQuery matchPhraseQuery multiMatchQuery
  2. 苹果终端date命令_mac 终端 常用指令
  3. 总结kafka的consumer消费能力很低造成重复消费死循环的情况下的处理方案
  4. 最新最全文献下载网站:文献部落——一站式查找、下载文献!
  5. 13-多线程01 实现多线程 线程同步 生产者消费者
  6. 有源信号分辨率太高,导致投影扩展到第二显示器黑屏问题解决
  7. 4.pdx变量绑定。
  8. 国产数据库发展简史与趋势
  9. 计算机《展示设计》教案,新颖的电脑教案
  10. 兄弟元素的弟弟元素如何选中前面的哥哥元素