OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Tue, 19 Jan 2016 03:27:23 -0600How to get ellipse points position after using fitEllipse?http://answers.opencv.org/question/84455/how-to-get-ellipse-points-position-after-using-fitellipse/ 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?Mon, 18 Jan 2016 20:53:56 -0600http://answers.opencv.org/question/84455/how-to-get-ellipse-points-position-after-using-fitellipse/Answer by Tetragramm for <p>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?</p>
http://answers.opencv.org/question/84455/how-to-get-ellipse-points-position-after-using-fitellipse/?answer=84458#post-id-84458The 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.Mon, 18 Jan 2016 21:01:44 -0600http://answers.opencv.org/question/84455/how-to-get-ellipse-points-position-after-using-fitellipse/?answer=84458#post-id-84458Comment by Eduardo for <p>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. </p>
<p>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.</p>
http://answers.opencv.org/question/84455/how-to-get-ellipse-points-position-after-using-fitellipse/?comment=84509#post-id-84509To 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](https://en.wikipedia.org/wiki/Ellipse#General_parametric_form) of the ellipse.Tue, 19 Jan 2016 03:27:23 -0600http://answers.opencv.org/question/84455/how-to-get-ellipse-points-position-after-using-fitellipse/?comment=84509#post-id-84509