How to find glcm images in opencv or numpy?

I need to find the texture properties of an image, such as correlation, energy, uniformity, and contrast in Python. I am using python-opencv to perform other operations as python-opencv returns the image as a numpy array. But I did not find a good resource for calculating GLCM using opencv or numpy. I also need to extract the function for d=1and angle=[0,45,135,90], and then use this function in svm.

+4
source share
1 answer

You need to install the following libraries scipy, numpyand skimage.

skimagehas a module called skimage.featurethat includes skimage.feature.greycomatrixand skimage.feature.greycoprops. Using them, we can calculate greycoimagefor ndarray uint8as well as greco in proportion to the instruction

+2
source

All Articles