fitellipse.m

버전 1.0.0.0 (85 KB) 작성자: Richard Brown
Fit ellipses to 2D points using linear or nonlinear least squares
다운로드 수: 14.1K
업데이트 날짜: 2016/3/4

라이선스 보기

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

인용 양식

Richard Brown (2024). fitellipse.m (https://www.mathworks.com/matlabcentral/fileexchange/15125-fitellipse-m), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2016a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Least Squares에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

MathWorks update: Added Live Script.