With mahotas, it is very easy to compute features from images. There is a submodule named mahotas.features, where feature computation functions are available.
A commonly used set of texture features is the Haralick set. As with many methods in image processing, the name honors its inventor. These features are texture-based; they distinguish between images that are smooth and those that are patterned, and between different patterns. With mahotas, it is very easy to compute them as follows:
haralick_features = mh.features.haralick(image) haralick_features_mean = np.mean(haralick_features, axis=0) haralick_features_all = np.ravel(haralick_features)
The mh.features.haralick function returns a 4 x 13 array. The first dimension refers to four possible directions in which to compute the features (vertical, horizontal, diagonal, and anti-diagonal). If...