2

我正在使用 python 处理许多图像。在我分析这个的时候图片

当我使用:

from skimage import color
from skimage import io
img = color.rgb2gray(io.imread(path))

我收到此错误:

Traceback (most recent call last):
  File "C:\wamp\www\NewIESP\FUNZIONApy\up1feature.py", line 180, in <module>
    updatefeatures(infile)
  File "C:\wamp\www\NewIESP\FUNZIONApy\up1feature.py", line 43, in updatefeatures
    temp = compareup1features.comparison(path)
  File "C:\wamp\www\NewIESP\FUNZIONApy\compareup1features.py", line 496, in comparison
    skellist = moduloSkeleton.skelfeatures(path1img)
  File "C:\wamp\www\NewIESP\FUNZIONApy\moduloSkeleton.py", line 1418, in skelfeatures
    img = color.rgb2gray(io.imread(path))
  File "C:\Python27\Lib\site-packages\skimage\color\colorconv.py", line 661, in rgb2gray
    return _convert(gray_from_rgb, rgb[:, :, :3])[..., 0]
  File "C:\Python27\Lib\site-packages\skimage\color\colorconv.py", line 462, in _convert
    return np.ascontiguousarray(out)
  File "C:\Python27\Lib\site-packages\numpy\core\numeric.py", line 409, in ascontiguousarray
    return array(a, dtype, copy=False, order='C', ndmin=1)
MemoryError

如何解决此内存错误?如果不可能,我怎么能说“识别”这种图像并跳过它!?

4

0 回答 0