我有一个大小为AxBxC的3D网格,网格中的点之间的距离为d。给定若干点,给出以下假设,找出每个网格点的最近点距离(每个网格点应包含到点云最近点的距离)的最佳方法是什么?查找到统一网格上的点云中最近点的距离
假设有A,B和C是相当大的相对于d,给人的也许500x500x500一个网格,将有大约1万点。
另外假设,如果到最近点的距离超出距离D,我们不关心最近点距离,并且可以安全地设置为一个大数目(D可能是d的2到10倍)
由于会有的网格点和点大量从一个简单的穷举搜索:
for each grid point:
for each point:
if distance between points < minDistance:
minDistance = distance between points
是不是一个很好的选择。
我想这样做的线沿线的东西:
create a container of size A*B*C where each element holds a container of points
for each point:
define indexX = round((point position x - grid min position x)/d)
// same for y and z
add the point to the correct index of the container
for each grid point:
search the container of that grid point and find the closest point
if no points in container and D > 0.5d:
search the 26 container indices nearest to the grid point for a closest point
.. continue with next layer until a point is found or the distance to that layer
is greater than D
基本上是:把点水桶和做一个径向向外搜索,直到找到每个网格点一个百分点。这是解决问题的好方法,还是有更好/更快的方法?优选用于平行化的解决方案。
我认为@Mark强调了一个非常重要的观点:这是一次性计算还是云计算会在每个步骤之间进行并发生相同的计算?一个易于更新的结构将是至关重要的,如果多个计算将被链接,因此它将形成解决方案... – 2010-04-29 11:10:23
对不起,我错过了指出。点云确实会移动,计算必须在每个时间步重新进行。 – erik 2010-04-29 14:12:13