opencv - skimage's rgb2gray in python: AttributeError: Nonetype object has no attribute ndim -
i using code (with skimage version 0.10.0) far can remember without issues:
from scipy import misc import scipy.io sio skimage.color import rgb2gray img = cv2.imread(myfile) img = rgb2gray(img)
but i'm getting error:
traceback (most recent phone call last): file "c:\work_asaaki\code\generateproposals.py", line 48, in <module> img = rgb2gray(img) file "c:\anaconda\lib\site-packages\skimage\color\colorconv.py", line 635, in rgb2gray if rgb.ndim == 2: attributeerror: 'nonetype' object has no attribute 'ndim'
what problem perchance be? how can prepare able convert image grayscale?
given error message problem imread
phone call fails, means img
is none
.
reason why imread
phone call fails path file wrong.
python opencv image-processing grayscale
No comments:
Post a Comment