如何从协方差矩阵和平均位置获得最佳拟合边界框? [英] How to get the best fit bounding box from covariance matrix and mean position?
问题描述
编辑:我已经解决了这个问题,只需按照下面的几个方程: 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屋!