LoginSignup
0
0

More than 1 year has passed since last update.

Jupyterでイメージ表示

Last updated at Posted at 2022-04-14

はじめに

個人用メモ

# 必要ライブラリのインポート
import matplotlib.pyplot as plt
from PIL import Image

filename = 'abc.jpg'

# ファイルオープン
img = Image.open(filename)

# 画像表示用コード

# ここでイメージの大きさを調整
plt.figure(figsize=(10,10))

# 白黒画像の場合
plt.imshow(img, cmap='gray')

# イメージに 目盛りは不要
plt.axis('off')

# 画面表示
plt.show()
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0