【发布时间】:2020-11-19 12:57:34
【问题描述】:
我正在使用此代码为某个图像提取 GLCM 特征,但它给了我一个值错误
代码:
from PIL import Image
from skimage.feature import greycomatrix, greycoprops
fname = 'trial.jpg'
img = Image.open(fname).convert("L")
img = img.resize((224, 224))
test_glcm = greycomatrix(img, [1], [np.pi/2], 256, symmetric=True, normed=True)
错误:
ValueError 缓冲区源数组是只读的
有谁知道这意味着什么,或者代码中可能存在什么问题?
【问题讨论】:
标签: python scikit-image glcm