Ask Your Question

How to get ellipse points position after using fitEllipse?

asked 2016-01-18 20:53:56 -0500

mrmuto2 gravatar image

updated 2016-01-18 20:55:12 -0500

There is a set of points. I have used fitEllipse to approximate it by ellipse. But i don't know how to get the new position(x,y) of ellipse points. I have checked the document, but cannot find the solution.Can somebody help?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-18 21:01:44 -0500

Tetragramm gravatar image

The RotatedRect contains all the information you need. The long side is the semi-major, the short side is the semi-minor, the center, and the rotation.

You can use standard geometry to find the points, or, if you want image pixels, take a blank image and use cv::ellipse to draw with white and make a mask.

edit flag offensive delete link more


To complete, if you want to have the coordinates of points sampled on the fitted ellipse, you can look at the equation for the parametric form of the ellipse.

Eduardo gravatar imageEduardo ( 2016-01-19 03:27:23 -0500 )edit

Question Tools

1 follower


Asked: 2016-01-18 20:53:56 -0500

Seen: 1,655 times

Last updated: Jan 18 '16