How to create Minimum bounding shapes such as ellipse, triangle, quadrilateral from a given 2d shape

Funny you’ve linked to OpenCV – I tried porting their C++ implementation to Java the other day.

Sometimes it works:

image

Occasionally it doesn’t:

Other times there’s no output at all:

image

There might be just one bug in there somewhere… Anyway, I didn’t realise it had a Java interface so I’ll try that and compare…