彩色图像无响应并出错

时间:2017-07-19 16:17:30

标签: python-3.x scikit-image

我正在尝试从skimage.data中读取图像。彩色图像出现但没有响应。我也得到了valurError。这是我的命令和错误。

>>> import skimage
>>> import numpy as np
>>> import scipy as sp
>>> import matplotlib.pyplot as plt
>>> from skimage import data
>>> cat=data.chelsea()
>>> plt.imshow(cat,interpolation='nearest');
<matplotlib.image.AxesImage object at 0x0788BDF0>
>>> plt.show(cat)

Traceback (most recent call last):
  File "<pyshell#7>", line 1, in <module>
    plt.show(cat)
  File "C:\Python36-32\lib\site-packages\matplotlib\pyplot.py", line 253, in show
    return _show(*args, **kw)
  File "C:\Python36-32\lib\site-packages\matplotlib\backend_bases.py", line 166, in __call__
    if block:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

有人可以帮我解决这个错误吗?

0 个答案:

没有答案