用法:
skimage.transform.hough_ellipse(image, threshold=4, accuracy=1, min_size=4, max_size=None)
執行橢圓霍夫變換。
- image:(M, N) ndarray
具有表示邊的非零值的輸入圖像。
- threshold:int 可選
累加器閾值。
- accuracy:雙,可選
累加器中使用的短軸上的 bin 大小。
- min_size:int 可選
最小長軸長度。
- max_size:int 可選
最大短軸長度。如果為 None,則該值設置為較小圖像尺寸的一半。
- result:具有字段 [(accumulator, yc, xc, a, b,orientation)] 的 ndarray。
在哪裏
(yc, xc)
是中心,(a, b)
分別是長軸和短軸。這方向值跟隨skimage.draw.ellipse_perimeter慣例。
參數:
返回:
注意:
必須選擇精度以在累加器分布中產生峰值。換句話說,具有低值的平坦累加器分布可能是由太低的 bin 大小引起的。
參考:
- 1
Xie, Yonghong, and Qiang Ji. “A new efficient ellipse detection method.” Pattern Recognition, 2002. Proceedings. 16th International Conference on. Vol. 2. IEEE, 2002
例子:
>>> from skimage.transform import hough_ellipse >>> from skimage.draw import ellipse_perimeter >>> img = np.zeros((25, 25), dtype=np.uint8) >>> rr, cc = ellipse_perimeter(10, 10, 6, 8) >>> img[cc, rr] = 1 >>> result = hough_ellipse(img, threshold=8) >>> result.tolist() [(10, 10.0, 10.0, 8.0, 6.0, 0.0)]
相關用法
- Python skimage.transform.hough_circle_peaks用法及代碼示例
- Python skimage.transform.hough_line_peaks用法及代碼示例
- Python skimage.transform.hough_circle用法及代碼示例
- Python skimage.transform.hough_line用法及代碼示例
- Python skimage.transform.resize用法及代碼示例
- Python skimage.transform.integrate用法及代碼示例
- Python skimage.transform.frt2用法及代碼示例
- Python skimage.transform.estimate_transform用法及代碼示例
- Python skimage.transform.rotate用法及代碼示例
- Python skimage.transform.rescale用法及代碼示例
- Python skimage.transform.ifrt2用法及代碼示例
- Python skimage.transform.resize_local_mean用法及代碼示例
- Python skimage.transform.warp_polar用法及代碼示例
- Python skimage.transform.warp_coords用法及代碼示例
- Python skimage.transform.downscale_local_mean用法及代碼示例
- Python skimage.transform.warp用法及代碼示例
- Python skimage.feature.graycomatrix用法及代碼示例
- Python skimage.color.lab2lch用法及代碼示例
- Python skimage.draw.random_shapes用法及代碼示例
- Python skimage.feature.blob_doh用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.transform.hough_ellipse。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。