CircleFit:

Path: Imaging/ImageMatching

% Fit a circle to data.

   The equation is

   (x-a)^2 + (y-b)^2 = r^3
   x^2 - 2ax + a^2 + y^2 - 2by + b^2 - r^2 = 0
   x^2 + y^2 -2ax -2by + a^2 + b^2 - r^2

   Since version 8.
--------------------------------------------------------------------------
   Form:
   [a, b, r] = CircleFit( x, y )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   x              (:,1) x data
   y              (:,1) y data

   -------
   Outputs
   -------
   a              (1,1)  x center
   b              (1,1)  y center
   r              (1,1)  Circle radius

--------------------------------------------------------------------------

Back to the Imaging Module page