如何从协方差矩阵和平均位置获得最佳拟合边界框? [英] How to get the best fit bounding box from covariance matrix and mean position?

查看:257
本文介绍了如何从协方差矩阵和平均位置获得最佳拟合边界框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定协方差矩阵和从一组二维点计算出的平均位置,是否有任何方法可以简单地计算最佳拟合边界框或近似值(在我的情况下,精度并不重要)?边界框可以旋转,每个点的位置是未知的。你能帮我一下吗?



编辑:我已经解决了这个问题,只需按照下面的几个方程: http://www.visiondummy.com/2014/04/draw-error-ellipse-representing- covariance-matrix /

解决方案

您可以尝试的一件事是使用平均位置作为您的中心边界框并旋转它以使用协方差矩阵的特征向量作为其轴。例如,请参阅 http://en.wikipedia.org/wiki/Principal_component_analysis 中的图表。这并不能保证你得到绝对最小的边界框 - 你可以看到这个,如果你注意到特征向量会受到所有点的影响,包括那些不应该影响最小边界框的凸包内的点 - 但是它对某些类型的数据可能是一个很好的近似值。


Given a covariance matrix and mean position computed from a set of 2D points, is there any way to simply compute the best fit bounding box or approximation (accuracy is not that important in my case)? The bounding box can be rotated, and the position of each point is unknown. Can you please help me out?

Edited: I've solved this out by just simply follow a few equations in here: http://www.visiondummy.com/2014/04/draw-error-ellipse-representing-covariance-matrix/

解决方案

One thing you could try would be to use the average position as the centre of your bounding box and rotate it to use the eigenvectors of the covariance matrix as its axes. See, for instance, the diagram in http://en.wikipedia.org/wiki/Principal_component_analysis. This won't guarantee you to get the absolute smallest possible bounding box - you can see this if you notice that the eigenvectors will be affected by all points, including those inside the convex hull which should not influence the smallest possible bounding box - but it might be a decent approximation for some sorts of data.

这篇关于如何从协方差矩阵和平均位置获得最佳拟合边界框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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