[英]how to find glcm of an image in OpenCV or numpy?
我必须找到图像的基于纹理的特征,例如Python中的相关性,能量,均匀性和对比度。 我正在使用python-opencv进行其他操作,因为python-opencv返回的图像为numpy数组。 但是我找不到使用opencv或numpy计算GLCM的任何好的资源。 另外,我还必须提取d=1
和angle=[0,45,135,90]
,然后在svm中使用此特征。
您必须安装以下库scipy
, numpy
和skimage
。
skimage
有一个名为skimage.feature
的模块,其中包括skimage.feature.greycomatrix
和skimage.feature.greycoprops
。 使用这些我们可以计算ndarray
uint8
的greycoimage
以及ndarray
比例指令
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.