用法:
class skimage.measure.EllipseModel
基础:
skimage.measure.fit.BaseModel
2D 椭圆的总最小二乘估计量。
椭圆的函数模型为:
xt = xc + a*cos(theta)*cos(t) - b*sin(theta)*sin(t) yt = yc + a*sin(theta)*cos(t) + b*cos(theta)*sin(t) d = sqrt((x - xt)**2 + (y - yt)**2)
其中
(xt, yt)
是椭圆上最接近(x, y)
的点。因此d是从点到椭圆的最短距离。估计器基于最小二乘最小化。直接计算最优解,不需要迭代。这导致了一种简单、稳定和鲁棒的拟合方法。
params
属性包含以下顺序的参数:xc, yc, a, b, theta
例子:
>>> xy = EllipseModel().predict_xy(np.linspace(0, 2 * np.pi, 25), ... params=(10, 15, 4, 8, np.deg2rad(30))) >>> ellipse = EllipseModel() >>> ellipse.estimate(xy) True >>> np.round(ellipse.params, 2) array([10. , 15. , 4. , 8. , 0.52]) >>> np.round(abs(ellipse.residuals(xy)), 5) array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
- params:元组
椭圆模型参数按以下顺序 xc、yc、a、b、theta。
属性:
相关用法
- Python skimage.measure.ransac用法及代码示例
- Python skimage.measure.profile_line用法及代码示例
- Python skimage.measure.perimeter_crofton用法及代码示例
- Python skimage.measure.moments_hu用法及代码示例
- Python skimage.measure.moments_coords_central用法及代码示例
- Python skimage.measure.LineModelND用法及代码示例
- Python skimage.measure.block_reduce用法及代码示例
- Python skimage.measure.moments用法及代码示例
- Python skimage.measure.shannon_entropy用法及代码示例
- Python skimage.measure.moments_normalized用法及代码示例
- Python skimage.measure.euler_number用法及代码示例
- Python skimage.measure.perimeter用法及代码示例
- Python skimage.measure.moments_central用法及代码示例
- Python skimage.measure.regionprops用法及代码示例
- Python skimage.measure.find_contours用法及代码示例
- Python skimage.measure.CircleModel用法及代码示例
- Python skimage.measure.label用法及代码示例
- Python skimage.measure.regionprops_table用法及代码示例
- Python skimage.measure.moments_coords用法及代码示例
- Python skimage.metrics.hausdorff_distance用法及代码示例
注:本文由纯净天空筛选整理自scikit-image.org大神的英文原创作品 skimage.measure.EllipseModel。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。