Python Fit circle with center outside of image

user3199134 :

I have the following binary image of a disk, and extracted the border of it: Binary image of disk Border How can I calculate the center and the radius of the circle? I already tried some methods with cv2.HoughCircles() and cv2.findContours() + cv2.fitEllipse(), however these don't work with images where the circle center is far outside of the image.

Andrey Smorodov :

You can find center of circle from 3 points, but for robust solution it is better to use ransac method. It uses a set of different solutions, for all your bounding points set and will give you more accurate solution. For instance check : here

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=405627&siteId=1