Fitting an ellipse to a polygon
Which direction does this shape point to? As a human, it is natural to identify when a shape points in a certain direction, but how do we do it algorithmically? In other words, in which direction is this polygon pointing?
A way to find this direction is to fit an ellipse to the shape and use the major axis as the direction it’s pointing. Fitting an ellipse can be done by doing an eigenvector decomposition of the covariance matrix.
read more