File Exchange

image thumbnail

Circle Fit (Taubin method)

version 1.0 (2.24 KB) by

Fits a circle to a set of data points on a plane; returns the circle center (a,b) and radius R.

35 Downloads

Updated

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

This is a robust and accurate circle fit. It works well even if data
points are observed only within a small arc. This circle fit was
proposed by G. Taubin in article "Estimation Of Planar Curves, Surfaces And Nonplanar Space Curves Defined By Implicit Equations, With Applications To Edge And Range Image Segmentation", IEEE Trans. PAMI, Vol. 13, pages 1115-1138, (1991). It is more stable than the simple Circle Fit by Kasa (files
#5557 and #22642) and slightly faster than Circle Fit by Pratt (file #22643).

Comments and Ratings (8)

Russ

Russ (view profile)

Anton Jigalin

Marta

Marta (view profile)

Can anyone help me with using this function in the Curve Fitting App ? I need to get Goodness of Fit and RSME values..

Pascal

Pascal (view profile)

Nice ! Would be nice to input sigma error on data points and output resulting error on center and radius.

David

David (view profile)

jinrong

Manuel Lopes

Works nicely, can be easily extended to 3D data.

%project 3D data to a plane
[U,S,V]=svd(XYr);
XYp = U'*XYr;

Pare = CircleFitByTaubin(XYp(1:2,:)')

%estimated center
UU = U * [Pare(1:2)';0];
%estimated radius
RR = Pare(end);

Nice function. Very clean and easily implemented in any language. Was wondering if it could be extended to a sphere. I can't follow how you wrote the function from the article (G. Taubin, 1991)

MATLAB Release
MATLAB 6.0 (R12)
Acknowledgements

Inspired by: Circle fit

Inspired: frenet_robust.zip

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video