# bounding ellipse needed

Is there a method to get the bounding ellipse of a contour. I mean all the points should be inside the ellipse. fitEllipse get the best fitting ellipse,not the bounding ellipse.

This forum is disabled, please visit https://forum.opencv.org

bounding ellipse needed

add a comment

2

No, OpenCV don't have method that finds bounding ellipse. But it has function called minAreaRect that finds bounding rotated rectangle of the minimum area. It may give you results that are pretty close to bounding ellipse. Or you may use minEnclosingCircle function if your ellipse is close enough to circle.

Thank you very much~~I have a problem that need to describe the degree of ellipse of a contour. and I want to extract the bounding ellipse, then compare the contour's area and its bounding ellipse area. minAreaRect is not suitable. And I think I can judge by each pixel inside the contour, But I can not get all the points inside the contour.

Ellipse and rotated rectangle have same degrees of freedom: center, width, height and angle. minAreaRect will give you results that are pretty close to bounding ellipse. Actually, if your points really form an ellipse then results of bounding ellipse and minAreaRect will be identical.

I know you point. hope opencv will have a bounding ellipse api in the future.

Asked: **
2013-09-30 23:16:18 -0500
**

Seen: **302 times**

Last updated: **Oct 01 '13**

Fit ellipse with most points on contour (instead of least squares)

MSER Sample in OpenCV 2.4.2 on Visual Studio 2012

fast way to draw ellipse axes?

Rotated ellipse as structuring element.

Calculating the mid point in a rotated rectangle side [closed]

calculate 3d pose of sphere based on 2d ellipse

Convert keypoint to ellipse [closed]

Extract an ellipse form from an image instead of drawing it inside

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.