2013-10-24 148 views
4

我必須要找到像相關,能量,同質性和對比度在Python圖像的紋理基於功能。我使用python-opencv來執行其他操作,因爲python-opencv將圖像作爲numpy數組返回。但是我沒有找到使用opencv或numpy來計算GLCM的好資源。此外,我必須提取d=1angle=[0,45,135,90]的功能,然後在svm中使用此功能。如何在OpenCV或numpy中查找圖像的glcm?

回答

2

您必須安裝以下庫scipynumpyskimage

skimage有一個稱爲skimage.feature模塊,其包括 skimage.feature.greycomatrixskimage.feature.greycoprops。通過這些我們可以計算出greycoimagendarrayuint8,也是希臘proporties instructions