椭圆拟合matlab代码

时间:2012-07-08 15:09:13
【文件属性】:

文件名称:椭圆拟合matlab代码

文件大小:43KB

文件格式:ZIP

更新时间:2012-07-08 15:09:13

matlab 椭圆拟合

椭圆拟合程序的源码,用于图像处理。 Description There are two main methods for least squares ellipse fitting: 1) Minimise algebraic distance, i.e. minimise sum(F(x)^2) subject to some constraint, where F(x) = x'Ax + b'x + c This is a linear least squares problem, and thus cheap to compute. There are many different possible constraints, and these produce different fits. fitellipse supplies two: [z, a, b, al] = fitellipse(x, 'linear') [z, a, b, al] = fitellipse(x, 'linear', 'constraint', 'trace') See published demo file for more information. 2) Minimise geometric distance - i.e. the sum of squared distance from the data points to the ellipse. This is a more desirable fit, as it has some geometric meaning. Unfortunately, it is a nonlinear problem and requires an iterative method (e.g. Gauss Newton) to solve it. This is implemented as the default option in fitellipse. If it fails to converge, it fails gracefully (with a warning), returning the linear least squares estimate used to derive the start value [z, a, b, alpha] = fitellipse(x) plotellipse(z, a, b, alpha) can be used to plot the fitted ellipses


【文件预览】:
Contents.m
test
----test_main.m(746B)
fitellipse.m
plotellipse.m
demo
----screenshot.png(7KB)
----html()
--------ellipsedemo_eq45548.png(2KB)
--------ellipsedemo.html(13KB)
--------ellipsedemo_eq8698.png(1KB)
--------ellipsedemo_02.png(7KB)
--------ellipsedemo.png(3KB)
--------ellipsedemo_01.png(5KB)
--------ellipsedemo_eq177471.png(3KB)
--------ellipsedemo_eq36075.png(2KB)
--------ellipsedemo_eq15494.png(1KB)
----ellipsedemo.m(5KB)

网友评论

  • 主要还是用plotellipse,挺好的
  • 为嘛运行不了。。错的呀
  • 恩呢,效果不是自己想要的
  • 效果真的不怎么好
  • 如果要求不是特别的高,可以借鉴,效果一般。
  • 效果不是特别好,精度要求高的情况下不太适合。
  • 拟合后的椭圆比较接近实际值,但是得到的几个拟合值好像不是想得到的椭圆主短轴长,几何中心以及偏离角。
  • 效果不好,改动很大