Question

I have to find texture based features of an image like correlation, energy, homogeneity, and contrast in Python. I am using python-opencv to do other operations, since python-opencv returns image as an numpy array. But I didn't find any good resource to compute GLCM using either opencv or numpy. Also I have to extract feature for d=1 and angle=[0,45,135,90] and then use this feature in svm.

Was it helpful?

Solution

You have to install the following libraries scipy, numpy and skimage.

skimage has a module called skimage.feature which includes skimage.feature.greycomatrix and skimage.feature.greycoprops. Using these we can calculate the greycoimage for ndarray uint8 and also the greco proporties instructions

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top