meawoppl/mahotas — comment on commit 7ec078ab79f7007fc04d25b79e5e348f6b26522b
File:  line 0
By meawoppl:

They were just functions I found handy. I set them up so if the returned features were flattened, the function would return labels appropriate for plots/histograms of given slices. Something like:

labels = haralick_labels(2)
features = array([texture.haralick(texture).flatten() for texture in textures])

for l, values in zip(lables, features):
figure()
title(l)
plot(features)

I probably got some of the indexing wrong or some such, but you get the idea. Do whatever you see fit with that.

I should also note that the 14th feature does something bad when all off the values in a texture are the same value, the (rank 1) matrix it decomposes will not have a second eigenvalue. I think the appropriate return is 0, all explainable variance is contained in the first value, so I will put in a pull request on that in a few. Not that any of these metrics mean a lot for a monocolor image.