【发布时间】:2021-05-02 16:51:34
【问题描述】:
我有一个由 128 x 128 图像获得的图,使用库 matplotlib.pyplot 实现。该图保存为具有总尺寸 (480,640,4) 的 png。如何在 numpy 数组 (128 x 128) 中转换图像 (128 x 18) 的数据?
【问题讨论】:
-
如果保存为png,所有内部结构都会丢失。您需要使用图像处理算法来提取图像,然后调整其大小。
标签: python numpy matplotlib png