该数据结构是合适的查询"在距离d的所有点从点P" [英] which data structure is appropriate to query "all points within distance d from point p"

查看:143
本文介绍了该数据结构是合适的查询"在距离d的所有点从点P"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个三维点云,我想有效地查询内距离d的所有点从任意点p(它不一定是所存储的点云的一部分)

I have a 3D pointcloud and I'd like to efficiently query all points within distance d from an arbitrary point p (which is not necessarily part of the stored pointcloud)

查询看起来像

Pointcloud getAllPoints(Point p, float d);

什么accelerationstructure将是适宜的?一系列树似乎只适合查询长方形卷,而不是球体体积的(当然我可以查询球体boundingBox的,然后挑选出比d大距离的所有顶点 - 但也许有更好的方法来做到这个?)

what accelerationstructure would be appropriate for this? A range-tree seems to be appropriate only for querying rectangular volumes, not sphere volumes (of course I could query the boundingbox of the sphere and then sort out all vertices that have larger distance than d - but maybe there is a better way to do this??)

谢谢!

根据Novelocrats建议,我尝试定义所述结构的期望的功能:

according to Novelocrats suggestion, I try to define the desired functions of the structure:

SearchStructure Create(Set<Point> cloud) 
Set<Point> Query(SearchStructure S, Point p, float maxDistance)
SearchStructure Remove(Point p)
SearchStructure Insert(Point p)
SearchStructure Displace(Set<Point> displacement) //where each value describes an offsetVector to the currently present points

一般,正查询后,将分得到位移和几个(未许多!)插入和缺失制成。相比于所有点的boundingBox的偏移向量是非常小的。

Usually, after n queries, the points get displaced and a few (not many!) insertions and deletions are made. the offset vectors are very small compared to the boundingbox of all points

推荐答案

你想要的是分解的空间,使特定区域可以有效地发现的结构。一个正确分解的八叉树 kd树的应该让你这样做很好,因为你会包含您点的树只有开放的部分 P 找点附近。这应该让你把一个相当低的渐近势必对你有多少加分,需要比较距离(知道下面分解一定程度上,所有的点都足够接近)。不幸的是,我不知道文学在这方面不够好,提供更详细的指针。我的这些事情遇到的是从巴恩斯必胜客N体模拟算法。

What you want is a structure that decomposes space so that particular regions can be found efficiently. A properly decomposed octree or kD-tree should allow you to do this well, as you would only 'open' the section of the tree containing your point p to look for points nearby. This should let you put a fairly low asymptotic bound on how many extra points you need to compare distance to (knowing that below some level of decomposition, all points are close enough). Unfortunately, I don't know the literature in this area well enough to give more detailed pointers. My encounter with these things is from the Barnes-Hut n-Body simulation algorithm.

下面的另一个问题密切相关的这一个。 和另一个。 和第三,提一个数据结构(希尔伯特R树),我没有previously听说过。

Here's another question closely related to this one. And another. And a third, mentioning a data structure (Hilbert R-Trees) that I hadn't previously heard of.

这篇关于该数据结构是合适的查询&QUOT;在距离d的所有点从点P&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆