pillow
まず元の画像 >>> img = Image.open("./crowncat4020138_TP_V.jpg") >>> plt.imshow(img) <matplotlib.image.AxesImage at 0x7f62e821bac8> グレーにする >>> img_gray = img.convert("LA") >>> plt.imshow(img_gray) <matplotlib.image.AxesImage at 0x7f62e8043160></matplotlib.image.axesimage></matplotlib.image.axesimage>
numpy.array形式のデータから画像を表示する。 画像はopen ai gymのゲーム >>> sample array([[[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0], [0, 0, 0], ..., [0, 0, 0], [0, 0, 0], [0, 0, 0]], [[0, …