到最近邻居的平均距离的近似值?

发布于 2024-12-03 07:09:20 字数 213 浏览 3 评论 0原文

我正在寻找另一种算法:最近邻问题的平均距离的免费 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

貪欢 2024-12-10 07:09:20

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!

最美的太阳 2024-12-10 07:09:20

您可以尝试使用四叉树,如此问题中所述。其他 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文