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

问题描述

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



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

即让 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.

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

07-24 20:04