Module for computing the Histogram of gradient in EOPatch
- class eolearn.features.hog.HOGTask(*args, **kwargs)
Task to compute the histogram of gradient
Divide the image into small connected regions called cells, and for each cell compute a histogram of gradient directions or edge orientations for the pixels within the cell.
The algorithm stores the result in images where each band is the value of the histogram for a specific angular bin. If the visualize is True, it also output the images representing the gradients for each orientation.
A feature that will be used and a new feature name where data will be saved. If new name is not specified it will be saved with name ‘<feature_name>_HOG’
Example: (FeatureType.DATA, ‘bands’) or (FeatureType.DATA, ‘bands’, ‘hog’)
orientations (int) – Number of direction to use for the oriented gradient
visualize (bool) – Produce a visualization for the HOG in an image
visualize_feature_name (str) – Name of the visualization feature to be added to the eopatch (if empty and visualize is True, the become “new_name”_VIZU
Execute computation of HoG features on input eopatch
eopatch (eolearn.core.EOPatch) – Input eopatch
EOPatch instance with new keys holding the HoG features and HoG image for visualisation.
- Return type