skimage 0.17.2

ParametersReturnsBackRef
haar_like_feature_coord(width, height, feature_type=None)

Parameters

width : int

Width of the detection window.

height : int

Height of the detection window.

feature_type : str or list of str or None, optional

The 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 coord

Coordinates of the rectangles for each feature.

feature_type : (n_features,), ndarray of str

The corresponding type for each feature.

Compute the coordinates of Haar-like features.

Examples

This example is valid syntax, but we were not able to check execution
>>> 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 # doctest: +SKIP array([ list([[(0, 0), (0, 0)], [(0, 1), (0, 1)], [(1, 1), (1, 1)], [(1, 0), (1, 0)]])], dtype=object)
This example is valid syntax, but we were not able to check execution
>>> feat_type
array(['type-4'], dtype=object)
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

skimage.feature.haar.haar_like_feature skimage.feature.haar.draw_haar_like_feature skimage.feature.haar.haar_like_feature_coord

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /skimage/feature/haar.py#36
type: <class 'function'>
Commit: