计算点的面积
我无法在谷歌中找到好的答案,或者也许我只是错过了正确的关键词。欢迎任何帮助或建议!
我的问题如下: 我想计算某个点云覆盖的面积(二维)。我知道从数学上讲面积是 0,但我只能从正确的分布中取出样本点。另外,我没有关于点云边界的任何信息,每种形状都是可能的,包括孔等。所以使用流形边界的算法将不起作用?!。
由于我正在使用的函数是平滑的,我可以假设点之间的空间也属于我想要计算的区域。
目前,我将空间分成许多小盒子,并计算有多少个盒子填充了一个或多个点。计数乘以盒子大小就得出了面积。
有更优雅的解决方案吗?有什么想法吗?
谢谢 托马斯
编辑:
我所做的是将高维点投影到低维嵌入。我可以确定高维空间中的点数,因此也可以确定低维空间中形成我想要计算的区域的点数。如果我增加点数,结果发现它们位于“旧”点之间,这就是我所说的平滑。给定某个点,我可以假设在该点周围的某个附近,如果我采样更密集,我将能够找到属于该区域的新点。
另外,我有一个阈值,在该阈值下我可以认为两个点“相等”,或者换句话说,我知道我想要实现哪个结果。
编辑2:
我使用 GPLVM 来进行从高维空间到低维空间的映射。所以我认为直接分析是两个困难/不可能的。它们不是很直观,我认为在这种情况下,直接使用二维点会更容易......
I was not able to find good answers in Google, or perhaps I am just missing the correct key words. Any help or suggetions are welcome!
My problem is the following:
I want to calculate the area a certain point cloud covers (in 2D). I know that mathematically speaking the area is 0, but I am only able to take sample points out of the correct distribution. Additionally I do not have any information about the boundary of the point cloud, every shape is possible, including holes etc. So algorithms using the boundary of a manifold will not work?!.
Since the functions I am working with are smooth I can assume that the space in between points also belongs to the area I want to calculate.
At the moment I divide the space into a lot of small boxes and count how many boxes are populated with one or more points. The count multiplied with the box size gives me an area.
Is there a more elegant solution to this? Any ideas?
Thanks
Thomas
EDIT:
What I do is projecting high dimensional points to a low dimensional embedding. I can determine the number of points in the high dimensional space and therefore also the number of points in the low dimensional space which form the area I want to calculate. If I increase the number of points it turns out that they are positionned between the "old" points, that is what I mean by smooth. Given a certain point I can assume that in some proximity around that point I will be able to find new points belonging to the area if I sample more dense.
Additionally I have a threshold value at which I can consider two points to be "equal", or in other words I know which resulution I want to achieve.
EDIT 2:
I use GPLVM's to do the mapping from high dimensional space to low dimensional space. So I think analysing that directly is two difficult/not possible. They are not very intuitive and I think in that case it is easier to work directly with the two dimensional points...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一种选择是找到点集的凸包,即包含所有点的凸多边形。获得多边形后,您就可以找到覆盖的区域。
当然,这不能处理您的底层分布有漏洞的情况,在这种情况下,我想不出比您的盒子放置变体更好的解决方案。
One option would be to find the convex hull of your set of points, that is, the convex polygon that contains all your points. Once you have the polygon, you can then find the area covered.
Of course, this won't handle the case where your underlying distribution has holes though, in which case I can't think of a better solution than your box-laying variant.
有一种简单的统计方法(参见 Tuomi 和 Larjavaara,QJR Meteorol.Soc.(2005)131,第 1191 页,附录)。一组相当规则的点(例如雷电室下的闪电)的代表性区域为 A = 12 Sx Sy sqrt(1 - R2)。标准偏差 Sx 和 Sy(乘以常数)定义一个矩形,相关因子(R 是相关系数)说明矩形的大部分被点有效覆盖。这个结果不是高等数学,但在实践中效果很好,例如,估计细胞的闪电密度。 - 拓米
There is a simple statistical approach (see Tuomi and Larjavaara, QJR Meteorol. Soc. (2005) 131, p. 1191, Appendix). A representative area of a reasonably regular set of points (say lightning strikes under a thundercell) is A = 12 Sx Sy sqrt(1 - R2). The standard deviations Sx and Sy (times a constant) define a rectangle, and the correlation factor (R is the correlation coefficient) tells how large part of the rectangle is effectively covered by the points. This result is not high mathematics but works well in practice for, say, estimating the lightning flash density of a cell. - Tuomi
您需要对这里所说的面积的含义给出更多定义。如果点之间的空间全部被填满,则只需对边界点进行采样并计算多边形的面积即可。但是,如果您可以对完整分布进行采样并确定仓位是处于已填充区域还是处于空区域,那么您的方法就更有意义。
我看不出底层分布是如何平滑变化的——看起来要么是一个点被填充,要么没有。但是,如果您对密度分布进行采样,其中每个位置都有可变的密度,那么您实际上是在执行面积积分或求积,对此有多种方法可以近似基础分布:一个分析函数。
如果基础分布不是连续的(平滑变化)而是离散的,那么您就可以有效地找到分形的面积。为此,您需要通过您的方法多次评估该区域,以获得越来越细的网格,直到该值停止变化。对于分形,值永远不会停止变化,但对于有限数据集,它最终会停止。
You need to give some more definition on what you mean by area here. If all the space between points is filled, then just sample the boundary points and calculate the polygon's area. However, if you can sample the full distribution and determine both whether a position is in a filled or an empty area, then your approach makes more sense.
I can't see how the underlying distribution varies smoothly - either a point is filled or not, it would seem. However, if you are sampling a density distribution, where there is a variable density at each position, then you are actually performing an area integral or quadrature, for which there are many ways of approximating the underlying distribution with an analytic function.
If the underlying distribution is not continuous (varying smoothly) but discrete, then you are effectively finding the area of a fractal. For that, you need to evaluate the area via your method several times for increasingly fine grids, until the value stops changing. For a fractal, the value never stops changing, but for a finite dataset it will stop eventually.