简体   繁体   English

找到包含给定点数的最小包含凸多边形

[英]find the smallest containing convex polygon with a given number of points

given a convex polgyon and a number N, how do I find the smallest polygon that 给定一个凸polgyon和一个数字N,我如何找到最小的多边形

  1. contains every point from the original polygon 包含原始多边形中的每个点
  2. has exactly N corner points 正好有N个角点

For example, suppose I have a set of points and compute the convex hull for them (green). 例如,假设我有一组点并计算它们的凸包(绿色)。 Now I want to find the smallest quadrangle that contains all the points (red) 现在我想找到包含所有点的最小四边形(红色)

最小的四边形在此输入图像描述

It is easy to see that any other polygon with 4 corners would either be bigger or fail to contain all the points. 很容易看出,任何其他具有4个角的多边形要么更大,要么不能包含所有点。 But how do I find this polygon in the general case? 但是如何在一般情况下找到这个多边形呢?


EDIT: 编辑:

With smallest polygon I mean the the one that covers the smallest area, although I am not sure whether the smallest circumference would give different results. 最小的多边形是指覆盖最小区域的多边形,但我不确定最小的圆周是否会产生不同的结果。

I added two more example pictures that unfortunately do not seem to work with the 'remove edges' approach in one of the answers 我添加了另外两个示例图片,遗憾的是,这些图片似乎与其中一个答案中的“删除边缘”方法无关


Some background information: 一些背景资料:

The goal is to accurately determine shapes with image recognition. 目标是通过图像识别准确地确定形状。 For example take a foto of a cuboid. 例如拍摄一个长方体的照片。 All points inside the box in the 2D-photo will be contained in a 6-corner convex polygon. 2D照片中框内的所有点都将包含在6角凸多边形中。 However since real-world shapes do not have perfect corners, and the camera adds some blur, the edges of this polygon will be rounded. 然而,由于真实世界的形状没有完美的角落,并且相机增加了一些模糊,因此该多边形的边缘将是圆形的。 See the attached image from the question Getting corners from convex points 请参阅问题从凸点获取角落的附图

模糊的角落

You need to define the notion of "smallest" in your question. 您需要在问题中定义“最小”的概念。 Whatever your definition, this question has been heavily studied in the computational geometry literature. 无论您的定义是什么,这个问题都在计算几何文献中得到了深入的研究。 The key search phrase is minimal enclosing k-gon : 关键搜索短语是最小的封闭k-gon

  • Mictchell et al.: "Minimum-Perimeter Enclosing k-gon" 2006 ( CiteSeer link ) Mictchell等人:“最小周长封闭k-gon”2006( CiteSeer链接
  • Aggarwal et al.: "Minimum Area Circumscribing Polygons" 1985 ( CiteSeer link ) Aggarwal等人:“最小面积环绕多边形”1985( CiteSeer链接
  • O'Rourke et al.: "An optimal algorithm for fnding minimal enclosing triangles" 1986, Algorithmica ( ACM link ) O'Rourke等人:“最小算法用于最小封闭三角形”1986, AlgorithmicaACM link

The general algorithms are not simple (although algorithms for min area triangles or rectangles are simple). 一般算法并不简单(尽管最小区域三角形或矩形的算法很简单)。 Depending on your goals, you might have to abandon any mathematical notion of "smallest" and head for a heuristic. 根据您的目标,您可能不得不放弃任何“最小”的数学概念并前往启发式。

While number of edges > N do
  remove the shortest edge by replacing its endpoints 
  with the intersection point of the adjacent edges

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 给定平面中的一组点,找到包含它们的最小区域的(不一定是凸的)多边形 - Given a set of points in the plane, find a (not necessarily convex) polygon of minimal area containing them 给定一个点矢量(可能是乱序),找到多边形(不是凸包) - Given a vector of points (possibly out of order), find polygon (not convex hull) 检测凸多边形的极点 - Detect extreme points of a convex polygon 给定一个整数,找到给出它的最小函数 - Given a integer number, find the smallest function that given it 将凸多边形拟合到给定矩形中 - Fit a convex polygon into a given rectangle 给定 N,找出 A^A 能被 N 整除的最小数 A - Given N, find the smallest number A that A^A divisible by N 给定一组点,找出这些点是否存在凸四边形,没有其他点,则其角在内部 - Given a set of points, find if there exists a convex quad from these points with no points other then its corners are inside 如何找到凸多边形与其他凸多边形的最佳拟合 - How to find best fit of convex polygon into other convex polygon 找到形成凸多边形的最大点子集 - Finding largest subset of points forming a convex polygon 了解如何使用最少数量的矢量线填充多边形 - Find out how to flood fill a polygon with the smallest number of vector lines
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM