luispedro / mahotas

Computer Vision in Python
https://mahotas.rtfd.io
Other
846 stars 148 forks source link

Find the the haralick feature name from the value using Mahotas #121

Closed Dev-Gaju closed 3 years ago

Dev-Gaju commented 3 years ago

When I Implemented mahotas for feature extraction by Haralick I can easily get 4*13 value. Now the question is which value defines which feature like, which called entropy, correlation, sum variance, and so on. How can I see the by using code?

Like using features[1][1] can take one feature but what is the name of this feature?

luispedro commented 3 years ago

The object haralick_labels in the texture module has the right answer for you

import mahotas as mh
print(mh.features.texture.haralick_labels[1])

The second dimension is the four directions. Normally the mean (or mean + variance) over the four dimensions is used (which in mahotas, you get by passing return_mean=True to the haralick() function).