我正在处理来自SKimage的不同的阈值算法,当我导入某些包时,我会得到一个错误,但在其他方面没有问题。例如:
from skimage.filter import threshold_adaptive, threshold_isodata返回回溯:ImportError: cannot import name threshold_isodata。我使用python2.7,并遵循以下文档:等数据
具体来说,我希望使用threshold_isodata和threshold_yen。有人对如何解决这个错误有建议吗?或者,是否还有其他使用相同算法的包?
发布于 2014-05-25 19:10:02
正如注释中提到的,threshold_isodata只在主回购中可用(即在V0.9中没有正式发布),因此出现了导入错误。
结果发现,在0.9版中,threshold_yen没有正确导入到filter子包中。(这已由师父处理。)在发布0.10之前,您应该导入threshold_yen,如下所示:
from skimage.filter.thresholding import threshold_yen编辑:请注意,这个问题和答案是特定于非常古老的版本的科幻图片。skimage.filter模块在v0.11中被重命名为skimage.filters
https://stackoverflow.com/questions/23849096
复制相似问题