当我使用函数skimage.feature.greycomatrix时,pycharm错误:
ModuleNotFoundError: No module named 'skimage.filters._sparse_cy'
,版本为skimage: 0.18.1Code:
from skimage.feature import greycomatrix, greycoprops
import cv2
img_org = cv2.imread('train_video/frame/tr_123.jpg')
result = skimage.feature.greycomatrix(img_org, [1], [0, np.pi/2], levels=4)
输出:
Traceback (most recent call last):
File "D:/thomas/py_code/test_4.py", line 7, in
from skimage.feature import greycomatrix, greycoprops
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python37\lib\site-packages\skimage\feature_init_.py", line 3, in
from .canny import canny
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python37\lib\site-packages\skimage\feature_canny.py", line 18, in
from ..filters import gaussian
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python37\lib\site-packages\skimage\filters_init.py", line 12, in
from .thresholding import (threshold_local, threshold_otsu, threshold_yen,