如何在OpenCV或numpy中找到图像的glcm?

我必须在
Python中找到图像的基于纹理的特征,如相关性,能量,同质性和对比度.我使用python-opencv进行其他操作,因为python-opencv将图像作为numpy数组返回.但我没有找到任何使用opencv或numpy来计算GLCM的好资源.此外,我必须提取d = 1和角度= [0,45,135,90]的功能,然后在svm中使用此功能. 最佳答案 你必须安装以下库scipy,numpy和skimage.

skimage有一个名为skimage.feature的模块,其中包括
skimage.feature.greycomatrix和skimage.feature.greycoprops.使用这些我们可以计算ndarray uint8的greycoimage以及greco比例instructions

点赞