如何在C ++中找到任意定向的最小边界框 [英] How to find an arbitrarily oriented minimum bounding box in c++

查看:98
本文介绍了如何在C ++中找到任意定向的最小边界框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,假设我有N对正长坐标(点)的列表.
如何找到包含所有矩形的最小矩形?
矩形还可以具有浮动坐标,并且可以任意角度旋转并进一步缩小...不只是X,Y,宽度和高度!

So let's say I have a list of N pairs of positive long coordinates (points).
How do I find the smallest rectangle containing all of them?
The rectangle can also have floating coordinates and be rotated in any angle and further shrunk... Not just X, Y, Width and Height!

我已经知道如何找到最小的多边形或未旋转的矩形,但这不是我所需要的...我希望知道如何找到任意定向的最小边界框.

I already know how to find the smallest polygon or not rotated rectangle, but it's not what I need...I wish to know how to find the arbitrarily oriented minimum bounding box.

推荐答案

请参见 http://www.geometrictools.com/Source/ComputationalGeometry.html

最小区域框"部分提供了各种示例.

The section "Minimum-area box" has various examples.

这篇关于如何在C ++中找到任意定向的最小边界框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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