AttributeError: 'NoneType' object has no attribute 'shape'

 

img = cv2.imread(path)
height,width= img.shape[:2]

在cv2中,path中不能有中文路径,图片名字也不能含中文,否则出错

AttributeError: 'NoneType' object has no attribute 'shape'

 

你可能感兴趣的:(Python)