📌  相关文章
📜  'PngImageFile' 对象没有属性 'shape' - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:06.729000             🧑  作者: Mango

代码示例2
The problem is that pimg is in PIL image format.
While imutils.resize function expects the image in Numpy array format.
So, after pimg = Image.open(b) line you need to convert the PIL image
to Numpy array like below:
pimg = np.array(pimg)