我已经成功地安装了skimage软件包,但当我试图导入
from skimage.feature import graycomatrix, graycoprops 它的结果是一个错误,说。 cannot import name 'graycomatrix' from 'skimage.feature' (/Users/ain/opt/anaconda3/lib/python3.8/site-packages/skimage/feature/__init__.py)
它的结果是一个错误,说。
cannot import name 'graycomatrix' from 'skimage.feature' (/Users/ain/opt/anaconda3/lib/python3.8/site-packages/skimage/feature/__init__.py)
python
jupyter-notebook
scikit-image
Ain' Natasha Mohd Nasir 发布于 2021-05-15
2 个回答
Prasanth 发布于 2022-06-06
已采纳
0 人赞同
它的名字是greycomatrix。语法是 from skimage.feature import greycomatrix, greycoprops
它的名字是greycomatrix。语法是
from skimage.feature import greycomatrix, greycoprops
smcs :
为什么在官方教程中这个词写错了? :D scikit-image.org/docs/dev/auto_examples/features_detection/...
My Work 发布于 2022-06-06
更准确地说,是为了回答@smcs的评论,并更新已接受的答案。 from version 0.19 如同在此看到的 pull request 这些函数被命名为 graycomatrix 和 graycoprops ,而文件( github 和 docs )和the tutorial are correct. To sum up. For skimage version 0.19和above, this is the right import和version:
更准确地说,是为了回答@smcs的评论,并更新已接受的答案。 from version 0.19 如同在此看到的 pull request 这些函数被命名为 graycomatrix 和 graycoprops ,而文件( github 和 docs )和the tutorial are correct.
graycomatrix
graycoprops
To sum up. For skimage version 0.19和above, this is the right import和version:
skimage