Module haar

Source
Expand description

Functions for creating and evaluating Haar-like features.

Structs§

HaarFeature
A Haar-like feature.

Enums§

HaarFeatureType
The type of a Haar-like feature determines the number of regions it contains and their orientation. The diagrams in the comments for each variant use the symbols (*, &) to represent either (+, -) or (-, +), depending on which Sign the feature type is used with.

Functions§

draw_haar_feature
Draws the given Haar-like feature on an image, drawing pixels with a positive sign white and those with a negative sign black.
draw_haar_feature_mut
Draws the given Haar-like feature on an image in place, drawing pixels with a positive sign white and those with a negative sign black.
enumerate_haar_features
Returns a vector of all valid Haar-like features for an image with given width and height.
number_of_haar_features
Returns the number of distinct Haar-like features for an image of the given dimensions.