Ask Your Question
2

How to get ellipse points position after using fitEllipse?

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

mrmuto2 gravatar image

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

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
2

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

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

Comments

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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 2,700 times

Last updated: Jan 18 '16