假设我有一个4D的numpy数组,其中3D子数组是RGB图像。如何将其转换为gif格式?我希望只依赖于Python中众所周知的图像处理库。
示例数据:
示例数据:
import numpy as np
imgs = np.random.randint(0, 255, (100, 50, 50, 3), dtype=np.uint8)