用法:
class skimage.measure.CircleModel
基础:
skimage.measure.fit.BaseModel
二维圆的总最小二乘估计量。
圆的函数模型为:
r**2 = (x - xc)**2 + (y - yc)**2
此估计器最小化从所有点到圆的平方距离:
min{ sum((r - sqrt((x_i - xc)**2 + (y_i - yc)**2))**2) }
求解参数最少需要 3 个点。
注意:
使用 [1] 中给出的球形估计的 2D 版本进行估计。
参考:
- 1
Jekel, Charles F. Obtaining non-linear orthotropic material models for pvc-coated polyester via inverse bubble inflation. Thesis (MEng), Stellenbosch University, 2016. Appendix A, pp. 83-87. https://hdl.handle.net/10019.1/98627
例子:
>>> t = np.linspace(0, 2 * np.pi, 25) >>> xy = CircleModel().predict_xy(t, params=(2, 3, 4)) >>> model = CircleModel() >>> model.estimate(xy) True >>> tuple(np.round(model.params, 5)) (2.0, 3.0, 4.0) >>> res = model.residuals(xy) >>> np.abs(np.round(res, 9)) 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、r。
属性:
相关用法
- 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.EllipseModel用法及代码示例
- Python skimage.measure.regionprops用法及代码示例
- Python skimage.measure.find_contours用法及代码示例
- Python skimage.measure.label用法及代码示例
- Python skimage.measure.regionprops_table用法及代码示例
- Python skimage.measure.moments_coords用法及代码示例
- Python skimage.metrics.hausdorff_distance用法及代码示例
注:本文由纯净天空筛选整理自scikit-image.org大神的英文原创作品 skimage.measure.CircleModel。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。