【发布时间】:2017-04-10 14:20:05
【问题描述】:
for i in range(0,3):
for j in range(0,3):
im=img[100*i:(100*i)+100,100*j:(100*j)+100]
shape= shapedetect(im)
clr= colordetect(im)
size_s= size(im)
list.append(shape)
list_clr.append(clr)
list_siz.append(size_s)
list_contnr.append(check_cnb(shape,clr,size_s))
这是我在 opencv python 中的程序的一部分。我已经选择了感兴趣的区域
of 和之前已经声明的图像,即img=cv2.imread('board_8.jpg')
但是在运行代码时它给我一个错误NoneType has no attribute '_getitem_'就行了:
im=img[100*i:(100*i)+100,100*j:(100*j)+100]
【问题讨论】:
标签: python opencv image-processing nonetype