执行plt.imshow(im)
的时候因为im
的dtype=int
导致出现
ValueError: 3-dimensional arrays must be of dtype unsigned byte, unsigned short, float32 or float64
使用uint8
即im.astype(np.uint8)
即可
ValueError: 3-dimensional arrays must be of dtype unsigned byte, unsigned short, float32 or float64
最新推荐文章于 2023-11-20 15:49:15 发布