[Half Paper]GPU-Accelerated Point Cloud Interpolation
“Half Paper”意思指的是本人知道可以实现但是没有来得及做的小文章,不存在东拼西凑沽名钓誉,我没兴趣实现之并发表,但是如果你感兴趣我们可以探讨相关的主题。本文是来自于libMesh一篇有限元相关会议中的一篇论文和写Houdini节点导出流体点云的限制而思考出来的,目的是替代传统的三线性差值点云数据而可以差值出凸壳内任意一点的数据。
GPU-Accelerated Point Cloud Interpolation
Introduction
In natural science, there are many problems which are all could be merged as solving linear system, such as building engineering simulation, heat energy diffusion. Point cloud interpolation should be a very useful tool for solving PCA(Principal Component Analysis) problems, such as volume data interpolation, picture color reconstruction. Origin method, includes linear interpolation. We extend the method about FEM, use GPGPU to accelerate the basic linear algebra operation.
Solution
Assume there is a triangle , with a scalar value on each vertex. And we want to get interpolated value on a point in the convex hull. This forms a linear interpolation function,
The is the area ratio, is the area of triangle . It's very clear that there are also 3 condition,
We re-write it as matrix form below,
The quadratic error basis function is
Let be the next donor mesh points that are closest to . Let represent the value of at the data point . Define a matrix
To get the coefficients we invert a system,
It's very easy to get solutions in 3D case,
and
inverse this matrix would get the ,
The quadratic error is
The is in a terahedron , not planar triangle. Similar the (7) we can get 3D version of this linear system,
after inverse the we can easily obain the . Third order and fourth order requires inverse and linear system.
Half Implementation
Current NVIDIA CUDA CUBLAS library has complete linear algebra support from BLAS1 to BLAS3. It's high efficient to operate matrix and vector in parallel on GPU now, so nearly the all work could be mapped onto GPU. There are maturity linear algebra operator LU released by some researchers from U.C. Berkeley and UNC. Use K-nearest to get some points near the interested position, then apply the above linear system to get the value.
Conclusion
Maybe you will think of that it's not valuable, simple linear interpolation is enough for grid data, to obtain the gradient. To achieve higher accuracy in engineering analysis, it's necessary to get interpolated point data not only in XYZ dimensions but any position. This idea is inspired by a paper about MAE and processing Houdini's fluid grid.