bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / feature / haar / haar_like_feature_coord
function
skimage.feature.haar:haar_like_feature_coord
source: /dev/scikit-image/src/skimage/feature/haar.py :33
Signature
def haar_like_feature_coord ( width , height , feature_type = None ) Summary
Compute the coordinates of Haar-like features.
Parameters
width: intWidth of the detection window.
height: intHeight of the detection window.
feature_type: str or list of str or None, optionalThe type of feature to consider:
'type-2-x': 2 rectangles varying along the x axis;
'type-2-y': 2 rectangles varying along the y axis;
'type-3-x': 3 rectangles varying along the x axis;
'type-3-y': 3 rectangles varying along the y axis;
'type-4': 4 rectangles varying along x and y axis.
By default all features are extracted.
Returns
feature_coord: (n_features, n_rectangles, 2, 2), ndarray of list of tuple coordCoordinates of the rectangles for each feature.
feature_type: (n_features,), ndarray of strThe corresponding type for each feature.
Examples
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_type✓
Aliases
-
skimage.feature.haar_like_feature_coord