用法:
skimage.feature.haar_like_feature_coord(width, height, feature_type=None)
計算Haar-like 特征的坐標。
- width:int
檢測窗口的寬度。
- height:int
檢測窗口的高度。
- feature_type:str 或 str 列表或無,可選
要考慮的特征類型:
- ‘type-2-x’:沿 x 軸變化的 2 個矩形;
- ‘type-2-y’:沿 y 軸變化的 2 個矩形;
- ‘type-3-x’:沿 x 軸變化的 3 個矩形;
- ‘type-3-y’:沿 y 軸變化的 3 個矩形;
- ‘type-4’:沿 x 和 y 軸變化的 4 個矩形。
默認情況下,所有特征都被提取。
- feature_coord:(n_features, n_rectangles, 2, 2), 元組坐標列表的 ndarray
每個特征的矩形坐標。
- feature_type:(n_features,), str 的 ndarray
每個特征對應的類型。
參數:
返回:
例子:
>>> import numpy as np >>> from skimage.transform import integral_image >>> from skimage.feature import haar_like_feature_coord >>> feat_coord, feat_type = haar_like_feature_coord(2, 2, 'type-4') >>> feat_coord array([ list([[(0, 0), (0, 0)], [(0, 1), (0, 1)], [(1, 1), (1, 1)], [(1, 0), (1, 0)]])], dtype=object) >>> feat_type array(['type-4'], dtype=object)
相關用法
- Python skimage.feature.haar_like_feature用法及代碼示例
- Python skimage.feature.hessian_matrix用法及代碼示例
- Python skimage.feature.hessian_matrix_eigvals用法及代碼示例
- Python skimage.feature.graycomatrix用法及代碼示例
- Python skimage.feature.blob_doh用法及代碼示例
- Python skimage.feature.blob_dog用法及代碼示例
- Python skimage.feature.graycoprops用法及代碼示例
- Python skimage.feature.corner_orientations用法及代碼示例
- Python skimage.feature.structure_tensor用法及代碼示例
- Python skimage.feature.ORB用法及代碼示例
- Python skimage.feature.corner_subpix用法及代碼示例
- Python skimage.feature.canny用法及代碼示例
- Python skimage.feature.peak_local_max用法及代碼示例
- Python skimage.feature.CENSURE用法及代碼示例
- Python skimage.feature.corner_foerstner用法及代碼示例
- Python skimage.feature.corner_harris用法及代碼示例
- Python skimage.feature.corner_fast用法及代碼示例
- Python skimage.feature.BRIEF用法及代碼示例
- Python skimage.feature.SIFT用法及代碼示例
- Python skimage.feature.structure_tensor_eigvals用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.feature.haar_like_feature_coord。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。