找到“视觉"对象的最快方法是什么?不规则多边形的中心? [英] What is the fastest way to find the "visual" center of an irregularly shaped polygon?

查看:118
本文介绍了找到“视觉"对象的最快方法是什么?不规则多边形的中心?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要找到一个点,该点是不规则形状的多边形的视觉中心.视觉中心是指在视觉上似乎位于多边形大区域中心的点.该应用程序是在多边形内放置标签.

I need to find a point that is a visual center of an irregularly shaped polygon. By visual center, I mean a point that appears to be in the center of a large area of the polygon visually. The application is to put a label inside the polygon.

以下是使用内部缓冲的解决方案:

Here is a solution that uses inside buffering:

https://web.archive.org/web/20150708063910/http://proceedings.esri.com/library/userconf/proc01/professional/papers/pap388/p388.htm

如果要使用此方法,什么是找到缓冲区的有效且快速的方法?如果要使用其他任何方式,那是哪种方式?

If this is to be used, what is an effective and fast way to find the buffer? If any other way is to be used, which is that way?

一个非常坚硬的多边形的很好的例子是一个巨大的粗U(用Arial Black或Impact或类似的字体编写).

A good example of really tough polygons is a giant thick U (written in Arial Black or Impact or some such font).

推荐答案

如果可以将多边形转换为二进制图像,则可以使用图像处理领域中存在的基础,例如:

If you can convert the polygon into a binary image, then you can use the foundation that exists in the field of image processing, e.g.: A Fast Skeleton Algorithm on Block Represented Binary Images.

但是在一般情况下,由于离散化错误和额外的工作,这实际上并不合理.

But this is not really reasonable in the general case, because of discretization errors and extra work.

但是,也许您发现这些有用:

However, maybe you find these useful:

  • Straight skeleton of a simple polygon
  • Determining the Skeleton of a Simple Polygon in (Almost) Linear Time

也许您想查找的点是多边形中包含的最大圆的中心.它不一定总是在被观察的中心,但是大多数时间可能会得到预期的结果,并且只有在有些病理情况下,某些情况才会完全消失.

Maybe you want to look for the point that is the center of the largest circle contained in the polygon. It is not necessarily always in the observed centre, but most of the time would probably give the expected result, and only in slightly pathological cases something that is totally off.

这篇关于找到“视觉"对象的最快方法是什么?不规则多边形的中心?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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