Importing PNG files into Numpy?

后端 未结 7 1402
轮回少年
轮回少年 2020-12-08 18:32

I have about 200 grayscale PNG images stored within a directory like this.

1.png
2.png
3.png
...
...
200.png

I want to import all the PNG i

7条回答
  •  我在风中等你
    2020-12-08 18:49

    Using a (very) commonly used package is prefered:

    import matplotlib.pyplot as plt
    im = plt.imread('image.png')
    

提交回复
热议问题