fit a circle to a cloud of points
Hi, how to fit a circle with a cloud of points which can only represent a quarter of the circle ? Thank you
Hi, how to fit a circle with a cloud of points which can only represent a quarter of the circle ? Thank you
You can always brute-force it, calculating the maximum distance between any two points in the cloud. This should give you the diameter of the circumcircle. I'm not sure what "quarter of the circle" means, however.
Asked: 2020-03-17 08:49:50 -0600
Seen: 1,788 times
Last updated: Mar 17 '20
RANSAC could be the solution. Each triplet of points(random selected 3 points from cloud). Made a prediction of the circle. Then check if this prediction is good for you(e.g. check how many points lay in some tolerance from this circle{arc} ) https://en.wikipedia.org/wiki/Random_...
When you have a prediction. Use cv::fitEllipse https://docs.opencv.org/2.4/modules/i...
Or DownHillSolver to fit it. https://docs.opencv.org/3.4/d4/d43/cl...
Find the centre, then find the most distant point from that centre. Voila, you have your centre point and radius.