How to get the best fit bounding box from covariance matrix and mean position?

China☆狼群 提交于 2019-12-22 00:15:17

问题


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/


回答1:


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.



来源:https://stackoverflow.com/questions/26321354/how-to-get-the-best-fit-bounding-box-from-covariance-matrix-and-mean-position

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!