这个系列是GAMES301-曲面参数化(GAMES 301: Surface Parameterization)的同步课程笔记。课程内容涉及曲面参数化的基本理论与问题描述、面向离散网格的参数化、基于基函数表示的连续参数化、共形参数化、曲面参数化的应用等。本节课继续介绍参数化在相关产业中的应用,并对课程内容进行总结。
参数化在三维扫描工业的应用
三维重建
三维重建是计算机视觉中的经典问题,我们希望能够从不同视角的图片中来还原三维空间中的物体。
![](https://search.pstatic.net/common?src=https://i.imgur.com/Jgxqzk0.png)
根据多视图几何(multiview geometry)的理论,当我们已知相机的内外参数时可以从多个相机的图像来计算空间点的坐标。
![](https://search.pstatic.net/common?src=https://i.imgur.com/1X0VZVa.png)
除了利用特征点匹配来进行重建外,我们还可以主动发射一些结构光来恢复空间点的坐标。这种方式一般称为主动重建。
![](https://search.pstatic.net/common?src=https://i.imgur.com/DsUaH12.png)
三维扫描仪
目前三维重建工作可以使用专业的三维扫描仪来完成,它通过不同视角的扫描结果来重建高精度的物体表面信息。其扫描过程的基本逻辑包括由二维图像来获取深度信息重建三维点云,以及从三维点云获取位姿信息重建物体表面两步。
![](https://search.pstatic.net/common?src=https://i.imgur.com/ls3C9fj.png)
根据发射结构光方式的不同,三维扫描仪可以分为才是扫描仪、激光扫描仪等。
![](https://search.pstatic.net/common?src=https://i.imgur.com/FZzsCIh.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/saf3YFV.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/gNL3cwp.png)
整个重建过程只需要用户环绕目标进行扫描即可。
![](https://search.pstatic.net/common?src=https://i.imgur.com/HGSA59S.png)
从算法流程上来讲,三维扫描重建需要进行标定、结构光重建、位姿跟踪、点云注册以及点云网格化等步骤来获得网格模型,然后通过网格处理、纹理融合、纹理参数化等步骤来获得高精度模型。在本节课中我们主要介绍纹理融合以及参数化技术在其中的应用。
![](https://search.pstatic.net/common?src=https://i.imgur.com/SEkMpMH.png)
三维扫描仪一般会有专门的纹理相机来收集不同位姿下物体的纹理图像,这样当我们重建完网格后就可以根据网格上每个面片的位置和法向等信息来选择合适的纹理,最后把整个网格的纹理信息排布到纹理图上。
![](https://search.pstatic.net/common?src=https://i.imgur.com/QxUwWJ6.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/6JCCt9X.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/ZTVl38a.png)
这种分块纹理图的保存方式易于实现,而且在计算上也比较简单。但其缺陷在于整个纹理图的碎片化,同时纹理图上也有着大量的冗余信息,更严重的是网格分片的交界处会出现纹理坐标不唯一的问题。
![](https://search.pstatic.net/common?src=https://i.imgur.com/4Lz5DCK.png)
要解决这样的问题可以借助纹理参数化展开的技术,从而得到一致的纹理图像。
![](https://search.pstatic.net/common?src=https://i.imgur.com/ZcdZ5kk.png)
纹理参数化及其应用
Atlas生成的目标是获得模型空间到纹理空间的映射,它一般包括模型的切割、参数化以及排布等几个步骤。
![](https://search.pstatic.net/common?src=https://i.imgur.com/DJSZUIn.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/FX882H1.png)
在三维重建中我们希望atlas生成的计算效率尽可能高,同时参数化的结果要有比较小的扭曲而且切割模型的割缝要尽可能短。
![](https://search.pstatic.net/common?src=https://i.imgur.com/vpYIA3D.png)
在算法实现方面,一般会先结合网格简化的技术来降低计算复杂度,然后在简化的网格上进行分割以及参数化。
![](https://search.pstatic.net/common?src=https://i.imgur.com/dVNZLfK.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/kPXrkWN.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/EtE3LuU.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/N1JYIIa.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/ECu1XTh.png)
在应用层面,目前三维扫描技术在口腔诊断中有着广阔的前景。和传统通过口腔镜进行诊断相比,三维扫描可以快速地获得患者口腔的三维模型并且可以方便医生无死角地观察患者的病灶,从而加快诊断和治疗的过程。
![](https://search.pstatic.net/common?src=https://i.imgur.com/dvOCTnI.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/aAKv7CE.png)
而结合参数化技术我们还可以把患者的牙齿展开到二维平面上,并且结合人工智能技术在二维纹理图像上进行自动诊断。对于这种应用场景,我们希望参数化算法可以不对网格进行分片,同时可以控制不同区域投影到参数平面上的面积。
![](https://search.pstatic.net/common?src=https://i.imgur.com/ubivLMb.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/kPlvw0Y.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/B1K7aW5.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/1tH5ZNU.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/zY5F6Gl.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/zxPlmfx.png)
参数化在工业软件中的应用
几何设计在现代制造业中有着大量的应用。以汽车制造为例,我们需要合适的曲面来描述汽车的外形。
![](https://search.pstatic.net/common?src=https://i.imgur.com/kCDbFVQ.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/cJYFQM3.png)
整个制造业经历过手工制图到计算机制图的进步。
![](https://search.pstatic.net/common?src=https://i.imgur.com/96Ln52C.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/8EZnPHi.png)
CAD
计算机辅助设计(computer aided design, CAD)的目标是利用计算机来辅助工程设计人员完成几何造型工作,其内核一般包括几何造型引擎和几何计算引擎两部分。
![](https://search.pstatic.net/common?src=https://i.imgur.com/cKDouCm.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/KNkq1QS.png)
以汽车的造型设计为例,整车的设计一般包括数以万计的构件。如何协调每一个构件的设计至今仍然是一个难题。
![](https://search.pstatic.net/common?src=https://i.imgur.com/NXNIW6H.png)
CAE
与CAD类似的还有计算机辅助工程(computer aided engineering, CAE),在CAE中我们更关心产品的各种力学性能从而优化构件设计。
![](https://search.pstatic.net/common?src=https://i.imgur.com/5eOJl9h.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/PVHKgIg.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/mgH0X67.png)
目前基于有限元的数值模拟试验已经成为制造业产品设计流程中的必要一环,在进行实际试验前往往需要先通过数值试验来测试产品的性能。
![](https://search.pstatic.net/common?src=https://i.imgur.com/qqGhxP0.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/BgxhvAU.png)
IGA-FEM
目前主流的CAD和CAE软件之间一般还是相互独立的,在使用CAE软件进行仿真前需要导入CAD模型并离散成网格才能进行求解。其中利用CAD模型生成网格的步骤往往占据了80%以上的时间,成为整个工程设计分析过程的瓶颈。
![](https://search.pstatic.net/common?src=https://i.imgur.com/boao0Mi.png)
因此美国科学院院士T. J. R. Hughes教授提出了等几何分析(isogeometric analysis, IGA)的概念,通过直接在CAD模型上求解PDE的方式来避免耗时的网格生成过程。
![](https://search.pstatic.net/common?src=https://i.imgur.com/TofWJFj.png)
基于IGA的概念,我们可以把FEM的问题转换为先通过映射\(G\)将某个规范域\(\hat{\Omega}\)映射到求解域\(\Omega\)上,然后在\(\Omega\)上求解所需的PDE。
![](https://search.pstatic.net/common?src=https://i.imgur.com/dDGBbEa.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/RNppmeO.png)
计算映射\(G\)的本质是求解区域参数化(domain parameterization),它的目标是把一个指定图形的边界映射到规范区域上。当然这样的映射需要满足双射、低几何扭曲的条件。
![](https://search.pstatic.net/common?src=https://i.imgur.com/BA2XWGO.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/ox4Cnh3.png)
常见的区域参数化方法如下。
![](https://search.pstatic.net/common?src=https://i.imgur.com/Vgp0ik5.png)
Coons Surfaces
![](https://search.pstatic.net/common?src=https://i.imgur.com/eJoJUUT.png)
Harmonic Map
![](https://search.pstatic.net/common?src=https://i.imgur.com/89vIwyj.png)
Nonlinear Optimization
![](https://search.pstatic.net/common?src=https://i.imgur.com/rb2swMz.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/GS0OgZL.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/jEPWPsk.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/fttLmNQ.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/jNJnuh9.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/NsFadVK.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/ZJmdwCc.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/WyPOTdd.png)
Local Refinable Splines
![](https://search.pstatic.net/common?src=https://i.imgur.com/2D2PPDY.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/t519CT0.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/1aCUquM.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/WDmMRpZ.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/nCSf5uZ.png)
Multi-Patch Parameterizations
![](https://search.pstatic.net/common?src=https://i.imgur.com/G5PSvTg.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/cxaS6HB.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/uNqdaUO.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/9FcT0P8.png)
TCB-Splines
![](https://search.pstatic.net/common?src=https://i.imgur.com/c1E1vhb.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/T97u3kq.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/HFo5js7.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/CmE97Fq.png)
其他类型的参数化
封闭曲面的参数化
对于不是拓扑同胚于圆盘的封闭曲面,我们一般需要先将模型切开才能进行参数化。
![](https://search.pstatic.net/common?src=https://i.imgur.com/eiYACjE.png)
但实际上我们并不需要将封闭曲面参数化到平面上。对于亏格为0的封闭曲面,其拓扑同胚于球面。因此我们可以把这样的曲面参数化到一个球面上,这样的过程称为球面参数化(spherical parameterization)。
![](https://search.pstatic.net/common?src=https://i.imgur.com/YavL7wZ.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/YixeDFI.png)
球面参数化相对比较小众,其主要方法如下。
![](https://search.pstatic.net/common?src=https://i.imgur.com/mEOhuan.png)
Direct Methods
![](https://search.pstatic.net/common?src=https://i.imgur.com/qfCdQMO.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/hfgJjJR.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/dIheqFq.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/ZUEwpHt.png)
Optimization Methods
![](https://search.pstatic.net/common?src=https://i.imgur.com/G5ZDvMG.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/RDFRIbH.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/7OYU0RI.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/1wIMcPU.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/W2nqoq5.png)
Coarse-to-Fine Methods
![](https://search.pstatic.net/common?src=https://i.imgur.com/NSuohVP.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/zCOMapw.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/g0sIoKp.png)
其他类型的参数化
更进一步,参数化的目标域不一定要局限于二维平面。实际上球面、流形以及双曲空间都可以是参数化的目标域。
![](https://search.pstatic.net/common?src=https://i.imgur.com/EkkuT3S.png)
对于一些高亏格的曲面可能很难直接找到合适的目标域,此时可以把曲面参数化到若干个相互连接的长方体上,这种方法称为PolyCube参数化。对于点云这种没有连接关系的数据结构,我们同样可以把它们参数化到平面上。
![](https://search.pstatic.net/common?src=https://i.imgur.com/YpYI0xf.png)
高维数据的参数化
如果我们把处理的对象从曲面推广到更高维的数据,我们就得到了流形学习(manifold learning)的概念。它的本质在于尽管数据的表示是高维的,在局部每个数据点上都拓扑同胚于一个圆盘,即数据位于一个低维的流形上。把高维的数据映射到低维进行处理的过程称为降维(dimension reduction)。
![](https://search.pstatic.net/common?src=https://i.imgur.com/0cL6LUy.png)
在深度学习中流行的自编码器(auto-encoder)就可以理解为某种参数化过程。输入数据经过编码器降维到某个隐空间(latent space)上,然后在通过解码器升维来恢复原来的信息。这两个步骤可以分别看做是参数化和拟合的过程。
![](https://search.pstatic.net/common?src=https://i.imgur.com/rOgyX3v.png)
Automatic Differentiation
最近基于自动微分框架的几何处理工具也开始在业界流行起来。TinyAD就是这样的一个计算工具,它可以自动推导目标函数的微分并且利用相应的求解器来计算优化。和传统方法相比,基于这样的框架可以非常方便地编写代码,因此得到了相关从业者的广泛关注。
![](https://search.pstatic.net/common?src=https://i.imgur.com/aWUwW2g.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/BLvDlJJ.png)
![](https://search.pstatic.net/common?src=https://i.imgur.com/bGQuA5F.png)