到最近邻居的平均距离的近似值?
我正在寻找另一种算法:最近邻问题的平均距离的免费 C/C++ 实现。
所以基本上我有一个 3D 点云,我想要所有点与其各自最近邻居之间距离的平均值。因此,最简单的方法是找到每个点的最近邻居,计算该邻居到该点的距离,然后将这些距离的总和除以点数。然而,还有更好的算法,因为它有很多冗余并且近似运行得更快。我正在寻找这些更好算法的免费 C/C++ 实现。
如果可以,则为 ε 近似值。
And another algorithm I'm looking for: A free C/C++ implementation of the average distance to nearest neighbour problem.
So basically I have a cloud of points in 3D and I want the average over the distances between all points and their respective nearest neighbours. So easiest way to do this would be to find the nearest neighbour for every point, calculate the distance of that neighbour to the point, and devide the sum of those distances by the number of points. However, there are much better algorithms, as this has much redundancy and approximates run even faster. I'm looking for a free C/C++ implementation of those better algorithms.
An ε-Approximate if fine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
C++ 库 FLANN 允许您执行“快速近似最近-邻居搜查。”它是用 C++ 编写的,据称是此类搜索的最快实现之一。
希望这有帮助!
The C++ library FLANN allows you to do "fast approximate nearest-neighbor searches." It's written in C++ and claims to be one of the fastest implementations of this sort of search available.
Hope this helps!
您可以尝试使用四叉树,如此问题中所述。其他 3D/2D 图形库中也有许多针对您的问题的实现。
几年前,我在一个项目中使用过 GEOS,即“开源几何引擎”,并且非常满意。
You might try a Quadtree, as described in this question. There are many implementations for your problem in other 3D/2D graphic libraries, too.
I used GEOS, the 'Geometry Engine, Open Source' once in a project some years ago and was very satisfied.