大多数“彻底”圆周点的分布 [英] Most "thorough" distribution of points around a circle

查看:318
本文介绍了大多数“彻底”圆周点的分布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题旨在抽象和集中一种方法来解决我在

想象一下,我们有一组圆圈,每个圆圈都有一个圆圈其周围的点数。我们希望找到一个衡量标准,可以在圈子周围均匀分布点的情况下给出更高的评分。有些点分散在整个360度的圈子中;一个区域的点数远远多于另一个区域的点数较少的圆圈。但是,圆点的数量不受限制。

p>

两点或更多点可能重合。

偶然点仍然相关。一个点在0°的圆和180°的一点比0°处有100个点的圆好;在180°时为1000点。

<圆圈每圈周围有一个点的圆圈非常好。在这个圆圈周围每隔半度的圆圈更好。


在我的其他(基于颜色的问题)中,有人认为标准偏差是有用的,但要注意。这是一个很好的建议吗?是否应对359度的接近度?到1°?

解决方案

这很大程度上取决于您实际想要达到的目标,你可以简单地把圆上的所有点取平均值,这个平均值越靠近圆的中心,分布越平均。



这里的警告尽管在0°和180°点的180°点分布与每个点的单点点分布一样好。这只是一个定义问题,如果这是你想要的或不是。

一个相关的,但更复杂的概念是几何标准偏差: http://en.wikipedia.org/wiki/Geometric_standard_deviation



另一种方法就像在另一个问题中提出的一样,查看所有角度的平均点数,并查看每个角度的点数偏离了多少。

即让 I 作为你的一组角度,比如 {0..359} v_i = #point at angle i,for i in I ,其中一个点 p 位于角度 i iff floor(p)== i 。然后 mean_v =(我在i中的v_i的总和)/长度(I) d_v_i = v_i - mean_v

现在您可以定义多个指标:


  1. 在I中我最大为abs(d_v_i)

  2. i中abs(d_v_i)的总和

  3. sqrt((i)中的(d_v_i ^ 2)的总和)/ length(I))偏差)

您可以采用更多的指标,任何表示d_v_i中包含的偏差的数字都可以实现。这完全取决于你想要什么来确定最佳指标。

最后一个注意事项是,你可能想要比较各种指标输入集,即设置具有不同数量的数据点,在您的情况下是不同大小的图像。您可能需要根据输入的大小缩放指标,并根据您使用的指标可能需要以不同的方式进行扩展。有一种简单的方法可以验证您的度量标准,只需计算图像的度量标准,然后将图像缩放到不同的大小,然后再对缩放后的图像进行计算。这两个指标当然应该是相同的。


This question is intended to both abstract and focus one approach to my problem expressed at "Find the most colourful image in a collection of images".

Imagine we have a set of circles, each has a number of points around its circumference. We want to find a metric that gives a higher rating to a circle with points distributed evenly around the circle. Circles with some points scattered through the full 360° are better but circles with far greater numbers of points in one area compared to a smaller number in another area are less good.

The number of points is not limited.

Two or more points may coincide.

Coincidental points are still relevant. A circle with one point at 0° and one point at 180° is better than a circle with 100 points at 0° and 1000 points at 180°.

A circle with one point every degree around the circle is very good. A circle with a point every half degree around the circle is better.

In my other (colour based question) it was suggested that standard deviation would be useful but with caveat. Is this a good suggestion and does it cope with the closeness of 359° to 1°?

解决方案

This depends very much on what you actually want to achieve, if all you want is an even distribution then you could simply take all the points on the circle and average them, the closer this average is to the centre of the circle, the more even the distribution.

The caveat here though is that a distribution with 180 points at 0° and 180 points at 180° is just as good as a distribution with a single point at each degree. It's simply a matter of definitions if this is what you want or not.

A related, but a bit more complex concept is that of Geometric standard deviation: http://en.wikipedia.org/wiki/Geometric_standard_deviation

Another method would be like suggested in your other question, look at the mean number of points at all angles and see how much for each angle the number of points deviates from that.

i.e. let I be your set of angles, say {0..359} and v_i = #points at angle i, for i in I, where a point p is at angle i iff floor(p) == i. Then mean_v = (sum of v_i for i in I) / length(I) and d_v_i = v_i - mean_v.

Now you can define several metrics:

  1. maximum of abs(d_v_i) for i in I
  2. sum of abs(d_v_i) for i in I
  3. sqrt((sum of (d_v_i^2) for i in I) / length(I)) (this is standard deviation)

There are lots more metrics you could take, any number that expresses the deviations contained in d_v_i would do the trick. It's all a matter of what exactly it is that you want that would determine the best metric.

One last note, seeing as you probably want to be comparing the metrics between various input sets, i.e. sets with varying number of data points, which, in your case is differently sized images. You probably need to scale the metrics according to the size of your input and depending on the metric you use you might need to scale in different ways. There's an easy way to validate your metric though, just calculate the metric for an image, then scale the image to a different size and calculate it again for the scaled image. Both metrics should be the same of course.

这篇关于大多数“彻底”圆周点的分布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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