fit ellipse with noise
2 views (last 30 days)
Show older comments
Hello,
I have an image with something looking like an ellipse and some noise within the ellipse (see below).
I would like to determine the coordinates of the ellipse centre through ellipse fitting. In addition, I would like to have the uncertainty on these coordinates (like diag(sqrt(CovB)) with nlinfit).
Is there a MATLAB function that can help me remove the noise?
Should I use nlinfit with ellipse function as model or is there another function that is more appropriate?
Thanks! Guillaume
0 Comments
Answers (1)
Image Analyst
on 1 Sep 2014
The most accurate answer is given in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_fit_an_ellipse_or_other_shape_to_a_set_of_XY_data.3F
That said, an easier answer is to fill the ellipse with imfill() then use regionprops() to get the centroid, orientation, and MajorAxisLength, and MinorAxisLength. If you need a tutorial in regionprops(), see my Image Segmentation Tutorial in my File Exchange http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862. Let me know if you need help
0 Comments
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!