读取、写入和处理各种图像 https://github.com/imageio/imageio
天问 726d463778 Update 'README.md' | 9 months ago | |
---|---|---|
README.md | 9 months ago |
读取、写入和处理各种图像
import imageio
im = imageio.imread('imageio:astronaut.png')
print(im.shape) # im 是一个 NumPy 数组 (512, 512, 3)
imageio.imwrite('astronaut-gray.jpg', im[:, :, 0])