some useful hint
- read image and show it:
import matplotlib.pyplot as plt # plt 用于显示图片 import matplotlib.image as mpimg # mpimg 用于读取图片 import numpy as np
img = mpimg.imread('cat.jpg')
h,w,c = img.shape
plt.imshow(img) # 显示图片 plt.axis('off') # 不显示坐标轴 plt.show()
plt.savefig('fig_cat.png')