PIL中的Image和numpy中的数组array相互转换: 1.PIL image转换成array img = np.asarray(image) 2.array转换成image Image.fromarray(np.uint8(img))