Closed scottclowe closed 9 years ago
NB: these features are similar to the Haralick features (see #73), but not quite the same. The skimage
implementation can do multiple distances, which mahotas
cannot.
This should subclass HighLevelFeatures
.
Properties extracted from the GLCM are useful for measuring texture.
Step 1: Compute GLCM from image with
greycomatrix
for a generous number of distances, for all 4 angles. http://scikit-image.org/docs/dev/api/skimage.feature.html#greycomatrixWe might want to drop the 255-to-255 histogram, since that is the background colour? And then normalise against number of remaining pixels, because the images are different sizes?
Step 2: Compute all 6 properties which
greycoprops
can compute, for each distance and angle. http://scikit-image.org/docs/dev/api/skimage.feature.html#greycopropsStep 3: Average over angles.
Step 4: Return a feature vector sized
6 * number_of_distances
Clearly,
number_of_distances
is <= the minimum length of a side of an image in either test or train. This number is about 20, so the response vector contains about 120 elements.