📅  最后修改于: 2022-03-11 14:57:06.729000             🧑  作者: Mango
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)