Learn R Programming

conicfit (version 1.0.4)

CircleFitByLandau: Geometric circle fit (minimizing orthogonal distances) by Landau algorithm

Description

CircleFitByLandau applies the Geometric circle fit (minimizing orthogonal distances) by Landau algorithm

Usage

CircleFitByLandau(XY,ParIni = NA, epsilon = 1e-06, IterMAX = 50)

Arguments

XY
array of sample data
ParIni
initial guess (a, b, R)
epsilon
tolerance (small threshold)
IterMAX
maximal number of iterations, with a bad initial guess it may take >100 iterations

Value

vector(a, b, R)
vector with the values for the circle: center (a,b) and radius R

Source

Nikolai Chernov, 2014 Fitting ellipses, circles, and lines by least squares http://people.cas.uab.edu/~mosya/cl/ Nikolai Chernov, 2010 Circular and linear regression: Fitting circles and lines by least squares Chapman & Hall/CRC, Monographs on Statistics and Applied Probability, Volume 117 Geometric circle fit (minimizing orthogonal distances) by Landau algorithm M. Landau, "Estimation of a circular arc center and its radius", Computer Vision, Graphics and Image Processing, Vol. 38, pages 317-326, (1987)

References

Nikolai Chernov, 2014 Fitting ellipses, circles, and lines by least squares http://people.cas.uab.edu/~mosya/cl/

Nikolai Chernov, 2010 Circular and linear regression: Fitting circles and lines by least squares Chapman & Hall/CRC, Monographs on Statistics and Applied Probability, Volume 117

Geometric circle fit (minimizing orthogonal distances) by Landau algorithm M. Landau, "Estimation of a circular arc center and its radius", Computer Vision, Graphics and Image Processing, Vol. 38, pages 317-326, (1987)

Examples

Run this code
xy<-calculateCircle(0,0,200,50,randomDist=TRUE,noiseFun=function(x) (x+rnorm(1,mean=0,sd=50)))
plot(xy[,1],xy[,2],xlim=c(-250,250),ylim=c(-250,250));par(new=TRUE)
c6 <- CircleFitByLandau(xy)
xyc6<-calculateCircle(c6[1],c6[2],c6[3])
plot(xyc6[,1],xyc6[,2],xlim=c(-250,250),ylim=c(-250,250),col='purple',type='l');par(new=TRUE)

Run the code above in your browser using DataLab