用法:
skimage.feature.corner_subpix(image, corners, window_size=11, alpha=0.99)
確定角的亞像素位置。
統計測試決定拐角是定義為兩條邊的交點還是單個峰。根據分類結果,根據grey-values的局部協方差確定子像素角位置。如果任一統計檢驗的顯著性水平不夠,則無法對角點進行分類,並將輸出子像素位置設置為NaN
- image:(M, N) ndarray
輸入圖像。
- corners:(K, 2) 數組
角坐標(行,列)。
- window_size:int 可選
子像素估計的搜索窗口大小。
- alpha:浮點數,可選
角分類的顯著性水平。
- positions:(K, 2) 數組
亞像素角位置。 NaN 用於“not classified” 角。
參數:
返回:
參考:
- 1
Förstner, W., & Gülch, E. (1987, June). A fast operator for detection and precise location of distinct points, corners and centres of circular features. In Proc. ISPRS intercommission conference on fast processing of photogrammetric data (pp. 281-305). https://cseweb.ucsd.edu/classes/sp02/cse252/foerstner/foerstner.pdf
- 2
例子:
>>> from skimage.feature import corner_harris, corner_peaks, corner_subpix >>> img = np.zeros((10, 10)) >>> img[:5, :5] = 1 >>> img[5:, 5:] = 1 >>> img.astype(int) array([[1, 1, 1, 1, 1, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]]) >>> coords = corner_peaks(corner_harris(img), min_distance=2) >>> coords_subpix = corner_subpix(img, coords, window_size=7) >>> coords_subpix array([[4.5, 4.5]])
相關用法
- Python skimage.feature.corner_shi_tomasi用法及代碼示例
- Python skimage.feature.corner_orientations用法及代碼示例
- Python skimage.feature.corner_foerstner用法及代碼示例
- Python skimage.feature.corner_harris用法及代碼示例
- Python skimage.feature.corner_fast用法及代碼示例
- Python skimage.feature.corner_peaks用法及代碼示例
- Python skimage.feature.corner_moravec用法及代碼示例
- Python skimage.feature.canny用法及代碼示例
- Python skimage.feature.graycomatrix用法及代碼示例
- Python skimage.feature.blob_doh用法及代碼示例
- Python skimage.feature.blob_dog用法及代碼示例
- Python skimage.feature.graycoprops用法及代碼示例
- Python skimage.feature.structure_tensor用法及代碼示例
- Python skimage.feature.hessian_matrix用法及代碼示例
- Python skimage.feature.ORB用法及代碼示例
- Python skimage.feature.peak_local_max用法及代碼示例
- Python skimage.feature.CENSURE用法及代碼示例
- Python skimage.feature.hessian_matrix_eigvals用法及代碼示例
- Python skimage.feature.haar_like_feature_coord用法及代碼示例
- Python skimage.feature.BRIEF用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.feature.corner_subpix。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。