1 | initial version |
Hmm, lots of ways, but what's the best?
Do fitEllipse and then see what percentage of the contour is on the ellipse? You'd have to reconstruct the ideal ellipse and decide what's "close enough" to the ideal to count as on the ellipse.
MatchShapes on an idealized earth limb? Possibly too much variation.
Find the convexHull and convexityDefects and make sure there's only one large one? What's large and how many small defects are ok?
My bet is on fitEllipse being the best, but it's a fair amount of work. I'd give them a try and find out.